von Neumann stability analysis
/ fawn NOY-mahn /
A finite-difference scheme is stable if errors do not grow as you step forward in time — you do not want a tiny round-off blip in one cell to swell into a tidal wave that swamps the answer ten steps later. The question 'do errors grow?' sounds hard, but for linear schemes on a uniform grid there is a wonderfully sharp tool: feed the scheme a single Fourier wave and ask whether it grows or decays. That is von Neumann stability analysis, invented at Los Alamos and still the everyday workhorse for stability.
The idea exploits that any error can be written as a sum of Fourier modes, and a linear scheme treats each mode independently. So you substitute a single mode, error at node j, time level n, of the form g^n * e^(i*theta*j), where theta is the mode's wavenumber (a phase per grid step) and g is the unknown AMPLIFICATION FACTOR — the number by which the mode is multiplied in one time step. Plug it into the scheme; the e^(i*theta*j) factors cancel and you solve for g as a function of theta and the scheme's parameters. The mode grows if |g| > 1 and decays if |g| < 1. The scheme is stable exactly when |g(theta)| <= 1 for EVERY wavenumber theta — no mode is allowed to grow without bound (a tiny growth like 1 + O(k) per step is tolerated, since it sums to a bounded factor over a fixed time).
Worked example: for FTCS on u_t = alpha*u_xx the substitution gives g = 1 - 2r*(1 - cos theta) = 1 - 4r*sin^2(theta/2), with r = alpha*k/h^2. The dangerous mode is theta = pi (the sawtooth, sin^2 = 1), giving g = 1 - 4r. Demanding |1 - 4r| <= 1 yields exactly r <= 1/2 — the FTCS stability limit, derived in three lines. The method's honest limits: it assumes a LINEAR scheme with CONSTANT coefficients on a uniform, periodic (or infinite) grid, and it ignores boundary effects. Despite those caveats it is astonishingly reliable in practice and is the first thing you reach for to find a scheme's time-step restriction.
For BTCS the same substitution gives g = 1 / (1 + 4r*sin^2(theta/2)). Since the denominator is at least 1 for every theta and r > 0, we have |g| <= 1 always — BTCS is unconditionally stable, no restriction on k. Crank-Nicolson gives g = (1 - 2r*sin^2(theta/2)) / (1 + 2r*sin^2(theta/2)), again |g| <= 1 for all r.
Feed in one Fourier mode, solve for its growth factor g, demand |g| <= 1 for all wavenumbers.
Von Neumann analysis assumes a LINEAR, constant-coefficient scheme on a uniform grid and ignores boundaries — it is a necessary condition that becomes sufficient under those assumptions. Real boundary conditions or variable coefficients can destabilize a scheme that passes the von Neumann test, so it is a guide, not an absolute guarantee.