Implicit FTCS scheme

The FTCS scheme is known as an explicit numerical technique. It is explicit since it calculates the new value of the evolving function given the function's known current values. This technique is rather unstable however. In fact, it can be shown for the advection equation that the explicit FTCS scheme is unstable all for values of the time step. All is not lost, since we can use some tricks to have schemes with better stability. One such scheme is the implicit FTCS scheme. The scheme is still forward in time and centred in space however, in a sense, it calculates the next value of the function in time using the next value of the function in time. ``Hang on'', you say, ``but we don't know that yet''. Correct. But, what we can do is just write the equations out as if we knew what the next point in time was and see what happens. What is our motivation or basis for doing this? Well, for sufficiently small time steps, the function changes very little, so $ \mbf{A}^n$ is ``pretty close'' to $ \mbf{A}^{n+1}$, and so using such a trick is not such an evil thing after all.

Using this idea, let's rewrite the matrix form of the diffusion equation, but this time let the $ \mbf{D}$ matrix act on the future value of $ \mbf{A}$:

$\displaystyle \mbf{A}^{n+1} = \mbf{A}^n + \frac{\kappa \Delta t}{\Delta x^2} \mbf{D}\mbf{A}^{n+1}.$ (3.34)

Note that we are only operating the $ \mbf{D}$ matrix on the next point in time--we are still using the current time point for the actual calculation. If we now solve this equation for $ \mbf{A}^{n+1}$ (as we did for the matrix form of the explicit FTCS scheme) we obtain:

$\displaystyle \mbf{A}^{n+1} - \frac{\kappa \Delta t}{\Delta x^2} \mbf{D}\mbf{A}^{n+1}$ $\displaystyle = \mbf{A}^n,$ (3.35)
$\displaystyle \Bigl( \mbf{I}- \frac{\kappa \Delta t}{\Delta x^2} \mbf{D}\Bigr) \mbf{A}^{n+1}$ $\displaystyle = \mbf{A}^n,$ (3.36)
$\displaystyle \mbf{A}^{n+1}$ $\displaystyle = \Bigl( \mbf{I}- \frac{\kappa \Delta t}{\Delta x^2} \mbf{D}\Bigr)^{-1} \mbf{A}^n,$ (3.37)
$\displaystyle \mbf{A}^{n+1}$ $\displaystyle = \mbf{M}\mbf{A}^n.$ (3.38)

Note that on the second to last line the matrix inverse is taken; it is not a division operation.

Again, we see that all we have to do is calculate the relevant $ \mbf{D}$ matrix, construct the matrix $ \mbf{M}$ (which is just a conglomeration of other matrices) and you're away laughing (so-to-speak). Also note that we don't need to alter the code producing the matrix form of the explicit FTCS scheme that much to implement the implicit scheme. We just need to take the matrix inverse, and a plus sign is changed to a minus sign. Now I hope you see the power of using the matrix formalism for numerically representing differential operators.

It turns out that the implicit FTCS scheme is unconditionally stable. This means that it converges to a solution for any time step. This may seem amazing, and yes, it is, but there is a down side: the scheme isn't as accurate as the explicit scheme. To get around this problem we can take something like the ``average'' of the both the implicit and explicit schemes and we can then have the best of both worlds: stability and accuracy. We discuss such a scheme in the next section; it is called the Crank-Nicolson scheme.

Paul Cochrane 2002-04-18