Next: An improved 1d diffusion
Up: The diffusion equation
Previous: von Neumann stability analysis
The CrankNicholson scheme
Let us revisit our temporal differencing scheme:

(210) 
Note that the righthand side is evaluated entirely at the start
of the timestep: i.e., at . This type of
temporal differencing scheme is termed an explicit scheme. Now, explicit schemes are
very straightforward to implement, but are also notoriously prone to numerical instabilities.
Fortunately, we can often overcome these instabilities by making our differencing
scheme implicit in nature. An implicit scheme is one in which the righthand
side is evaluated partly (or wholly) at the end of the timestep: i.e., at .
Unfortunately, implicit schemes are generally a great deal more complicated to implement
than explicit schemes.
The wellknown CrankNicholson implicit method for solving the diffusion equation involves
taking the
average of the righthand side between the beginning and end of the timestep. In other words,

(211) 
As indicated by the error term, this method is actually secondorder in time.
Adopting our usual spatial differencing scheme, the above expression yields

(212) 
When we perform a von Neumann stability analysis of the above scheme, we obtain the
following expression for the amplification factor:

(213) 
Note that for all values of . It follows that the CrankNicholson
scheme is unconditionally stable. Unfortunately, Eq. (212) constitutes
a tridiagonal matrix equation linking the and the . Thus, the
price we pay for the high accuracy and unconditional stability of the CrankNicholson
scheme is having to invert a tridiagonal matrix equation at each timestep. Usually,
this price is well worth paying.
Next: An improved 1d diffusion
Up: The diffusion equation
Previous: von Neumann stability analysis
Richard Fitzpatrick
20060329