Computing Library › Solvers Methods
Solvers Methods

The Crank-Nicolson Method

Crank-Nicolson averages explicit and implicit evaluations to reach second-order accuracy in time with unconditional linear stability.

The trapezoidal rule in time

The Crank-Nicolson method integrates a time-dependent PDE by averaging the right-hand side at the current and next time levels: u_{n+1} = u_n + (dt/2)[f(u_n) + f(u_{n+1})]. It is the trapezoidal rule applied in time and, for the heat equation and similar diffusion problems, combines two attractive properties: second-order accuracy in the time step and unconditional stability for linear problems.

Because it involves f at the new level, Crank-Nicolson is implicit and requires a linear (or nonlinear) solve each step, but the payoff is that the step size is set by accuracy rather than by a stability limit.

Kronos motion — confinement time

A-stable but not L-stable

Crank-Nicolson is A-stable: no linear mode grows for any step size. It is not L-stable, however, so very fast decaying modes are damped only weakly and can produce slowly decaying oscillations when the initial data or forcing is not smooth. When such oscillations are troublesome, a few backward-Euler steps at the start (Rannacher smoothing) or a shift toward a more strongly damping scheme restores clean behavior.

Use and variants

The method is a standard choice for parabolic problems needing better accuracy than backward Euler without the step limit of explicit schemes. The theta-method generalizes it: theta = 0 gives forward Euler, theta = 1 backward Euler, and theta = 1/2 Crank-Nicolson, letting a single parameter trade accuracy for damping.

Crank-Nicolson and its theta-method relatives appear throughout diffusion-dominated transport modeling where second-order temporal accuracy without a restrictive step limit is desired.