43.11.02 · numerical-analysis / 11-finite-difference-pdes

The method of lines and stability for parabolic problems

shipped3 tiersLean: none

Anchor (Master): LeVeque 2007 *Finite Difference Methods for Ordinary and Partial Differential Equations* (SIAM) Ch. 9-10 (the method of lines, the stiff semidiscrete system, the $\theta$-method family, accuracy and absolute-stability analysis, and the $O(k+h^2)$/$O(k^2+h^2)$ convergence orders); Thomée 2006 *Galerkin Finite Element Methods for Parabolic Problems* 2e (Springer) Ch. 1, 7-9 (the semigroup/semidiscrete framework, the backward Euler and Crank-Nicolson time discretisations, and the smoothing/stability estimates); Hairer-Wanner 1996 *Solving Ordinary Differential Equations II* 2e (Springer) §IV.2-IV.3 (stiffness, A- and L-stability, applied to the parabolic semidiscretisation)

Intuition Beginner

Heat spreads. Drop a hot spot into a cold metal bar and the warmth flows toward the cold, smoothing every bump until the whole bar settles. The continuous rule that governs this smoothing is the heat equation from 02.13.03, and like every partial differential equation it asks for a value at every point of the bar and at every instant of time. A computer cannot store infinitely many points, so we make the problem finite in two separate stages, one for space and one for time.

The first stage handles space. Lay a row of grid points along the bar and keep only the temperatures there. The bending of the temperature profile at a point — how far it sits below the average of its left and right neighbours — is exactly what the spatial part of the elliptic unit 43.11.01 already taught us to measure. Replacing the continuous spatial bending by this neighbour comparison turns the single partial differential equation into a large bundle of ordinary differential equations: one equation for how each grid temperature changes in time. That step is called the method of lines, because each grid point traces a line through time.

The second stage handles time. We now have an ordinary-differential-equation system, and the earlier numerical-ODE units give us integrators for exactly that. The simplest one marches forward: the new temperatures are the old ones plus a small time step times the current rate of change. This explicit march is cheap, but it has a catch. If the time step is too large relative to the grid spacing, the computed temperatures do not smooth — they oscillate and explode, the opposite of how heat behaves.

That catch is the heart of this unit. The fine spatial grid makes the ODE system stiff, in the sense of 43.10.05: fast modes that the true solution barely notices still dictate how big a step the explicit method may take. The cure is to integrate in time with a method built for stiffness, one that stays calm at any step size. Those are the implicit schemes, and they cost one tridiagonal solve per step in exchange for removing the restriction entirely.

Visual Beginner

The picture has two axes: space across the bar and time upward. Space is already chopped into grid points by the method of lines; the question is how big a time step the marching scheme may take before it misbehaves.

The table below contrasts the three standard time-marching choices. The explicit one is cheap per step but capped: the time step must stay below half the squared grid spacing. The two implicit ones cost a small solve each step but accept any time step the accuracy allows.

 time
  ^      explicit (forward) step:                implicit step:
  |      uses only known values below            ties new values together,
  |        U^{n+1}  <- U^n                         solve a tridiagonal system
  |          o                                       o---o---o   (all unknown)
  |         /|\                                       |   |   |
  |        o o o   (known)                          o   o   o   (known)
  |
  +-------------------------------------------------------------> space
scheme per-step cost time-step rule order in time
forward Euler (explicit, FTCS) one multiply step half the squared spacing first
backward Euler (implicit) one tridiagonal solve any step first
Crank-Nicolson (implicit) one tridiagonal solve any step second

The takeaway: the method of lines splits the job into a space step and a time step, and the whole stability story lives in the time step. Explicit marching is fast but leashed to a tiny step on a fine grid; implicit marching pays a small solve to run off the leash.

Worked example Beginner

Let us watch the explicit scheme stay calm and then blow up, on a tiny grid, so the stability limit becomes concrete. Take a bar of length with the two ends held at temperature . Put down grid points at spacing , so the interior has three unknown temperatures, called from left to right.

