3.3 Approximation of the First Derivative
47
than central-difference approximations. If the variable values a t all grids were
known, we can compute the derivatives a t all nodes on a grid line by solving
the tridiagonal system (see Chap. 5 for details on how this can be done).
We shall see, in Sect. 5.6, that these schemes can also be applied in implicit
methods. This issue will be addressed again in Sect. 3.7.
The schemes derived here are only a few of the possibilities; extensions
to higher order and multi-dimensional approximations are possible. It is also
possible to derive schemes for non-uniform grids but the coefficients are particular to the grid, making them rather impractical.
3.3.4 Non-Uniform Grids
Since the truncation error depends not only on the grid spacing but also on
the derivatives of the variable, we cannot achieve a uniform distribution of
discretization error on a uniform grid. We therefore need to use a non-uniform
grid. The idea is to use a smaller Ax in regions where the derivatives of the
function are large and a larger Ax in regions where the function is smooth. In
this way, it should be possible to spread the error nearly uniformly over the
domain, thus obtaining a better solution for a given number of grid points. In
this section, we will discuss the accuracy of finite difference approximations
on non-uniform grids.
In some approximations, the leading term in the truncation error expression becomes zero when the spacing of the points is uniform, i.e. xi+l - xi =
xi - xi-1 = Ax. This is the case for the CDS approximation, see Eq. (3.6).
Even though different approximations are formally of the same order for nonuniform spacing, they do not have the same truncation error. Moreover, the
rate a t which the error decreases when the grid is refined does not deteriorate
when CDS is applied t o non-uniform grids, as we shall now show.
To demonstrate this point, on which there is some confusion in the literature, note that the truncation error for the CDS is:
where we have used the notation (see Fig. 3.2):
The leading term is proportional to Ax, but becomes zero when Axi+l =
Axi. This means that the more non-uniform the mesh spacing, the larger the
error.
Let us assume that the grid expands or contracts with a constant factor
re. This is called a compound interest grid; for it:
Précédent

- 60/779

Suivant