the Galerkin method
/ gah-LYAIR-kin /
The weak form of a PDE asks for a function u, living in an infinite-dimensional space, that satisfies a(u, v) = L(v) for infinitely many test functions v. You cannot solve infinitely many equations for an infinite-dimensional unknown on a computer. The Galerkin method is the bridge: it replaces the infinite problem with a finite one by allowing only finitely many degrees of freedom, and then lets the finite answer converge to the true one as you add more.
Here is the method in plain steps. Pick a finite-dimensional subspace V_n of the function space, spanned by n chosen basis functions phi_1, ..., phi_n (for finite elements, little tent-shaped functions on a mesh). Look for an approximate solution u_n = c_1 phi_1 + ... + c_n phi_n inside V_n, and require the weak equation to hold only against the n basis functions: a(u_n, phi_i) = L(phi_i) for i = 1, ..., n. Substituting the expansion turns this into an ordinary system of n linear equations in the n unknown coefficients c_1, ..., c_n — a matrix equation K c = b, where the matrix K has entries K_ij = a(phi_j, phi_i) (the stiffness matrix) and b has entries L(phi_i) (the load vector). That is a finite linear system you can actually solve. The deep guarantee, Cea's lemma, says the Galerkin solution u_n is essentially the best possible approximation to the true u from within V_n — so as the subspaces grow to fill the whole space, u_n converges to u.
Why this matters twice over. Theoretically, Galerkin is a constructive proof of existence: solve the finite systems, show the approximations u_n are bounded (using coercivity), extract a convergent subsequence (using compactness), and the limit is a genuine weak solution — an alternative to Lax-Milgram that builds the solution rather than postulating it. Practically, the Galerkin method IS the finite element method when the basis functions are chosen to be local and piecewise-polynomial on a mesh: the unknown is a vector of nodal values, the stiffness matrix is sparse, and you have the workhorse of modern computational engineering. The whole apparatus — from heat conduction to structural mechanics to fluid flow simulations — is Galerkin in action. The honest caveat: the quality of u_n is only as good as the subspace V_n; a poor mesh or wrong basis gives a poor answer, and convergence requires the subspaces to genuinely become dense in the solution space.
For minus u'' = f on (0, 1) with zero ends, take piecewise-linear tent functions phi_i on a mesh x_i = i h, h = 1/(n+1). Each phi_i is 1 at node i and 0 at all others. Then a(phi_i, phi_j) = integral of phi_i' phi_j' is nonzero only for neighbouring nodes, giving the famous tridiagonal stiffness matrix (1/h) times [2 on the diagonal, -1 off-diagonal]. Solving K c = b recovers the standard finite-difference-like approximation — Galerkin and finite elements are the same act here.
On a mesh of tent functions, Galerkin produces the tridiagonal stiffness matrix of finite elements.
Galerkin chooses the SAME space for the trial solution and the test functions; using different spaces is the Petrov-Galerkin variant, needed for some convection-dominated problems where plain Galerkin produces spurious oscillations. Convergence is not automatic from picking any finite subspaces — they must become dense in the energy space, and the approximation quality is governed by how well V_n can represent the true solution (Cea's lemma), so a badly chosen mesh genuinely degrades the answer.