The spatial rule says each grid temperature changes at a rate equal to its left neighbour plus its right neighbour minus twice itself, all divided by the squared spacing . The explicit march updates each temperature by adding the time step times that rate. Collecting the factor, the new middle temperature is , where is the single number that controls everything. The stability limit, derived in the formal part, is .

Step 1. Start from a simple spike: , , , with the ends fixed at .

Step 2. Take a safe step, (so ). The new middle value is . The new left value is , and by symmetry the new right value is . The spike of height has spread into two half-height shoulders. The values stay between and — smoothing, as heat should.

Step 3. Take an unsafe step, (so , twice the limit). The new middle value is . The new shoulders are . The profile is now : it did not smooth, it flipped sign and kept its size.

Step 4. Repeat the unsafe step once more from . The new middle is . The middle value has grown from to to , swinging wider each step. The computed temperatures explode while real heat would have faded.

What this tells us: the same explicit scheme is trustworthy at and ruinous at . The dividing line is the parabolic step restriction . Because the limit involves the square of the spacing, halving the grid forces the time step down by a factor of four — the practical pain that pushes people toward the implicit schemes.

Check your understanding Beginner

Formal definition Intermediate+

Consider the one-dimensional heat (diffusion) equation 02.13.03 on the interval with homogeneous Dirichlet data, $$ u_t = u_{xx} \ \text{ in } (0,1)\times(0,T], \qquad u(0,t) = u(1,t) = 0, \qquad u(x,0) = u_0(x), $$ whose classical solvability and smoothing are supplied by the continuous theory and are not reproved here. Fix an integer , set the spatial mesh width and grid points for , and let for the interior indices , with .

Semidiscretisation: the method of lines. Replace the spatial derivative by the second-difference operator of 43.11.01 at each interior node, leaving time continuous: $$ \frac{dU_j}{dt} = \frac{U_{j-1}(t) - 2U_j(t) + U_{j+1}(t)}{h^2}, \qquad 1 \le j \le m. $$ Collecting the interior values into a vector , this is the linear, constant-coefficient, stiff ODE system $$ U'(t) = A_h,U(t), \qquad A_h = \frac{1}{h^2},\mathrm{tridiag}(1,-2,1) \in \mathbb{R}^{m\times m}, $$ the semidiscrete system. Here is the negative of the symmetric positive-definite operator of 43.11.01; it is symmetric negative definite, with eigenvalues $$ \mu_p = -\frac{4}{h^2}\sin^2!\Big(\frac{p\pi h}{2}\Big), \qquad 1 \le p \le m, $$ spreading from (the slow mode) down to (the fast mode) as . The huge spread is the stiffness of the system in the sense of 43.10.05.

Full discretisation: the -method family. Apply a one-step time integrator with step and time levels , writing . The -method takes the spatial operator at a convex combination of the new and old levels, $$ \frac{U^{n+1} - U^n}{k} = A_h\big((1-\theta)U^n + \theta,U^{n+1}\big), \qquad \theta \in [0,1]. $$ Three choices are standard. With this is forward Euler, the forward-time centred-space (FTCS) scheme $$ U^{n+1} = (I + kA_h),U^n, $$ explicit: each new value is an affine combination of known values. With it is backward Euler, $$ (I - kA_h),U^{n+1} = U^n, $$ implicit: one tridiagonal solve per step. With it is Crank-Nicolson (the trapezoidal rule applied to the semidiscrete system), $$ \Big(I - \tfrac{k}{2}A_h\Big)U^{n+1} = \Big(I + \tfrac{k}{2}A_h\Big)U^n, $$ also one tridiagonal solve per step. In every case for the method's stability function of 43.10.04: (forward Euler), (backward Euler), (Crank-Nicolson), evaluated at the matrix argument .

Local truncation error. The local truncation error is the residual obtained by inserting the exact solution into the scheme and dividing by . For FTCS, $$ \tau^n_j = \frac{u(x_j,t_{n+1}) - u(x_j,t_n)}{k} - \frac{u(x_{j-1},t_n) - 2u(x_j,t_n) + u(x_{j+1},t_n)}{h^2}. $$ A scheme is consistent of order if . The discrete maximum norm is , the spatial mesh ratio is , and the symbols , , , , , , , and are recorded in _meta/NOTATION.md.

