advanced30 min studyLesson 881 in Mathematics

Weak formulations and Galerkin orthogonality

Derive a finite-dimensional problem from a weak space and identify exactly which residual tests vanish.

On this page

What you’ll understand

  • Specify the solution space and test space for a homogeneous Dirichlet problem.
  • Derive Galerkin orthogonality from conformity and identical forms.
  • Compute a one-basis finite element approximation and its energy error.

A finite element approximation is more than a polynomial drawn through selected points. It solves a finite collection of weak equations inherited from a boundary-value problem. The weak space determines which derivatives and boundary values make sense, while the discrete subspace determines which residual tests are enforced. We begin with a real scalar diffusion equation and exact integration so that the essential orthogonality is visible before quadrature, nonconformity, or boundary-data approximation introduces additional error terms.

Move derivatives onto admissible test functions

Let the domain be bounded and Lipschitz, impose homogeneous Dirichlet data on its whole boundary, and set V equal to H¹₀ of that domain. Take a scalar diffusion coefficient kappa that is essentially bounded between two positive constants. The gradient seminorm is a norm on V by Poincaré’s inequality. An integrable source is not automatically a bounded functional in every dimension; assume directly that the load belongs to the dual space V′, or use an L² source, which suffices on this bounded domain.

Multiply the differential equation by a zero-trace test function and integrate by parts, initially for smooth data and then by density. The boundary term vanishes because of the test trace, yielding the weak problem below. The bilinear form is continuous with constant kappa-max and coercive with constant kappa-min in the gradient norm. Lax–Milgram therefore supplies a unique weak solution. No global H² regularity is needed for this existence statement, and a weak solution need not have classical second derivatives everywhere.

V=H01(Ω),a(u,v)=∫Ωκ∇u⋅∇v=F(v)(v∈V).V=H_0^1(\Omega),\qquad a(u,v)=\int_\Omega\kappa\nabla u\cdot\nabla v=F(v)\quad(v\in V).
Use the gradient norm on V; the coefficient assumptions give boundedness and coercivity of a.↔ Scroll wide equations horizontally.

Conformity permits subtraction of the same equations

Choose a finite-dimensional subspace V_h contained in V and seek u_h there using the same bilinear form and load functional. Every discrete test is then admissible in the continuous problem. Subtracting the two equations gives a residual that vanishes on V_h. This is Galerkin orthogonality. It says nothing about tests outside that subspace, and it is not a claim that the strong PDE residual vanishes pointwise inside every element or at every node.

For a symmetric positive bilinear form, orthogonality is orthogonality in its energy inner product. For a nonsymmetric coercive form the displayed zero residual still holds, but one cannot automatically use a Pythagorean identity or interpret it as Euclidean perpendicularity. A stiffness matrix is obtained by testing basis expansions; its entries encode this variational form. Changing the form by approximate integration or choosing nonconforming test functions changes the subtraction argument and must be analyzed explicitly.

a(u−uh,vh)=0(vh∈Vh),a(v,w)=a(w,v)⟹∥u∥a2=∥uh∥a2+∥u−uh∥a2.a(u-u_h,v_h)=0\quad(v_h\in V_h),\qquad a(v,w)=a(w,v)\Longrightarrow\|u\|_a^2=\|u_h\|_a^2+\|u-u_h\|_a^2.
The Pythagorean statement additionally assumes a symmetric positive form and a homogeneous conforming trial space.↔ Scroll wide equations horizontally.

Discrete residuals are not the entire error

A solved algebraic system makes the weak residual vanish against its chosen basis. The remaining discretization error comes from omitted directions in the infinite-dimensional space. Conversely, an inexact linear solve leaves an algebraic residual even within the discrete space, so one must separate solver error from approximation error. Refining a mesh increases the available tests but does not justify silently dropping either component when assessing an actual computed solution.

The clean homogeneous formulation also explains why boundary conditions matter to the space. A constant function has zero gradient energy, so a pure Neumann problem needs a compatibility condition and normalization rather than the same coercivity assertion on unrestricted H¹. Nonzero Dirichlet values lead to an affine trial set and a zero-trace test space, handled later by lifting. The first invariant to check in any implementation is therefore the continuous and discrete space pair, followed by which exact forms are actually assembled.

One interior hat function

Solve −u″=2 on (0,1) with zero endpoint values using the continuous piecewise linear space on nodes 0,1/2,1. Let phi be the interior hat of height one and write u_h=c phi.

  1. Phi has slopes two and negative two on the two half-intervals. Its stiffness is the integral of phi′ squared, namely four. Its load is the integral of twice phi, namely one.

  2. The one-equation system is 4c=1, so c=1/4. The exact solution is u=x(1−x), whose midpoint value also equals one quarter; equality at that node does not mean equality between nodes.

  3. The exact gradient energy is one third, the discrete energy is 4c²=1/4, and orthogonality gives squared gradient error 1/3−1/4=1/12. Direct integration of the piecewise derivative error gives the same result.

The result

The weak equations determine the midpoint coefficient and leave a positive between-node energy error, despite exact nodal agreement in this example.

Explore the model

Interactive lab

Interactive lab · vectors

A projection analogy with a declared inner product

Reset, set angle 90 degrees and magnitude 1. Predict x-projection zero and y-projection one: the vector is Euclidean-orthogonal to the horizontal test direction. Reset, set angle 60 degrees and magnitude 1; predict horizontal projection one half. The instrument illustrates orthogonality in Euclidean geometry, not a PDE energy norm or a mesh solve. Changing controls retains time; Reset restores both controls and zero time.

A projection analogy with a declared inner productPlayback traces a fixed vector and its projections. Angle and magnitude set the geometry; the moving marker does not change them. Current readings: x component: 1.393; y component: 0.975; Magnitude: 1.7. All parameters are adjustable with the labeled controls below.−7.46−3.7303.737.46−3.5−1.7501.753.5xyvvₓ = 1.39
Vectorx / y projectionsTrace marker
x component
1.393
y component
0.975
Magnitude
1.7
t = 0 s

Playback traces a fixed vector and its projections. Angle and magnitude set the geometry; the moving marker does not change them. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forA zero projection is meaningful only after specifying the test direction and inner product; Galerkin uses the variational form.

Check your understanding

Why can the continuous and discrete weak equations be subtracted on every discrete test?

Try it yourself

For −u″=1 on (0,1) with zero endpoints and the same interior hat, compute c and the squared gradient error. Use the exact solution x(1−x)/2.

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

The stiffness stays four while the load halves. The exact and discrete gradient energies scale by the square of the source amplitude.

Compare with the solution

The load is the area under phi, one half, so 4c=1/2 and c=1/8. The exact gradient energy is (1/4)·(1/3)=1/12 and the discrete gradient energy is 4·(1/8)²=1/16. Their difference is 1/48. The squared error is one quarter of the earlier source-two error because this linear problem halves the whole solution and hence quarters its quadratic energy.

Take it with you

  • Weak spaces and coefficient bounds determine existence and coercivity.
  • Galerkin orthogonality requires conformity and identical continuous and discrete forms.
  • A zero discrete residual leaves error in unresolved function-space directions.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.