  We present extended Galerkin neural networks (xGNN), a variational framework
for approximating general boundary value problems (BVPs) with error control.
The main contributions of this work are (1) a rigorous theory guiding the
construction of new weighted least squares variational formulations suitable
for use in neural network approximation of general BVPs (2) an ``extended''
feedforward network architecture which incorporates and is even capable of
learning singular solution structures, thus greatly improving approximability
of singular solutions. Numerical results are presented for several problems
including steady Stokes flow around re-entrant corners and in convex corners
with Moffatt eddies in order to demonstrate efficacy of the method.