Counterexamples to common slips

  • Semidiscretising is not yet a numerical method. The method of lines produces an exact ODE system ; the approximation in time only enters when an integrator is chosen. Conflating the two hides where each error term — from space, or from time — actually comes from.

  • The restriction is , not . The fast eigenvalue is , and forward Euler needs , giving . Reading the cap as linear in underestimates the cost of refinement by a full power of .

  • Unconditional stability is not unconditional accuracy. Backward Euler and Crank-Nicolson place no cap on for stability, but a large still destroys accuracy; the schemes merely refuse to blow up, they do not promise to resolve the solution.

  • Crank-Nicolson is A-stable but not L-stable. Its stability function tends to as along the real axis, so the stiffest unresolved spatial modes are damped only marginally and can ring; backward Euler, with , annihilates them. This is the 43.10.05 L-stability distinction surfacing in the PDE.

Key theorem with proof Intermediate+

The signature result is the parabolic stability restriction: the explicit FTCS scheme for the heat equation is stable in the maximum and norms exactly when the mesh ratio satisfies , while the backward-Euler and Crank-Nicolson schemes are stable for every . The mechanism is the 43.10.04 eigen-decoupling: is symmetric, so the one-step operator is diagonalised by the same sine modes, and stability reduces to forcing each scaled eigenvalue into the method's absolute-stability region [LeVeque, R. J. — Finite Difference Methods for Ordinary and Partial Differential Equations: Steady-State and Time-Dependent Problems; Hairer, E. & Wanner, G. — Solving Ordinary Differential Equations II: Stiff and Differential-Algebraic Problems (2nd ed.)].

Theorem (parabolic CFL and unconditional implicit stability). Let with eigenvalues , and let the time-stepping operator be . Then, in the norm:

(i) The FTCS scheme satisfies if and only if .

(ii) The backward-Euler scheme and the Crank-Nicolson scheme satisfy for every .

Proof. Since is real symmetric, the spectral theorem gives an orthonormal eigenbasis with (the discrete sine modes of 43.11.01). For any rational analytic on the spectrum, has the same eigenvectors with eigenvalues , and because the eigenbasis is orthonormal the spectral norm is the largest eigenvalue modulus: $$ |r(kA_h)|2 = \max{1\le p\le m} |r(k\mu_p)|. $$ Thus stability holds exactly when lies in the absolute-stability region for every .

(i) Forward Euler. Here and on the real axis 43.10.04. The eigenvalues are real and negative, where ; the most negative is at , where as , so . The condition for all is , that is ; the binding case is the largest , giving . Since for every finite but tends to , the uniform condition that holds for all is , i.e. ; this is also sufficient, as then for all . Hence .

(ii) Backward Euler and Crank-Nicolson. For backward Euler ; since every , the denominator , so for all and all . For Crank-Nicolson ; for real , $$ |r(z)|^2 = \frac{(1 + z/2)^2}{(1 - z/2)^2}, \qquad (1-z/2)^2 - (1+z/2)^2 = -2z \ge 0, $$ so for every , with equality only at . Both stability functions are bounded by one on the entire negative real axis where the spectrum lives — both methods are A-stable 43.10.05 — so holds for every with no restriction.

Bridge. This theorem is the foundational reason the parabolic time step splits into two regimes: the explicit scheme inherits the small forward-Euler stability disc, and feeding the discrete Laplacian's largest eigenvalue into that disc is exactly what forces , while the implicit schemes inherit A-stable regions that swallow the whole negative axis. This is exactly the eigen-decoupling of 43.10.04 carried from a generic linear system to the specific matrix built in 43.11.01, and it builds toward the von Neumann analysis of 43.11.03, where the same eigenvalues reappear as Fourier amplification factors and the criterion recovers by a different route. The stability half here is dual to the consistency half computed below — one bounds how the scheme amplifies modes, the other bounds the residual the exact solution leaves — and putting these together is the central insight that a consistent, stable parabolic scheme converges at its consistency order. The same pattern appears again in the Lax-Richtmyer equivalence theorem 43.11.05, where the power-bounded operator is the abstract object whose uniform boundedness is the stability hypothesis.

