Take linearly independent basis functions and write . The weak formulation of the heat equation, tested against , is
Thus the semidiscrete finite element heat equation is
The vector contains the basis coefficients. A natural initial vector is the projection of the initial data: , where , and . Other consistent initial approximations can be specified, but exact representation of an arbitrary in the trial space is not implicit.
For a nonzero coefficient vector , the function is nonzero by basis independence. Hence , proving that the mass matrix is symmetric positive definite. Also : if the derivative vanished, would be a constant, and its zero endpoint traces would make it zero. Therefore is symmetric negative definite, not merely semidefinite, for these homogeneous Dirichlet conditions.
The squared spatial norm is . Differentiating and using the semidiscrete system gives the energy identity
Using the trapezoidal rule in time gives the Crank-Nicolson method
The left matrix is positive definite for every , so every step exists uniquely. To prove stability, set and . The update says . Multiplying by gives
Consequently
The same inequality applied to the difference of two discrete solutions proves nonamplification of initial perturbations. This is unconditional stability in the mass-matrix norm, exactly the spatial norm of the finite element functions.
Define the squared L2 norm . Multiplication of the semilinear partial differential equation by , followed by integration by parts, gives
At the Dirichlet boundary condition makes the boundary term zero. At the Robin boundary condition is , so subtraction of the lower endpoint gives . In particular the sign is dissipative. Thus the exact energy identity is
which implies
Write and . Subtraction of the two boundary value problems gives , with . Multiply by and apply integration by parts:
Consequently the required energy identity is
The nonlinear term is nonnegative pointwise, since
This is the monotonicity energy estimate for a semilinear Dirichlet problem for the monotone function . Apply Young's inequality for products, , inside the last integral and discard the nonnegative nonlinear term. Moving to the left gives
In particular, equal forcing gives , proving uniqueness and a quantitative continuous dependence on forcing estimate for this boundary value problem.
Let and , and define the scaled forward difference operator, backward difference operator and second-order central difference by
The two finite difference methods are the nonlinear systems
with the prescribed Dirichlet boundary conditions and . These equations determine the interior nodal values.
For clarity distinguish the interior and edge inner products and their norms:
The bracketed norm includes the last edge . Let , so , and put for . Direct telescoping gives discrete summation by parts:
Subtract the two nonlinear systems, multiply each equation by and sum. The resulting discrete energy identity is
The nonlinear summands are nonnegative by the factorization in (a). Using Young's inequality for products at every node gives
This also proves uniqueness of each discrete solution. Existence can be seen by minimizing, with the endpoints fixed, the strictly convex energy functional
It is a coercive function of its finitely many interior values, so it attains a minimum. Its first derivatives are ; thus its minimizer solves the scheme. The same argument applies to .