Crank-Nicolson scheme
It is possible to combine the implicit and explicit methods in a slightly more general
approach. Introducing a parameter
\theta (the so-called
\theta -rule) we can set up
an equation
\begin{equation}
\tag{9}
\frac{\theta}{\Delta x^2}\left(u_{i-1,j}-2u_{i,j}+u_{i+1,j}\right)+
\frac{1-\theta}{\Delta x^2}\left(u_{i+1,j-1}-2u_{i,j-1}+u_{i-1,j-1}\right)=
\frac{1}{\Delta t}\left(u_{i,j}-u_{i,j-1}\right),
\end{equation}
which for
\theta=0 yields the forward formula for the first derivative and
the explicit scheme, while
\theta=1 yields the backward formula and the implicit
scheme. These two schemes are called the backward and forward Euler schemes, respectively.
For
\theta = 1/2 we obtain a new scheme after its inventors, Crank and Nicolson.
This scheme yields a truncation in time which goes like
O(\Delta t^2) and it is stable
for all possible combinations of
\Delta t and
\Delta x .