Exercises Intermediate+

Advanced results Master

Theorem 1 (stability function, A-stability, and the parabolic restriction). The full discretisation is with the stability function of the time integrator 43.10.04, and because is symmetric the spectral norm is . The explicit scheme has stability region meeting the negative real axis in , so stability demands , the parabolic restriction as . The implicit schemes are A-stable — , and the spectrum of lies on the negative real axis — so for all ; backward Euler is moreover L-stable () while Crank-Nicolson has [Hairer, E. & Wanner, G. — Solving Ordinary Differential Equations II: Stiff and Differential-Algebraic Problems (2nd ed.)].

Theorem 2 (consistency orders of the -method). The -method has local truncation error , so it is for and for , the Crank-Nicolson value, where the term cancels. Forward and backward Euler () are first order in time; Crank-Nicolson is second. The space order is throughout, inherited from the second-difference operator of 43.11.01 [LeVeque, R. J. — Finite Difference Methods for Ordinary and Partial Differential Equations: Steady-State and Time-Dependent Problems].

Theorem 3 (convergence by the discrete Duhamel/Lax synthesis). For the global error satisfies the recursion with , whence . Power-boundedness (Theorem 1, in the stable regime) gives , so the global error is bounded by times the truncation error: for the Euler schemes and for Crank-Nicolson. This is the discrete-Duhamel form of the continuous variation-of-constants representation of 02.13.03, and the abstract version of the Lax-Richtmyer theorem 43.11.05 [Thomée, V. — Galerkin Finite Element Methods for Parabolic Problems (2nd ed.)].

Theorem 4 (smoothing and the L-stability advantage for rough data). The continuous heat semigroup smooths: , so high modes are annihilated instantly. A fully discrete scheme inherits a discrete smoothing estimate only when is L-stable, . Backward Euler enjoys this and converges at its full rate for non-smooth initial data; Crank-Nicolson, with , fails the discrete smoothing estimate and exhibits persistent oscillations from under-resolved high modes unless the data are smooth or the first steps are damped (Rannacher time-stepping: a few backward-Euler steps before switching to Crank-Nicolson) [Thomée, V. — Galerkin Finite Element Methods for Parabolic Problems (2nd ed.)].

Synthesis. The method of lines is the device that makes a parabolic PDE into an object the entire numerical-ODE apparatus already controls, and the foundational reason the time step behaves as it does is that the spatial operator of 43.11.01 is symmetric negative definite with spectrum stretched from to : this single spectral fact carries the stiffness, the parabolic restriction , the unconditional stability of the A-stable implicit schemes, and the smoothing that separates L-stable backward Euler from merely A-stable Crank-Nicolson. This is exactly the eigen-decoupling of 43.10.04 specialised to — each discrete eigenvalue becomes one scalar test equation, and must land in the integrator's stability region — and it is dual to the elliptic theory of 43.11.01, where the same matrix's smallest eigenvalue set the conditioning while here its largest sets the time-step budget.

The central insight is that convergence is again the product of a consistency order, computed from a Taylor expansion separating the temporal and spatial errors, with a stability bound, the power-boundedness ; putting these together yields the and rates by a discrete Duhamel sum that generalises the continuous variation-of-constants formula of 02.13.03. The bridge to the wider FD-PDE theory is that this concrete eigenvalue computation is the special case in which the power-boundedness hypothesis of the Lax-Richtmyer equivalence theorem 43.11.05 is verified by an explicit spectral decomposition, the same hypothesis that the Fourier amplification analysis of 43.11.03 verifies mode by mode for constant-coefficient schemes on the whole line.

Full proof set Master

Proposition 1 (spectral characterisation of stability). Let be real symmetric with orthonormal eigenbasis and eigenvalues , and let be rational and analytic on . Then , and the scheme satisfies for all if and only if for every .

