Consider the IBVP

If **N** interior grid points are used, then
and , .
If we select the explicit method Eq. 21, a complete set of
FDEs for the example IBVP is

Note how the boundary conditions are incorporated into the **n = 0** and
**n = N+1**
difference equations.
In a computer program the difference equations can be dealt with
in a single loop if arrays holding **U** are dimensioned large enough to admit
a 0-index and
an -index with zero boundary conditions stored in these positions.