An Alternative Numeric Scheme for Implicit Diffusion

To implement the standard implicit scheme for fixed boundary conditions, we need to solve a system of linear equations that looks like this (here written for only five samples in , but the structure should be clear).

This is a specific case of the general tridiagonal system.

We can use Gaussian elimination to systematically remove all off-diagonal elements. First, to get rid of , multiply the first row by and subtract it from the second.

We can write this as

where and .

To knock out , we multiply the second row by and subtract from the third. Thus , and . After repeating this process for all remaining rows, we end up with

where

Now we remove the entries above the diagonal, starting with . Multiply the last row by and subtract from the fourth. This doesn’t change , but it does yield . So after doing this times (matrices shown for ), we have

where

Now the solution is evident: .

For our particular system,

where

Plugging things in, we find that