Crank--Nicolson method (source code)

= Crank--Nicolson method
{c}
{wiki=Crank–Nicolson_method}

The Crank--Nicolson method applies the <trapezoidal rule> to a semidiscrete evolution equation. For a linear system $u'=Lu$ its update is
$$
\left(I-\frac h2L\right)u^{n+1}=\left(I+\frac h2L\right)u^n.
$$