## 2.3.1 Finite Difference Approximations

Measurable Outcome 2.3, Measurable Outcome 2.6

Recall how the multi-step methods we developed for ODEs are based on a truncated Taylor series approximation for \(\frac{\partial U}{\partial t}\). Specifically, we can consider each multi-step method as computing \(U\) at discrete instances in time \((t^0, t^1, \ldots , t^ n, \ldots )\) where the derivative \(\left. \frac{\partial U}{\partial t}\right|_ n = U_ t^ n\) is approximated using a combination of \(\left(U^{n+1}, U^ n, U^{n-1}, \ldots \right)\).

Finite difference methods for PDEs are essentially built on the same idea, but approximating spatial derivatives instead of time derivatives. Namely, the solution \(U\) is approximated at discrete instances in space \(\left(x_0, x_1, \ldots , x_{i-1}, x_ i, x_{i+1}, \ldots , x_{N_ x-1}, x_{N_ x}\right)\) where the spatial derivatives \(\left( \left.\frac{\partial U}{\partial x} \right|_ i = U_{x_ i}, \left. \frac{\partial ^2 U}{\partial x^2} \right|_ i = U_{xx_ i} \right)\) are approximated using a combination of \((U_ i, U_{i \pm 1}, U_{i \pm 2}, \ldots )\).

In the following we derive a finite difference approximation of \(\frac{\partial U}{\partial x}\) at node \(x_ i\). For a differentiable function \(U\), the derivative at the point \(x_ i\) is given by:

The finite difference approximation is obtained by eliminating the limiting process:

The finite difference operator \(\delta _{2x}\) is called a central difference operator. Finite difference approximations can also be one-sided. For example, a backward difference approximation is,

and a forward difference approximation is,

We can also derive finite difference approximations for higher-order derivatives. For example, consider the following definition for the second derivative,

The finite difference approximation for the second order derivative is obtained eliminating the limiting process.

## Finite Difference Approximations in 2D

We can easily extend the concept of finite difference approximations to multiple spatial dimensions. In this case we represent the solution on a structured spatial mesh as shown in Figure 2.9.

Using \(U_{i,j}\) to denote the value of \(U\) at node \((i,j)\) our central derivative approximations for the first derivatives are:

In general, finite difference approximations will involve a set of points surrounding \(U_{i,j}\).