Proof. Diagonalise with orthogonal () and . For a rational analytic on the spectrum, with . An orthogonal similarity preserves the spectral norm, so , the largest diagonal modulus of a diagonal matrix. Iterating, , so . This is for all iff , i.e. for every , which is for every ; and then . Conversely if some then and the data grows as .

Proposition 2 (the explicit restriction is exactly ). For FTCS, , applied to the heat semidiscretisation, holds for all admissible if and only if .

Proof. By Proposition 1, stability is for all , i.e. . Since , the upper bound is automatic, and the lower bound is , that is with . The strongest constraint is at the largest , namely , where . For a fixed grid the sharp bound is , but since as , the condition that is sufficient on every grid and necessary in the limit is , i.e. . With one has for all , so every and .

Proposition 3 (unconditional stability of the implicit schemes). Backward Euler () and Crank-Nicolson () satisfy for every and every .

Proof. By Proposition 1 it suffices to show for every in the spectrum, and since each . Backward Euler: for , , so . Crank-Nicolson: for , $$ |r(z)|^2 = \frac{(1 + z/2)^2}{(1 - z/2)^2}, \qquad (1 - z/2)^2 - (1 + z/2)^2 = -2z \ge 0, $$ so the denominator dominates the numerator and , with equality only at . In both cases throughout the spectrum, so and for every . The pole of sits at (backward Euler) or (Crank-Nicolson), both off the negative axis, so is well defined: and are positive definite, hence invertible, for every .

Proposition 4 (global error bound: consistency + stability ⇒ convergence). Let be smooth enough that for the -method ( for , for ), and suppose the scheme is stable, for . Then .

Proof. The exact solution satisfies by the definition of (insert into the one-step form and collect the residual), while . Subtract: the error obeys with . Unrolling the recursion, $$ E^n = -k\sum_{j=0}^{n-1} r(kA_h)^{,n-1-j},\tau^j . $$ Take norms and use stability : $$ |E^n|2 \le k\sum{j=0}^{n-1}|\tau^j|_2 \le n k,\max_j|\tau^j|_2 = t_n \max_j|\tau^j|_2 \le T,C(k^p + h^2). $$ Hence the global error is , uniformly for , which is the stated convergence rate.

Connections Master

  • The elliptic finite-difference unit 43.11.01 builds the spatial operator this unit time-steps: the matrix is the negative of the discrete Laplacian assembled there, its sine-mode eigenvectors and eigenvalues are taken directly from that unit's spectral theorem, and where the elliptic unit used the smallest eigenvalue () to fix the conditioning , this unit uses the largest () to fix the parabolic time-step restriction. The two units are the steady-state and time-dependent faces of the same matrix.

  • The stiffness and A-stability theory of 43.10.05 is the lens through which the semidiscrete system is read: is the canonical stiff system, its eigenvalue spread is the textbook source of stiffness, and the A-stability that makes backward Euler and Crank-Nicolson unconditionally usable here, together with the L-stability that distinguishes them on rough data, are exactly the properties classified in that unit. The parabolic method of lines is the principal PDE application of stiff-ODE stability theory.

  • The absolute-stability and stability-region machinery of 43.10.04 supplies the eigen-decoupling that turns matrix stability into a scalar condition: each must lie in the integrator's region , the forward-Euler interval yielding and the A-stable left half-plane yielding no restriction. The stability functions , , used throughout this unit are the very objects defined there.

  • The continuous heat equation 02.13.03 is the problem being discretised: its heat kernel, its Duhamel/variation-of-constants representation, and its eigenfunction decay are the continuous facts the semidiscrete decay and the discrete Duhamel error sum of Proposition 4 approximate. The smoothing estimate that separates L-stable from A-stable schemes is the discrete shadow of the parabolic smoothing of the continuous semigroup.

  • The von Neumann stability analysis of 43.11.03 is the constant-coefficient Fourier counterpart of the eigenvalue argument here: where this unit diagonalises the finite matrix by sine modes on a bounded interval, the next unit substitutes a Fourier mode into the constant-coefficient scheme on the whole line and reads stability from the amplification factor , recovering the same restriction from . Both feed the Lax-Richtmyer equivalence theorem 43.11.05, whose power-boundedness hypothesis this unit verifies by an explicit spectral decomposition.

