From a temperature profile to numbers
The heat equation describes diffusion when is constant. A Fourier series gives an exact representation for many idealized problems, but a computation needs finitely many numbers. Here we keep the temperature at equally spaced points, replace derivatives by differences, and watch how both the grid spacing and the time step affect the answer. The resulting stability restriction connects Fourier modes to numerical computation.
Take , zero endpoint temperatures, and initial profile . Let , , , , and , with . Define . A forward time difference and centered space difference give the explicit update
At each step every new value uses the old values; an implementation needs separate old and new arrays, or an equivalent careful update. The boundary values enter the first and last interior equations. At , for example, the next temperature is one quarter of each neighbor plus one half of the current value.
Common mistake
(Overwriting values during the sweep)
Updating a single array from left to right lets the new enter the formula for , which is a different scheme. With and interior values , the in-place sweep gives , then , then , instead of the explicit result .
Why the time step matters
When , the three coefficients are nonnegative and sum to one. Each new interior value is therefore a weighted average of old values, including the zero endpoints where relevant. In particular, its absolute value cannot exceed the largest old absolute value. The same holds for the difference between any two numerical solutions with the same boundary data: errors in their starting values are not amplified in the maximum norm.
Theorem 2.4.1
(Stability and convergence of the explicit scheme)
Suppose has bounded and on , satisfies the heat equation and zero boundary conditions, and the initial grid values are exact samples of . If and , then for ,
Thus the error is under refinement with the stated bound on and uniform derivative bounds.
Proof
(Local defect plus a nonexpansive step)
Taylor's theorem gives a forward time difference error at most and a centered second-space-difference error at most . Insert exact samples in the numerical update: their one-step defect is at most times the sum of these two bounds, with the second multiplied by . Let be numerical values minus exact samples. The weighted-average property bounds the propagated part by , so , where is the parenthesized expression above. The initial error is zero; summing at most steps gives . Nonzero initial sampling error adds its maximum norm to this bound.
Proof X-ray
Consistency and stability, used at different places
Write the error recursion as , where is the update matrix and is the defect of exact samples. Taylor's theorem bounds only , and it is the one place where the smoothness of is used. The key move is the bound , which holds because, for , every row of has nonnegative entries summing to at most one. The hypothesis is used here and nowhere else. The argument closes by telescoping: defects of size add up to , so the factor in each defect is exactly canceled by the number of steps . If were negative, could amplify an error by per step, and the same consistent defects would no longer give a bounded sum, as the counterexample below shows.
The condition is a convenient grid-independent sufficient condition, not the sharp threshold on every fixed finite grid. Indeed, the discrete sine vectors , , vanish at the endpoints. A trigonometric identity shows that one step multiplies the th vector by
The sine vectors form an orthogonal basis of the interior grid vectors. For a fixed , every mode is non-amplifying in the discrete Euclidean norm precisely when for every , equivalently . This threshold approaches as the grid is refined. Equality can leave a mode undamped; non-amplification is not the same as strict decay.
Worked example 2.4.2
(Two explicit steps)
Let , , and start with interior values and zero endpoints. The first step gives : the middle value is . The second gives . These are grid values, not a claim that the exact solution has these values at the same times.
Worked example 2.4.3
(The boundary case )
At the weight on the current value is zero, so each new value is the average of its two neighbors. From with one step gives , still within the old range. For the highest mode, , so . The mode changes sign each step, which is a mild oscillation, but its magnitude decays. On this grid the sharp threshold is , so is inside it.
Counterexample mode
Refining space alone can destabilize the calculation
With and , choose initial grid values proportional to . This is a legitimate zero-boundary discrete mode, but its amplification factor is , whose magnitude exceeds one. It alternates sign and grows, although heat flow should smooth and decay. Since , halving at fixed multiplies by four; spatial refinement alone can make this explicit method unstable.
A second time update
Backward Euler instead solves, at every step,
The matrix is tridiagonal and can be solved efficiently; its sine-mode factor is , between zero and one for . Thus these modes decay for any positive step. This is a stability statement, not an accuracy guarantee: a large can poorly resolve the time evolution. Both methods still need boundary and initial data compatible with the regularity assumptions used in an error proof.
Worked example 2.4.4
(One backward Euler step at )
Take , and old interior values . The equations are , and . By symmetry , and the middle equation gives , so . Substituting back: and . The explicit scheme with the same gives , a negative temperature and a larger maximum, whereas the implicit values are positive and below the old maximum.
Unconditional stability of the implicit step is a statement about growth, not about how well a single large step follows the true evolution.
Common mistake
(Reading unconditional stability as accuracy)
Backward Euler damps every mode for every , but its factor for a smooth mode is instead of the exact , where is the corresponding eigenvalue. For these are and . A stable step can still be a poor approximation, and the time error remains first order in .
Practice
Quick check
(With , , and initial interior values , compute one explicit step.)
Solution · Answer
The new values are : for example . The zero endpoints are included in the neighboring averages.
Quick check
(For and , compute the highest-frequency amplification factor. Is this mode damped?)
Solution · Answer
With , . Its magnitude exceeds one, so this mode grows; indeed exceeds the threshold for .
Quick check
(If is halved while is fixed, how must change to keep unchanged?)
Solution · Answer
Since , divide by four. This keeps stability of the same dimensionless form but does not independently certify a target accuracy.
Quick check
(For the explicit scheme, what changes in the error estimate if the initial grid error is at most in maximum norm?)
Solution · Answer
The same recursion gives with from the theorem. The initial error is not multiplied by the number of steps because each step is nonexpansive in this norm.
Scope
This treatment covers a uniform one-dimensional grid, constant diffusivity and homogeneous Dirichlet data. Variable coefficients, nonuniform grids, nonzero or time-dependent boundaries, and higher-dimensional stability need their own discretization and analysis.