Crank-Nicolson diffusion scheme (source code)

= Crank-Nicolson diffusion scheme
{c}

For the centered spatial second difference, the Crank-Nicolson diffusion scheme has amplification factor
$$
G(\theta)=\frac{1-2\mu\sin^2(\theta/2)}
{1+2\mu\sin^2(\theta/2)}.
$$
It is stable for every $\mu\geq0$.