Historical & philosophical context Master

The idea of discretising only the space variables of a partial differential equation, leaving a system of ordinary differential equations in time, was used by Erich Rothe in 1930 for parabolic problems — the Rothe method of horizontal lines — and the complementary method of lines that discretises space and integrates the resulting ODE system in time became a standard computational technique through the 1960s, formalised in the monograph literature and in W. E. Schiesser's later systematic treatment. The explicit forward-time centred-space scheme and its stability limit for the heat equation were already implicit in the foundational 1928 analysis of Richard Courant, Kurt Friedrichs, and Hans Lewy [Courant, Friedrichs & Lewy 1928], whose work on difference equations of mathematical physics identified the constraint linking the time and space steps that the next unit recasts as the CFL condition.

The unconditionally stable implicit scheme that bears their names was introduced by John Crank and Phyllis Nicolson in their 1947 paper A practical method for numerical evaluation of solutions of partial differential equations of the heat-conduction type (Proceedings of the Cambridge Philosophical Society 43, 50–67) [Crank & Nicolson 1947], motivated by the need to integrate heat-conduction problems without the punishing explicit step restriction. The systematic stability theory for these schemes — eigenvalue decoupling, A-stability, and the smoothing estimates that distinguish backward Euler from Crank-Nicolson on non-smooth data — was consolidated in the numerical-analysis literature by Vidar Thomée in Galerkin Finite Element Methods for Parabolic Problems (Springer, 1984; 2nd ed. 2006) [Thomée, V. — Galerkin Finite Element Methods for Parabolic Problems (2nd ed.)] and, on the stiff-ODE side, by Ernst Hairer and Gerhard Wanner [Hairer, E. & Wanner, G. — Solving Ordinary Differential Equations II: Stiff and Differential-Algebraic Problems (2nd ed.)].

Bibliography Master

@book{leveque2007fdmparabolic,
  author    = {LeVeque, Randall J.},
  title     = {Finite Difference Methods for Ordinary and Partial Differential Equations: Steady-State and Time-Dependent Problems},
  publisher = {Society for Industrial and Applied Mathematics (SIAM)},
  year      = {2007}
}

@article{cranknicolson1947,
  author  = {Crank, John and Nicolson, Phyllis},
  title   = {A practical method for numerical evaluation of solutions of partial differential equations of the heat-conduction type},
  journal = {Proceedings of the Cambridge Philosophical Society},
  volume  = {43},
  number  = {1},
  year    = {1947},
  pages   = {50--67}
}

@article{courantfriedrichslewy1928parabolic,
  author  = {Courant, Richard and Friedrichs, Kurt and Lewy, Hans},
  title   = {{\"U}ber die partiellen Differenzengleichungen der mathematischen Physik},
  journal = {Mathematische Annalen},
  volume  = {100},
  number  = {1},
  year    = {1928},
  pages   = {32--74}
}

@book{thomee2006galerkin,
  author    = {Thom\'{e}e, Vidar},
  title     = {Galerkin Finite Element Methods for Parabolic Problems},
  edition   = {2},
  series    = {Springer Series in Computational Mathematics},
  volume    = {25},
  publisher = {Springer-Verlag},
  year      = {2006}
}

@book{hairerwanner1996parabolic,
  author    = {Hairer, Ernst and Wanner, Gerhard},
  title     = {Solving Ordinary Differential Equations II: Stiff and Differential-Algebraic Problems},
  edition   = {2},
  series    = {Springer Series in Computational Mathematics},
  volume    = {14},
  publisher = {Springer-Verlag},
  year      = {1996}
}

@book{iserles2009firstparabolic,
  author    = {Iserles, Arieh},
  title     = {A First Course in the Numerical Analysis of Differential Equations},
  edition   = {2},
  publisher = {Cambridge University Press},
  year      = {2009}
}

@book{strang2007cseparabolic,
  author    = {Strang, Gilbert},
  title     = {Computational Science and Engineering},
  publisher = {Wellesley-Cambridge Press},
  year      = {2007}
}