# 2.4 Analysis of Finite Difference Methods

## 2.4.1 Local Truncation Error for a Derivative Approximation

In the discussion of ODE integration, we used the ideas of consistency and stability to prove convergence through the Dahlquist Equivalence Theorem. Similar concepts also exist for PDE discretizations, however, we cannot cover these here. We will briefly review the local truncation error for finite difference approximations of derivatives here and discuss its application in computing the truncation error of a PDE in Section 2.4.3.

Suppose we use a backwards difference, $$\delta _ x^- U_ i$$ to approximate the first derivative, $$U_ x$$ at point $$i$$. The local truncation error for this derivative approximation can be calculated using Taylor series as we have done in the past:

 $$\displaystyle \tau$$ $$\displaystyle \equiv$$ $$\displaystyle \delta _ x^{-} U_ i - {U_ x}_ i ,$$ (2.61) $$\displaystyle =$$ $$\displaystyle \frac{1}{{\scriptstyle \Delta } x}\left( U_ i - U_{i-1}\right) - {U_ x}_ i,$$ (2.62) $$\displaystyle =$$ $$\displaystyle \frac{1}{{\scriptstyle \Delta } x}\left[ U_ i - \left( U_ i - {\scriptstyle \Delta } x{U_ x}_ i + \frac{1}{2}{\scriptstyle \Delta } x^2{U_{xx}}_ i + O({\scriptstyle \Delta } x^3)\right)\right] - {U_ x}_ i,$$ (2.63) $$\displaystyle =$$ $$\displaystyle -\frac{1}{2}{\scriptstyle \Delta } x{U_{xx}}_ i + O({\scriptstyle \Delta } x^2).$$ (2.64)

Thus, the analysis shows that the backwards difference is a first-order accurate discretization of the derivative at node $$i$$.