Numerical Methods for PDEs

the Crank-Nicolson scheme

/ KRANK NIK-ol-son /

FTCS is cheap but shackled by a tiny time step; backward Euler is unconditionally stable but only first-order accurate in time, so it is a little blurry. Crank–Nicolson is the elegant compromise that gets the best of both: it is unconditionally stable AND second-order accurate in both space and time. The idea is simply to evaluate the spatial part halfway between the old and new time levels — to take the average of the explicit and implicit updates.

For u_t = k u_xx, write the time derivative as a forward difference (u_new - u_old)/dt, but apply the spatial stencil as the AVERAGE of its value at the old time and at the new time: (u_new - u_old)/dt = (k/2)(u_xx at old + u_xx at new). Because the new-time term mixes neighbouring new values, you can no longer compute u_new point by point — at each step you must solve a linear system that couples all the new values together. In one space dimension that system is tridiagonal and is solved very fast by the Thomas algorithm. This makes the scheme 'implicit': you pay the cost of a solve per step, but you may take large time steps without blowing up.

Where it shines: long-time diffusion problems where you want accuracy without the FTCS step-size straitjacket. The honest caveat is that 'unconditionally stable' is not the same as 'always well-behaved'. Crank–Nicolson does not strongly damp the highest-frequency error modes — its amplification factor for them is near -1 — so a sharp jump or a discontinuous initial profile can produce persistent, slowly-decaying oscillations (sometimes called ringing). For very rough data, a few steps of backward Euler first, or a slightly more dissipative variant, is the usual remedy.

Heat a rod whose initial profile is a sharp top-hat. FTCS needs dt <= h^2/2 and crawls; Crank–Nicolson lets you take dt comparable to h and reaches the same final time in far fewer steps, at the price of solving a tridiagonal system each step — but watch for slight wiggles near the original jump.

Second-order and unconditionally stable, but lightly damped — beware ringing near discontinuities.

Unconditional STABILITY does not mean unconditional ACCURACY: a huge time step on Crank–Nicolson stays bounded but can be quite wrong. Stability bounds growth; it does not bound error.

Also called
Crank–Nicolson methodtrapezoidal scheme in time克蘭克-尼科森方法時間梯形格式