To numerically solve PDEs, it is necessary to discretize the continuous differential equations.
To this end, the space-time domain on which the equations are solved is replaced with a discrete grid of points, the continuous functions
entering the PDEs are replaced with grid functions that take values on the points of the grid and the
derivative operators are replaced by finite difference operators. For the four-dimensional wave equation, the spatial domain
*[ x _{min} ; x_{max} ] × [ y_{min} ; y_{max} ] × [ z_{min} ; z_{max} ] *
is discretized as

In general, in finite difference techniques *dx*, *dy* and *dz* are chosen equal, and the ratio between
*dx ^{i}* and

The finite difference operators can be determined by the following general procedure, which will be exemplified for operator

Solving for *D _{x}* from these two equations gives the
operator corresponding to the first derivative with respect to

This formula is correct to second order in *dx*. In a similar manner, the operator corresponding to the second derivative with respect to
*x*, also accurate to second order in *dx*, can be determined to be:

It should be noted that nesting operators also provides a correct method for determining higher-order operators, although in the case of second
derivatives nesting the above expression for *D _{x}* gives a 5-point stencil
rather than a 3-point stencil. However, nesting operators can be used to provide working formulas for mixed partial derivative operators.

There is a complication worth mentioning regarding finite difference operators. Although the continuous wave equation is valid in the entire spatial domain, operator expressions need not be. For instance, the above expression for

For more information on finite difference techniques, see the lecture notes by Matt Choptuik, given at the

Some of the material presented on this web page is based upon work supported in part by the *Princeton Applied and Computational Mathematics Program*
and by the *National Science Foundation* under * Grant No. 0745779 .
*