Motivation
A time integrator may conserve a useful estimate and still be only partly analyzed. For the heat equation, Crank–Nicolson averages the old and new spatial operators. This symmetry suggests second-order time accuracy, but the conclusion requires three separate facts: the exact samples have a second-order residual, the discrete step propagates that residual uniformly, and the boundary data are inserted at the times used by the formula.
The last requirement is easy to overlook. A changing boundary affects the first and last interior equations at every step. Treating it as an initial adjustment, or evaluating both contributions at the old time, changes the method. We will keep those contributions visible and then subtract exact samples, so that the error has homogeneous boundary values and a clean stability proof.
Our model is the one-dimensional constant-diffusivity Dirichlet heat equation. The theorem does not cover arbitrary rough data, nonlinear diffusion or unproved derivative-boundary discretizations.
Definitions
Definition 3.7.1
(Crank–Nicolson scheme with time-correct boundary loads)
Let on , with , , and initial function . Use , , time step , and interior vectors indexed by . Let be the zero-boundary negative second-difference matrix and set
If there is only one interior node, both boundary contributions are added in that single entry. With , Crank–Nicolson is
The initial interior vector is ; the endpoints at every level are their prescribed values. Compatibility here includes and . The smooth-solution theorem also assumes the higher compatibility needed for the asserted classical solution to exist. It does not manufacture such a solution from incompatible data.
Definition 3.7.2
(Discrete inner product and edge norm)
Use and . Edge differences include both endpoint edges, using zero endpoints for interior vectors. Summation by parts gives for nonzero .
Theorem/proposition
Theorem 3.7.3
(The step is stable without a time-space coupling)
For every , is invertible. Both its inverse and the homogeneous step have operator norm at most one in . For homogeneous boundary data and zero forcing,
This is an energy statement, not unconditional pointwise positivity or accurate damping of every unresolved mode.
Theorem 3.7.4
(A complete smooth Dirichlet convergence estimate)
Suppose the exact solution exists on the closed space-time rectangle, has continuous bounded and , and satisfies the initial and boundary conditions there. Sample initial data, forcing and both boundary functions exactly at the specified times. Then
No relation between and is required. This conclusion is in the discrete spatial norm and relies on the displayed derivative bounds.
Proof sketch or proof idea
Proof
(Eigenvalue factors and the energy identity)
The positive symmetric matrix has a real orthonormal eigenbasis in the weighted inner product. An eigenvalue gives resolvent factor and step factor . Their magnitudes are at most one, proving both bounds and invertibility. Equivalently take the time equation's inner product with : the time difference becomes a difference of squared norms, and summation by parts gives the energy identity. This second argument explains what is dissipated without relying only on a named stability property.
Proof
(Residual, propagation and summation)
For consistency, put , including exact boundary values whenever the full stencil is used. Define
The time part is the difference between the average of over an interval and its trapezoidal endpoint average. The elementary trapezoidal remainder bound is after division by . One way to prove it is to integrate the linear interpolation error of ; the kernel has integral . The spatial central difference error at either endpoint time is at most . Averaging the two such bounds and using the PDE gives
Write . Exact time-correct boundary insertion makes its boundary values zero; subtracting the two equations produces . Consequently . The initial error is zero, so summing at most steps proves the theorem. This proof contains the actual residual and propagation estimates; second-order accuracy is not inferred from the word “centered.”
Proof X-ray
Where the boundary disappears, and where it does not
The proof has three ingredients, each with its own hypothesis. Consistency uses only the bounds on and : the time part of is a trapezoidal-rule remainder and the space part a central-difference remainder, of sizes and at every node, and the factor converts the nodal bound into a bound in . Exact, time-correct boundary sampling is used once, but decisively: the scheme and the exact samples carry the same and , so the error vector has zero boundary values and obeys the homogeneous recursion . Stability enters through two norms, not one: propagates the old error and controls how the new residual is injected. Both hold for every because every eigenvalue of is positive, which is why no relation between and appears. The proof closes by counting: each step adds at most , there are at most steps, and the global error is , of the same order as the scaled residual . If the new-time boundary load is replaced by the old one, acquires the extra term , whose boundary-adjacent entries are about ; stability propagates this term faithfully, and the bound loses the stated order. Stability cannot cancel a term that the algorithm itself introduced.
A lift gives the same method only with the correct time difference
Let and write . The full spatial second difference of this affine lift is zero. Direct substitution yields
This is exactly equivalent to the boundary-loaded scheme. Replacing the last quotient by gives another discretization, generally only a first-order approximation of that quotient. Averaging the endpoint derivatives is a second-order alternative under sufficient smoothness, but it still has an additional, analyzable quadrature residual. The algebraically equivalent difference is the cleanest choice when boundary values themselves are supplied.
Worked examples
Worked example 3.7.5
(The semidiscrete mode and the PDE mode)
Take , , zero boundaries and interior vector . Its discrete eigenvalue is nine. With , the step factor is , so two steps give . The exact semidiscrete factor per step would be .
If these values sample , the continuous heat solution instead decays by per step. Comparing only with isolates the temporal error of the spatially discretized ODE; comparing with the continuous factor includes spatial error. A convergence study should state which comparison it uses.
Concept lensAnalytic
The step factor as a rational approximation of the exponential
Crank–Nicolson is the trapezoidal rule applied to the semidiscrete system . On an eigenmode with it multiplies by
The cubic agreement is the local form of second-order time accuracy for resolved modes, and for all is the stability theorem. As , however, while : stiff modes are bounded but barely damped.
Worked example 3.7.6
(A changing boundary that the method reproduces exactly)
Let on the unit interval, so , , and . For there is one interior value, , and . From zero, one step satisfies
hence , exactly , the continuous value at the spatial midpoint at time . At this is . If both boundary loads are incorrectly kept at time zero, the same step gives , or at this step. The error is caused by the changed boundary algorithm, not by failure of the theorem.
Worked example 3.7.7
(Energy decay without useful high-mode damping)
On the same grid, the sign-changing mode has eigenvalue . At , its factor is . The squared norm is multiplied by , but the sign alternates and the magnitude remains large. The exact semidiscrete factor is tiny.
This does not contradict second-order convergence as for a fixed smooth solution. The derivative constants depend on the solution and time scale. An unresolved transient can be stable yet inaccurate. Preliminary backward Euler smoothing is a possible different algorithm, but its start and resulting error require their own accounting; it is not silently included in the present theorem.
What the estimate says about refinement and starting steps
The two mesh parameters measure different approximations. If tends to zero while is fixed, the temporal error disappears but a spatial difference error remains. The computation approaches the spatially discretized differential equation, rather than the original PDE with arbitrary precision. Conversely, refining only space leaves a temporal error floor. The displayed sum gives a concrete way to choose a joint refinement experiment and to distinguish these two floors.
The derivative bounds must be uniform along that experiment. A family of initial profiles with increasingly high frequencies has fourth spatial derivatives that grow with frequency. Substituting those changing constants does not prove the same error for every member of the family. The theorem describes a fixed smooth solution sampled on increasingly fine meshes. For corner-incompatible or nonsmooth data, derivatives may become large near initial time; an estimate requiring them on the closed rectangle cannot simply be reused after ignoring the first few steps.
Crank–Nicolson is a one-step method, so its declared first step is the same equation used later. It does not need an arbitrary second initial vector. If a different first step is deliberately used, its error at that first accepted time becomes the initial-error term in the subsequent propagation estimate. For example, one backward Euler heat step with exact input and the same smooth data has an error bounded by a constant times : its scaled residual is first order in time and second order in space, but it acts for only one interval of length . This is compatible with a later second-order CN estimate. By contrast, applying a first-order method throughout a fixed positive physical startup interval generally leaves a first-order contribution. Counting startup steps and stating their purpose are part of an honest accuracy claim.
The high-mode example also explains the energy identity's apparently strong gradient term. When a factor is near minus one, successive displacement vectors nearly cancel. The gradient of their sum is small even when the gradient of either individual state is large. The energy equality therefore remains correct while the unresolved mode alternates. It measures the actual discrete mechanism, not an unproved promise of strong damping.
Finally, an inexact algebraic solve adds an unscaled equation residual to the right side before applying . Its contribution to the error is at most , by the same inverse bound. A sufficient per-step target for retaining global second order is therefore on a fixed interval. This target refers to the displayed unscaled matrix equation; dividing that equation by changes the numerical residual tolerance representing the same error budget.
A one-interior-node grid is a useful boundary check: both endpoint fluxes enter the same equation. Their contributions add. Treating the boundary load as two assignments that overwrite the same entry silently loses one side and cannot reproduce the affine manufactured solution.
The time-error constant can also be checked directly. Let . Integrating by parts twice gives . The kernel is nonnegative and has integral , so taking absolute values gives exactly the bound used above. What is needed here is , not arbitrary higher smoothness; the fourth-order spatial bound has a separate source, and the two should not be merged into a single derivative assumption.
When reading the residual formula, keep apart "the amount by which the exact samples fail to satisfy the discrete equation" and "the difference between the numerical and exact solutions." The former becomes a new error source at every step after passing through the inverse operator; the latter also contains everything accumulated earlier. Treating the size of the residual directly as the final error omits the step-size multiplier, the number of steps and the propagation constant. Here all three can be computed explicitly, which is why the theorem gives concrete time and space constants rather than merely observing that results on two grids are close.
If the diffusivity is allowed to depend on time or space, the old and new matrices may differ and need not share eigenvectors. The spectral decomposition of a single positive definite operator used in the proof then cannot be carried over without checking. This does not mean that variable coefficients cannot be analyzed; it marks the scope of this complete model theorem, and mastering this case first shows which stability step must be supplied later.
The interval-length factor in the residual norm also has a simple source: the number of interior nodes times the mesh width is at most the interval length, so the weighted sum of squared samples is at most the length times the square of the maximum. This estimate does not assume that the error is evenly distributed, and it remains uniform as the number of nodes grows. This scaling is what allows the finite-time error constant to be compared along a refinement sequence.
Common mistakes
Common mistake
(Energy stability is not a maximum principle)
An unconditional energy bound does not establish a maximum principle. The step factor can be negative, and the matrix has diagonal entries , which are negative once . Also, the lack of a time-space stability restriction does not mean that arbitrarily large time steps meet a chosen accuracy target.
A two-node computation shows that the negative diagonal really produces negative values.
Counterexample mode
Nonnegative data that turn negative in one step
Claim: since Crank–Nicolson is unconditionally stable, nonnegative initial data with zero boundary values and zero forcing stay nonnegative. Take , and , so , and start from . The step requires
whose solution is . The first value is negative, although the energy did decrease: . The repaired statement needs a step restriction. If , then has nonnegative entries, while is strictly diagonally dominant with nonpositive off-diagonal entries and therefore has an entrywise nonnegative inverse; nonnegativity is then preserved. Here .
Common mistake
(Second order needs compatible smooth data)
If the initial data and boundary disagree at the corner, the bounded-derivative hypothesis may fail even when the heat equation has a weaker solution later. Calling the stencil second order does not restore missing regularity. Similarly, approximate forcing or boundary data add residuals; they are not covered by the exact-sampling estimate without another term.
Common mistake
(A discrete rate is not a pointwise rate)
The scaling in the norm matters. From , this proof alone loses a factor when converted to a pointwise estimate. It should not be advertised as a second-order maximum-norm theorem. Exact initial samples also matter: with initial error , the same argument gives , not just .
Summary
Crank–Nicolson is second order for this smooth Dirichlet model because a second-order residual is propagated by bounded step and resolvent operators. Correct old/new boundary loads and compatible initial data are part of that model. The energy proof explains stability, while mode calculations explain why stability alone does not ensure accurate transient damping.
Exercises
Quick check
(Derive the energy identity by multiplying the homogeneous time equation by . Why are boundary edges included?)
Use summation by parts before discarding any terms.
Solution · Answer
The time inner product is . The diffusion term is . Multiplying by gives the identity. Edges adjacent to zero endpoints still have nonzero gradients, so omitting them would invalidate summation by parts.
Quick check
(Take , and . Simplify the theorem's bound.)
Keep time and space contributions separate.
Solution · Answer
The bound is . It assumes the stated smooth solution and exact samples. If the initial grid differs by in this norm, add .
Quick check
(In the example with the changing boundary, use . Compute the correct and lagged-boundary first values.)
The one-node boundary load contains both endpoints.
Solution · Answer
The correct value is . The lagged value is . Both algebraic systems are solvable; only the first is the declared time-correct method.
Quick check
(A mode has . Find its CN factor, squared-norm factor and exact semidiscrete factor.)
Compare decay with sign change.
Solution · Answer
The factor is and the squared-norm factor is . The exact factor is . The scheme is bounded and damped, but alternates and retains far more of this unresolved mode than the exact evolution.