Motivation
Spatial derivatives compare neighboring values. A finite difference method replaces those derivatives by expressions involving neighboring grid points, producing a finite collection of equations. The resulting equations still need analysis: a derivative approximation can be locally accurate while the complete numerical method amplifies errors. Boundary conditions are equally important. They determine both the mathematical problem and the rows of the discrete system.
We study two model problems on . The heat equation , with , describes smoothing over time. A steady elliptic problem determines a spatial profile from forcing and boundary data. Both use the same centered second difference, but their computational questions differ. Heat evolution involves a time step and its amplification factor; the elliptic problem involves the solvability and conditioning of a linear system.
These one-dimensional models are rich enough to establish a complete argument from derivative approximation to an error bound. They also explain why simply refining every mesh parameter together can be wasteful. For explicit heat stepping, the time step must scale with the square of the spatial step for the maximum-norm argument below. This coupling becomes expensive on fine meshes and motivates implicit time integration.
Definitions
Definition 3.1.1
(Grid and centered second difference)
Let , , and for . For a vector of grid values including boundaries, define
When is a function, means that the grid operator acts on the samples .
Lemma 3.1.2
(Second-order consistency of the centered difference)
If and on , then for every
Proof
(Two Taylor expansions about the node)
Write . Taylor's theorem with the Lagrange remainder gives points and with
Adding the two expansions cancels the first- and third-derivative terms, because the difference is centered. Subtracting and dividing by gives
Each remainder term is at most in absolute value, so the sum is at most . The points lie in the stencil , so smoothness near every stencil, including those next to the boundary, is part of the hypothesis.
Definition 3.1.3
(Forward-time centered-space heat scheme)
For on , impose zero Dirichlet data and compatible initial data . Choose and . The forward-time centered-space scheme is
with and . Errors are measured in the grid maximum norm . A map is nonexpansive in this norm if distances between its outputs never exceed distances between its inputs. Nonexpansiveness is a non-strict inequality, which differs from strictly reducing distances at every step.
Definition 3.1.4
(Dirichlet finite difference elliptic system)
For on with and , the discrete problem is to find grid values with
The interior matrix is tridiagonal: diagonal entries are , and the adjacent off-diagonal entries are . Known boundary values move to the right-hand side. In particular the first right-hand-side entry includes and the last includes . Dropping these terms solves a different boundary-value problem.
Theorem/proposition
Theorem 3.1.5
(Heat maximum bound and convergence)
If , the explicit heat update with fixed zero boundary data is nonexpansive in the grid maximum norm. Suppose the exact heat solution has bounded continuous and on the closed space-time rectangle through a fixed time , and the initial and boundary grid values are exact. For every grid time ,
The norm on the left is taken at grid points. This proves convergence as subject to the stated ratio restriction.
Theorem 3.1.6
(Discrete elliptic uniqueness and an error estimate)
For every , the Dirichlet finite difference elliptic system has a unique solution. If the exact solution belongs to and , then
The boundary values and forcing samples are assumed exact. The estimate concerns discretization error; errors from an inexact linear solve need an additional residual bound.
Proof sketch or proof idea
Proof
(Convex weights and accumulated residuals)
Under , the three heat weights , , are nonnegative and sum to one. Every updated value is therefore a convex combination of three old values. Applying this to the difference of two grid solutions with the same boundary values proves nonexpansiveness. The same argument bounds an update between the smallest and largest old values, including boundary values. It also preserves nonnegativity.
Insert the exact heat solution into the difference equation. Its scaled residual is
Taylor's theorem in time bounds the first quotient minus by . The consistency lemma bounds the remaining difference by . The PDE cancels the exact derivative terms. Write for the zero-boundary update map. Subtracting the numerical scheme from the exact relation, the error has zero boundary values and satisfies
Nonexpansiveness implies . Summing from the exact initial data gives , which is the heat estimate.
Proof
(Maximum principle, uniqueness and the quadratic barrier)
First establish a discrete maximum principle: if at interior points and at both boundaries, then everywhere. Suppose instead that the maximum of is positive. It is then attained at some interior index , and its neighbors are no larger. The assumed inequality at reads , so both neighbors must also equal . Repeating the argument reaches a boundary and contradicts its nonpositive value. This propagation argument handles the possibility of a flat plateau, which a strict-maximum argument alone would miss.
The difference of two elliptic solutions has zero boundary values and satisfies . Apply the principle to and to obtain , which is uniqueness. The interior system is square, so a trivial kernel also gives existence for every right-hand side by finite-dimensional linear algebra.
Let . Its boundary values vanish, and the consistency lemma gives . Define a comparison vector . The second difference of is exactly , because the operator differentiates quadratics exactly, so and . Thus and , with zero boundary values. The maximum principle yields , proving the estimate.
Proof X-ray
Where the barrier does the work
The elliptic proof uses three ingredients in a fixed order. The sign pattern of the operator, a positive diagonal and nonpositive neighbor weights, enters only through the inequality at an interior maximum. That inequality is what forces the neighbors to share the maximum.
The boundary rows end the propagation. Without them the principle fails: on a periodic grid a positive constant satisfies and has no boundary value to contradict.
The non-obvious move is the barrier. The error has no known sign and its residual bound is two-sided, while the maximum principle accepts only one-sided inequalities. Subtracting converts the two-sided bound into the pair , both with zero boundary values. The argument closes without any further error term because is a quadratic, on which the difference operator is exact. The constant is the product of from consistency and from the barrier; the nonzero-boundary worked example below attains it.
The elliptic proof also gives an inverse bound: a zero-boundary system satisfies . Consequently a solver residual can be translated into a solution error using the same barrier. The residual must be measured for the matrix with its stated scaling; multiplying all matrix rows by changes the residual scale.
Concept lensStructural
The maximum principle as a nonnegative inverse
Write for the interior matrix of with zero boundary values. Applied to , the discrete maximum principle says that entrywise implies . This is equivalent to the matrix statement that has nonnegative entries. If and , then . Conversely, column of solves , where , so that column is nonnegative.
For a matrix with nonnegative entries, the maximum-norm operator norm is the largest row sum, which is the largest entry of . That vector solves with zero boundary values, so it is exactly the sampled quadratic . Hence
with equality when is even. The barrier argument and the inverse bound are the same fact, read once as a comparison of vectors and once as a property of one matrix.
Worked examples
Worked example 3.1.7
(A complete heat step)
Let , , , and . Then . With , the three interior values are . One step gives
The exact solution is . Its middle value at this time is approximately . Boundary zeros participate in the first and third updates; replacing them by copied interior values would implement a different boundary condition. This example exhibits both spatial and temporal error in the same computation.
Worked example 3.1.8
(Why one half is a mesh-uniform threshold)
For zero boundaries, the grid vector , , is an eigenvector of the heat update, with factor
This follows by adding the sine values at the two neighboring grid points. With , and , the factor is approximately , so that mode alternates and grows. With , however, there is only one interior value and the factor at is , which decays.
Therefore does not imply instability on every fixed small grid. For any fixed , sufficiently fine grids have a high-frequency factor with magnitude greater than one. The half threshold gives a simple maximum-norm and positivity guarantee independent of grid size.
Worked example 3.1.9
(A nonzero boundary in an elliptic solve)
Let , , . The exact solution is . On , the single interior equation is . Hence , giving .
The exact middle value is , so . Here , and the theorem gives : the bound is attained. This example checks the sign of the operator, the placement of the boundary contribution, and the error constant at once. A numerical solution larger than the exact value is fully consistent with an absolute error bound.
Nonexpansiveness is not strict one-step contraction
If at least three interior values are all one, an interior point whose two neighbors are also interior remains one after a heat step. Thus the maximum norm need not strictly decrease in one step, even for with zero boundaries. The convex-combination proof establishes a non-strict bound.
Nevertheless, on a fixed finite Dirichlet grid and for , every eigenfactor above has magnitude strictly less than one: its sine square lies strictly between zero and one. The symmetric update matrix has a complete orthogonal sine eigenbasis, so repeated application tends to zero. Eventual decay and strict one-step maximum-norm contraction are different statements. At , the update is the identity and there is no decay at all.
This distinction matters in error proofs. To accumulate local residuals, it suffices that each step does not amplify the old error; the step need not reduce it immediately. Mistaking nonexpansiveness for a fixed maximum-norm factor below one could wrongly produce an error bound independent of time. Using the non-strict inequality that has actually been proved keeps the time dependence of the constant trustworthy.
The method of lines and implicit alternatives
Keep the spatial grid fixed and let the interior values depend continuously on time. They satisfy a system with boundary contributions included as forcing when necessary. This is the method of lines. The largest magnitude negative eigenvalue grows like , explaining the stiffness that appears as the grid is refined. Applying forward Euler to this system produces the explicit heat scheme.
Backward Euler instead solves . Its heat eigenfactors are positive and at most one for every positive time step, since the eigenvalues of are negative. The matrix must be solved each step. The absence of the explicit restriction does not remove temporal discretization error. To resolve a rapidly changing initial layer, a small time step may still be needed.
The estimates above compare exact and computed values at nodes only. To approximate the full continuous function, specify an interpolation rule and add its error. Piecewise linear spatial interpolation of a sufficiently smooth exact function has a second-order error, while rough initial data may not satisfy the high derivative bounds used here near time zero. Smoothing of the heat equation for positive time does not retroactively justify a theorem whose hypotheses fail at the initial corner.
A refinement experiment should respect this distinction. Holding the heat ratio fixed while halving the spatial step quarters the time step; both terms in the displayed error estimate then decrease by a factor of four. This is a combined space-time experiment, so its observed rate cannot separately identify the temporal order. To study the temporal order, first make spatial error negligible and vary the time step within the stable range. State which error source the experiment is designed to isolate.
Common mistakes
Common mistake
(The heat ratio contains the square of the spatial step)
The ratio contains , not . Halving the spatial step while holding fixed requires dividing the time step by four. Halving both steps instead doubles : a run that was covered at moves to , outside the guarantee.
Common mistake
(Consistency residual versus solver residual)
Consistency is the residual obtained by inserting the exact solution into the difference equations; it controls discretization error. A small algebraic residual from a linear solver measures how accurately the discrete system was solved, which is a different error. The two are bounded separately and combined by the triangle inequality.
Common mistake
(A maximum bound is not pointwise decrease)
A discrete maximum bound is not a claim that every grid value decreases. With and old left, center and right values , the center becomes : heat raises a cool point while lowering its hotter neighbors, and every new value still lies between the old extremes.
An elliptic matrix with the opposite sign can still be invertible, but the maximum-principle inequalities must change consistently. Preserve the chosen sign convention throughout the proof.
Counterexample mode
Nonexpansiveness fails once the center weight is negative
It is tempting to regard the convex-weight argument as merely convenient and to expect nonexpansiveness slightly above one half. Take , , zero boundaries and interior values , so . The center weight is , and one update gives
and by symmetry. The distance from the zero solution grows from to in one step. For any the same alternating vector gives center value , whose magnitude exceeds one, as soon as provides an interior point with two interior neighbors. The repair is the hypothesis , exactly the condition that makes all three weights nonnegative.
Summary
Centered differences give second-order spatial consistency for smooth functions. Nonnegative heat weights control the accumulation of local residuals and yield an grid error. For elliptic equations, the discrete maximum principle gives uniqueness and turns residual bounds into solution bounds. Boundary values, smoothness and the norm are essential parts of each result.
Exercises
Quick check
(Take , and . Compute and the next value at a point with old left, center and right values . Does the maximum-norm guarantee apply?)
Compute the weights before performing the update.
Solution · Answer
Here . The weights are , so the new value is . Since , the guarantee applies. The center increases from to , but the new value stays between the old minimum and maximum . Stability does not require pointwise monotonic decrease in time.
Quick check
(Solve , , on . Explain why the grid solution agrees exactly with .)
Use exactness of the centered second difference on quadratics.
Solution · Answer
The values are . A quadratic has fourth derivative zero, and direct substitution gives exactly. These samples satisfy the boundary values and every discrete equation. Uniqueness therefore identifies them as the discrete solution. This exactness is special to the polynomial and does not imply that all smooth solutions are represented exactly.
Quick check
(An approximate elliptic solution has exact boundary values and residual at most in the scaled operator . Bound its distance from the exact discrete solution. If the spatial step halves, what happens to the discretization error bound for a fixed ?)
Separate algebraic error from discretization error.
Solution · Answer
The difference from the exact discrete solution has zero boundary values and a right-hand side of magnitude at most , so the barrier estimate gives maximum norm at most . This is an algebraic error bound. The separate discretization bound decreases by a factor of four when the spatial step halves. To obtain total error, add the two bounds by the triangle inequality; refining space alone does not reduce a fixed solver residual.