The Galerkin Method
Galerkin methods choose test functions from the same space as the trial functions, making the residual orthogonal to that space.
Residual orthogonality
Given a weak formulation, a Galerkin method approximates the solution in a finite-dimensional subspace and requires the residual of the equation to be orthogonal to that same subspace. In other words, the error the discrete solution leaves behind has no component along any basis function used to build it. This single principle generates finite element methods, spectral methods, and spectral element methods depending on the chosen basis.
For symmetric, coercive problems the Galerkin choice is optimal: the discrete solution is the best approximation in the energy norm, a statement known as Cea's lemma. This gives Galerkin methods their strong theoretical footing.
Petrov-Galerkin variants
When trial and test spaces differ, the method is Petrov-Galerkin. This flexibility is used to stabilize convection-dominated problems, where a pure Galerkin scheme develops spurious oscillations. Streamline-upwind Petrov-Galerkin (SUPG) adds a mesh-dependent term along streamlines to introduce just enough upwind stabilization while retaining consistency.
Discrete system assembly
Expanding the trial solution in basis functions and testing against each basis function produces a linear or nonlinear algebraic system. The matrix entries are integrals of basis-function products and their derivatives, computed by numerical quadrature element by element. Sparsity follows from the local support of the basis.
- Bubnov-Galerkin: identical trial and test spaces
- Petrov-Galerkin: distinct spaces for stabilization
- Cea's lemma: best-approximation property for coercive problems
- Quadrature accuracy must match basis-function order
The Galerkin framework unifies a large fraction of modern PDE solvers and connects discretization directly to approximation theory, which is why convergence proofs for these methods are so clean.