© 2026 NeckPinch · www.neckpinch.com · All rights reserved.
Course 6Book 6D: Diffusions, Finance and ComputationChapter 9
Finite Difference Methods
Explicit, implicit and Crank–Nicolson schemes, consistency, stability and the Lax equivalence theorem.
Read with Morton and Mayers, Numerical Solution of Partial Differential Equations (chapters 2–5: parabolic equations, stability and convergence, hyperbolic equations), or LeVeque, Finite Difference Methods for Ordinary and Partial Differential Equations (chapters 9–10); Jost, Partial Differential Equations, section 4.1 (the discrete Laplacian and its maximum principle); and Taylor I, chapter 3 (Fourier series, including the discrete Fourier transform). Wilmott, Howison and Dewynne, The Mathematics of Financial Derivatives, chapter 8, treats the Black–Scholes grid. This chapter proves the truncation error estimates, stability by the discrete maximum principle and by von Neumann analysis, the convergence theorem (the easy half of Lax equivalence), the CFL condition, and the Thomas algorithm; the full Lax equivalence theorem is stated. The numerical results quoted were computed for this chapter.
In this chapter · 10 sections
- 9.1Forecasting the weather by hand
- 9.2Grids and truncation error
- 9.3Stability by the maximum principle
- 9.4Von Neumann analysis
- 9.5Convergence: the Lax equivalence theorem
- 9.6Solving the implicit equations: the Thomas algorithm
- 9.7Transport, waves and the CFL condition
- 9.8Spectral methods and the FFT
- 9.9History
- 9.10Exercises
- ↗Free resources
Most PDE cannot be solved by formula, and even when they can (the heat equation, Black–Scholes) the formula is often less useful than a number. Finite difference methods replace derivatives by difference quotients on a grid and the PDE by a large system of algebraic equations. They are the oldest and most transparent numerical methods for PDE, they are what most option pricing software does when no formula exists, and they carry the analytic ideas of Course 6 into the discrete world: the maximum principle becomes a condition on the time step, Fourier analysis becomes von Neumann stability analysis, and well-posedness becomes stability.
The central lesson is the Lax equivalence theorem: a consistent scheme converges if and only if it is stable. Consistency (the scheme approximates the PDE) is easy to check by Taylor expansion and almost never fails. Stability (errors do not grow) is the real constraint, and ignoring it gives nonsense: the explicit scheme for the heat equation, run with a time step above its stability limit, turns an option price of into about , and above, into (Exercise 9.13).
By the end of this chapter you will be able to:
- derive the explicit, implicit and Crank–Nicolson schemes for the heat equation and compute their truncation errors;
- prove stability of the explicit scheme for by the discrete maximum principle, and compute amplification factors by von Neumann analysis;
- prove that a consistent, stable scheme converges with the order of its truncation error;
- explain the CFL condition for transport and wave equations, and why upwinding is needed;
- solve tridiagonal systems in linear time, and set up a Black–Scholes solver in log-price with correct boundary conditions;
- describe spectral methods and the FFT.
Forecasting the weather by hand
During the First World War, while serving as an ambulance driver on the Western Front, Lewis Fry Richardson computed a weather forecast by hand. He took the observed state of the atmosphere over central Europe at 7 a.m. on 20 May 1910, discretised the equations of fluid dynamics on a grid of cells, and stepped them forward six hours. The calculation took him weeks. His result, published in Weather Prediction by Numerical Process (1922), predicted a surface pressure change of about hectopascals in six hours at one point, an absurd value: real pressure changes over six hours are a few hectopascals. The failure is now understood to come mainly from imbalances in the initial data, which excited fast gravity waves that the equations then amplified, a stability problem of the kind this chapter analyses.
In 1928 Richard Courant, Kurt Friedrichs and Hans Lewy explained one essential constraint: an explicit scheme cannot converge unless its time step is small enough that the numerical domain of dependence contains the true one (the CFL condition). John von Neumann developed Fourier stability analysis at Los Alamos in the 1940s, and in 1950 Jule Charney, Ragnar Fjørtoft and von Neumann made the first successful computer forecast, on the ENIAC, using a simplified equation chosen to filter out the fast waves. Modern weather and climate models, and the solvers behind every engineering simulation, rest on the stability theory that grew out of these episodes.
Grids and truncation error
Consider the heat equation on , , with and . Choose a space step and a time step , grid points , , and approximations . The basic difference quotients are
The ratio
will govern stability: the heat equation's scaling (6A.3 The Heat Equation on ℝⁿ) says one unit of time is worth two units of space, and so does the grid.
The explicit (forward Euler) scheme evaluates at the old time level:
The truncation error is what is left when the exact solution is put into the scheme, written as an approximation of the PDE:
A scheme is consistent if as , and has order if .
If is smooth, , evaluated at . In particular : the scheme is first order in time and second order in space.
Proof. By Taylor's theorem in , . In , , and adding, the odd terms cancel: for some (by the intermediate value theorem applied to the average of the two fourth derivatives). Subtract, and use .
If , the leading terms cancel: since for the heat equation, , and the scheme becomes fourth order in space, a curiosity known since the 1950s.
Stability by the maximum principle
If , the explicit scheme (E) satisfies the discrete maximum principle , and its error satisfies
Proof. Rewrite (E) as . For the coefficients are non-negative and sum to : each new value is a weighted average of old values, so it lies between their minimum and maximum (with the zero boundary values included). That is the discrete maximum principle, the counterpart of 6A.5 Maximum Principles.
The exact solution satisfies the same scheme up to the truncation error: . Subtracting, the error satisfies
with and zero boundary errors. By the averaging property, , and summing over steps gives the bound.
The proof has a structure worth isolating, because it is general: the error obeys the scheme with the truncation error as a source, and stability (the scheme does not amplify) turns a bound on the source into a bound on the solution, accumulated over steps. Each step contributes , and there are of them, so the global error is of the same order as the local truncation error.
If the coefficient is negative, the averaging property is lost, and the scheme is unstable: the grid mode is multiplied by at every step (Exercise 9.6).
Von Neumann analysis
On a periodic grid (or ignoring boundaries), every scheme with constant coefficients maps the discrete Fourier mode () to a multiple , where the amplification factor is found by substitution. For the explicit scheme,
Since a general grid function is a sum of modes (the discrete Fourier transform), and the scheme acts on each independently, the scheme is stable in exactly when for all : the von Neumann condition (for single-step scalar schemes with constant coefficients it is necessary and sufficient; Morton and Mayers, section 2.7). For (E), ranges over , and iff , the same condition the maximum principle gave. The most dangerous mode is , the sawtooth , which no smooth solution contains but rounding errors always do.
Implicit schemes. The backward Euler scheme evaluates at the new time level,
with : unconditionally stable, for every . It also satisfies the discrete maximum principle for every (Exercise 9.7). The price is that each step requires solving a linear system, and the truncation error is still . The Crank–Nicolson scheme (John Crank and Phyllis Nicolson, 1947) averages the two:
It is centred at , hence second order in time, , and for all . But as , : high-frequency modes are not damped but flip sign at every step. For smooth data this is harmless; for data with a kink, like an option payoff, it produces slowly decaying oscillations near the kink, visible in the computed delta and gamma. The standard cure (Rolf Rannacher, 1984) is to take the first few steps with backward Euler, which damps high frequencies strongly, and then switch to Crank–Nicolson.
Convergence: the Lax equivalence theorem
Write a linear one-step scheme as (for implicit schemes includes the inverse of the implicit matrix), with acting on grid functions with some norm . The scheme is stable if for , uniformly as along the chosen refinement path (for example fixed).
If the scheme is stable with constant and the exact solution satisfies with , then for ,
Conversely (the Lax equivalence theorem, Peter Lax and Robert Richtmyer, 1956; statement), for a consistent scheme approximating a well-posed linear initial value problem, convergence for all initial data implies stability.
Proof. The error satisfies with , so and .
The converse is a consequence of the uniform boundedness principle (4A.2 Baire Category and Its Consequences): if the scheme converged for every initial value but were unbounded, Banach–Steinhaus would produce initial data for which the computed solutions are unbounded, contradicting convergence. So for linear problems the theory is complete: convergence = consistency + stability, and the work is in proving stability.
In log-price and time to expiry , the Black–Scholes equation (6D.6 Black–Scholes) becomes the constant-coefficient equation
(Exercise 9.10), to be solved forward in from the payoff . Truncate to with (five standard deviations of the log-price) and impose the asymptotic values of a call at the ends: for very low prices and for very high ones. With , , , , centred differences in and Crank–Nicolson in , using space intervals and time steps, the computed at-the-money price differs from the exact value by:
| Crank–Nicolson error | Backward Euler error | |
|---|---|---|
Each halving of the steps divides the Crank–Nicolson error by , as second order predicts. The backward Euler error is dominated by its time error and falls more slowly. With the explicit scheme on the grid, stability requires , that is time steps: with the error is ; with the computed price is about ; with , about .
Solving the implicit equations: the Thomas algorithm
Implicit schemes in one space dimension require, at each time step, the solution of a tridiagonal system
(with after the boundary values are moved to the right side). Gaussian elimination without pivoting, organised as one forward sweep and one backward sweep, solves it in operations:
This is the Thomas algorithm (Llewellyn Thomas, 1949). It is stable, with no pivoting needed, when the matrix is diagonally dominant, (Exercise 9.9), which is the case for the implicit heat and Black–Scholes matrices: their diagonal is (plus ) and off-diagonals (plus small drift terms). So an implicit step costs about as much as an explicit one, and the restriction disappears. In two or more space dimensions the systems are no longer tridiagonal, and one uses alternating direction implicit (ADI) splittings, which reduce each step to tridiagonal solves in one direction at a time, or iterative solvers.
Transport, waves and the CFL condition
For the transport equation (), information travels to the right at speed (6B.1 First-Order Equations and Characteristics). The explicit scheme with a centred space difference,
has , with : it is unconditionally unstable, for every time step. The upwind scheme differences in the direction the information comes from,
a weighted average when , hence stable in the maximum norm, and first order accurate.
An explicit scheme in which depends only on cannot converge for all initial data unless the exact domain of dependence of each grid point is contained in the numerical one. For with the upwind or Lax–Friedrichs stencil (), this is
Proof. After steps, depends only on initial values in , while the exact solution at is . If , i.e. , the point lies outside the numerical domain of dependence. Changing near that point changes the exact solution but not the numerical one, so the scheme cannot converge for both data.
The CFL condition is necessary, not sufficient (the centred scheme satisfies it and is still unstable). For the wave equation the standard leapfrog scheme is stable exactly when (Exercise 9.11). Note the different scalings: for hyperbolic problems an explicit scheme needs , for parabolic problems , which is why explicit schemes are natural for waves and implicit ones for diffusion.
Spectral methods and the FFT
For smooth periodic problems, finite differences can be replaced by spectral methods: expand the solution in Fourier modes, , differentiate exactly (), and truncate to . For the heat equation on the circle this solves the problem exactly mode by mode, (6A.6 Weak Solutions and Elliptic Regularity). For smooth solutions the truncation error decays faster than any power of , exponentially for analytic solutions, compared with the fixed algebraic rates of finite differences. Nonlinear terms are computed pointwise on the grid and transformed back (pseudospectral methods).
What makes this practical is the fast Fourier transform: the discrete Fourier transform of values costs operations directly but only if is a power of , by splitting the sum into even and odd and recursing (Exercise 9.12). James Cooley and John Tukey published the algorithm in 1965 (Gauss had found it around 1805, in unpublished work on asteroid orbits). In finance, the FFT computes option prices for whole ranges of strikes at once from a model's characteristic function (6D.10 Monte Carlo, Fourier and Finite Element Methods).
The simulations of neckpinches and other singularities of Ricci flow, by David Garfinkle and James Isenberg and others, discretise the rotationally symmetric flow, a parabolic system in one space variable, by finite differences. They face exactly the constraints of this chapter: the explicit stability condition involves the local diffusion coefficient, which grows as curvature concentrates, so the time step must shrink near a singularity (Exercise 9.14). Mean curvature flow is computed by finite elements (6D.10 Monte Carlo, Fourier and Finite Element Methods) or level sets with monotone schemes, which converge to viscosity solutions (6C.9 Hamilton–Jacobi Equations and Viscosity Solutions).
History
Richardson's numerical weather prediction appeared in 1922 and Courant, Friedrichs and Lewy's paper in 1928. John Crank and Phyllis Nicolson published their scheme in 1947. Von Neumann's stability analysis was developed at Los Alamos in the 1940s and described in print around 1950, the year of the ENIAC forecast. Llewellyn Thomas's tridiagonal algorithm dates from 1949, the Lax–Richtmyer equivalence theorem from 1956, and the Cooley–Tukey FFT from 1965. Brennan and Schwartz brought finite differences to option pricing in 1977–78.
Finite difference schemes replace derivatives by difference quotients; their truncation error, found by Taylor expansion, is for explicit and backward Euler and for Crank–Nicolson. The explicit heat scheme is a weighted average, hence stable and convergent, iff ; von Neumann analysis gives the amplification factors , and . Consistency plus stability gives convergence with error (and conversely, by Lax equivalence). Tridiagonal systems cost by the Thomas algorithm. For transport, centred explicit schemes are unstable, upwinding works for , and the CFL condition is necessary for every explicit scheme. A Black–Scholes solver in log-price with Crank–Nicolson converges at second order. Spectral methods with the FFT converge faster than any power for smooth periodic problems. 6D.10 Monte Carlo, Fourier and Finite Element Methods covers the other two pillars of computation: Monte Carlo and finite elements.
Exercises
Apply (E) on a periodic grid with to the initial data . Show that , and compute the size after steps for (a rounding error). What is the exact solution of the heat equation with data of this kind as ?
Solution
. After steps the amplitude is ; after steps, . The exact heat flow damps the mode by , essentially instantly: the scheme turns the most strongly damped mode into the most strongly amplified.
Show that the backward Euler scheme satisfies for every (with zero boundary values). (Look at the index where is largest.)
Solution
Let be maximal at , say . Then , so . The case of a negative minimum is symmetric.
(a) Show that for the Crank–Nicolson amplification factor for all and . (b) From the table in Example 9.4, estimate the order of convergence of each scheme from consecutive errors. (c) Use Richardson extrapolation on the Crank–Nicolson values at and : if the error is , then removes the leading error. Compute the extrapolated error.
Solution
(a) With , . (b) Crank–Nicolson: , , so order . Backward Euler: ratios about , , , approaching (first order) as the error dominates. (c) Errors , : , which is below : a thousandfold improvement at no extra cost.
(a) Derive the recursion of the Thomas algorithm from Gaussian elimination. (b) Show by induction that if for all then , so the denominators never vanish. (c) Count the operations.
Solution
(a) Eliminating from equation using the reduced equation gives ; divide by the coefficient of . (b) ; if then , so . (c) About arithmetic operations: linear in , compared with for a dense solve.
With and , show that becomes . Why is a uniform grid in better than a uniform grid in ?
Solution
and , and . Substituting gives the stated equation, with constant coefficients. A uniform -grid is geometric in : fine near small prices, coarse far out, matching the scale of relative price changes; and constant coefficients make the stability analysis of this chapter apply directly.
For , substitute to get with . Show that both roots have modulus for all iff , and that otherwise one root has modulus greater than .
Solution
The roots have product . With , they are complex conjugates of modulus when , and real with one of modulus when . Since always, the condition is , i.e. for all , i.e. .
For , write the DFT , , as , where and are the DFTs of length of the even- and odd-indexed entries. Deduce the cost recursion and hence .
Solution
, and , so the two sums are length- DFTs (periodic in with period ). Combining them for all values of costs . Unrolling over levels gives .
In Example 9.4, the explicit scheme with and diffusion coefficient has . Compute for , , and time steps over one year, and predict from the amplification factor of the sawtooth mode, , how fast errors grow per step in the unstable cases.
Solution
, so : , , , . The sawtooth factor is , , , . For errors grow by about per step, about overall from tiny rounding and kink errors; for , by . That matches the computed failures ( and ) in order of magnitude.
On a surface, Ricci flow of a conformal metric is the equation (11A.12 Ricci Flow on Surfaces). Discretise on a square grid with spacing and the explicit scheme , with the five-point Laplacian. (a) Freezing the coefficient, show that the scheme is a weighted average at each point if , i.e. . (b) The Gaussian curvature is ; where the metric is shrinking, is decreasing. Explain why the allowed time step shrinks as a region of the surface contracts, and why simulations of singularities (like a neckpinch) need adaptive time steps or implicit schemes.
Solution
(a) with ; the coefficients are non-negative iff . (b) The diffusion coefficient is the inverse of the metric's conformal factor: as a region shrinks (), the effective diffusion in coordinates speeds up, the allowed falls like , and a fixed time step eventually violates stability before the singular time. Simulations therefore adapt to the current solution (or rescale, or use implicit steps), just as the analysis of singularities rescales by the curvature (11B.1 Ricci Solitons).
Free resources for this chapter
Chosen for what this chapter covers, and all free to read. Links checked Oct 20, 2026.
- Reference Finite difference methodWikipediaDifference quotients, truncation error and stability.
- Reference Crank–Nicolson methodWikipediaThe Crank–Nicolson scheme for diffusion equations.
- Reference Von Neumann stability analysisWikipediaFourier analysis of the stability of difference schemes.
- Reference Courant–Friedrichs–Lewy conditionWikipediaThe CFL condition for explicit schemes.
- Reference Tridiagonal matrix algorithmWikipediaThe Thomas algorithm.
© 2026 NeckPinch (www.neckpinch.com). All content in the guidebook (text, mathematics, figures and exercises) is protected by copyright. All rights reserved. No part may be copied, republished or redistributed without written permission.