the Crank-Nicolson scheme
/ krank NIK-ol-son /
FTCS computes the spatial term at the OLD time, BTCS at the NEW time. Each is first-order accurate in time and each has a flaw — FTCS is only conditionally stable, BTCS is unconditionally stable but crude. Crank-Nicolson takes the obvious compromise: average the two. By evaluating the spatial stencil halfway between old and new — half at level n, half at level n+1 — it gains a full order of time accuracy while keeping unconditional stability. It is the standard workhorse for the heat equation.
Concretely, you apply the trapezoidal rule in time to u_t = alpha * u_xx: the update equates (u_j^{n+1} - u_j^n) / k to alpha times the AVERAGE of the central second-difference at the new and old levels. Writing D for the second-difference operator and r = alpha * k / h^2, this becomes u_j^{n+1} - (r/2) * D u_j^{n+1} = u_j^n + (r/2) * D u_j^n. The new neighbours appear on the left, so each step again solves a tridiagonal system A u^{n+1} = b — same cost structure as BTCS — but the symmetric centring makes the local truncation error O(k^2 + h^2), second order in both time and space. The scheme is centred at the half-step time level n + 1/2, which is the source of that extra accuracy.
Von Neumann analysis gives an amplification factor (1 - r*(1 - cos)) / (1 + r*(1 - cos)) whose magnitude is at most 1 for all r, so Crank-Nicolson is unconditionally stable: large time steps never blow up. The honest caveat is that this amplification factor approaches -1 (not 0) for high-frequency modes when r is large, so sharp initial features or discontinuities can produce slowly decaying oscillations — non-physical wiggles that ring for many steps. Practitioners damp these by occasionally taking a fully implicit BTCS step (Rannacher startup) or by keeping r moderate. Still, for smooth diffusion problems Crank-Nicolson's second-order accuracy and unconditional stability make it the default choice.
For the heat equation it halves the work of getting second-order time accuracy compared with taking tiny explicit steps: with r = 1 you build a tridiagonal system whose diagonal is 1 + r = 2 and off-diagonals -r/2 = -0.5, right side a similar combination of old values. One Thomas solve per step yields an answer second-order accurate in both k and h — accuracy FTCS could only reach with a far smaller k.
Average old and new: second-order in time, unconditionally stable.
Unconditional stability is not the same as being free of oscillations: for large r the amplification factor tends to -1 (not 0) on the sharpest modes, so step-function or discontinuous initial data can ring for many steps. The cure is to damp the start with a couple of BTCS steps, not to abandon Crank-Nicolson.