The Discrete Formulation
The abstract weak problem — find such that for all — is posed in an infinite-dimensional function space and cannot be solved directly on a computer. The Galerkin method turns it into a finite-dimensional problem by restricting attention to a subspace.
Choose a finite-dimensional test space of dimension . The subscript conventionally denotes a discretisation parameter, typically the mesh size. The trial set needs slightly more care: is affine rather than a vector space whenever , so its discrete counterpart is built the same way it was in the continuous setting. Pick a discrete lifting attaining the Dirichlet data on and set , which is the discrete form of the splitting introduced for the Poisson problem. The discrete problem then reads: find such that
This has exactly the same form as the continuous problem, but the test functions now range over a space of dimension instead of an infinite-dimensional one. To turn it into a linear system, write where is the new unknown, and let be a basis for . Since is linear in its first argument, expanding
and testing against each basis function gives
The lifting is known, so its contribution moves to the right-hand side — the discrete echo of moving the Dirichlet data there in the continuous problem. This is a system of equations in unknowns. Defining the stiffness matrix and load vector by
the discrete problem reduces to the linear system
where is the vector of unknown coefficients, from which the solution is recovered as . When is symmetric (as for the Poisson problem), is symmetric and, under the coercivity condition, positive definite. In practice is rarely built as a separate function: the Dirichlet values are held in the same nodal vector as the unknowns and eliminated from the system, which is the subject of a later post on assembly.
The key question is how well approximates the true solution . The relevant measure of error is the -norm, which for is the norm
This norm controls both the function values and their first derivatives, which is exactly the regularity that the weak formulation requires. The answer to the approximation question is given by Céa's lemma: the discrete solution is quasi-optimal in the sense that
where is the continuity constant and is the coercivity constant of . The proof rests on two observations. First, subtracting the discrete problem from the continuous one shows that the error is orthogonal to with respect to :
This is called Galerkin orthogonality. Second, for any — noting that then lies in , since the lifting cancels in the difference —
where the first step uses coercivity, the second uses Galerkin orthogonality (adding and subtracting ), and the third uses continuity. Dividing by and taking the infimum over gives the bound. When is symmetric the ratio and is the best approximation to from in the energy norm .
Céa's lemma reduces the question of approximation quality entirely to approximation theory: how well can elements of approximate ? This depends on the choice of basis functions and the mesh, which is the topic of the next posts.