askvity

What is the Truncation Error in Finite Difference?

Published in Numerical Analysis 4 mins read

The truncation error in finite difference methods represents the discrepancy between the exact derivative and its approximation using a finite difference formula. This error arises from the inherent approximation involved in replacing a continuous differential operator with a discrete difference operator.

Understanding Discretization and Truncation Error

When solving partial differential equations (PDEs) numerically, we often use finite difference methods. This involves:

  1. Discretization: Approximating the continuous domain of the PDE with a grid of points.
  2. Difference Approximations: Replacing derivatives in the PDE with finite difference formulas.

The core issue is that difference approximations only approximate the actual differential operator. According to the reference:

The error between the numerical solution and the exact solution is determined by the error between a differential operator to a difference operator. This error is called the discretization error or truncation error.

This "error between a differential operator and a difference operator" is the truncation error.

How Truncation Error Occurs

Let’s consider a Taylor series expansion of a function f(x) around a point x:

f(x + h) = f(x) + hf'(x) + (h²/2!)f''(x) + (h³/3!)f'''(x) + ...

When we approximate a derivative (like f'(x)) using a finite difference formula, we essentially truncate this infinite series. For instance, the forward difference approximation of the first derivative f'(x) is:

f'(x) ≈ (f(x + h) - f(x)) / h

This approximation is obtained by taking the Taylor expansion f(x+h) and rearranging it to isolate f'(x), discarding the terms involving and higher. The neglected terms are the truncation error. In the above case, the truncation error is of the order O(h), which decreases as h gets smaller.

Key Aspects of Truncation Error

  • Source: The approximation of derivatives by difference formulas.
  • Nature: Error due to the truncation of an infinite series (like Taylor series).
  • Impact: Influences the accuracy of the numerical solution; a smaller truncation error generally leads to a more accurate result.
  • Dependence on Step Size: Typically decreases as the step size (h) becomes smaller, but this is not always the case when round-off errors become significant.

Practical Implications

The size of the truncation error depends on:

  • Order of the Difference Approximation: Higher-order methods usually have smaller truncation errors but may require more computations.
  • Step Size: Decreasing the step size typically decreases the truncation error, but there are diminishing returns and potential problems due to roundoff error.

Examples

  • Forward Difference: The forward difference approximation for the first derivative has a truncation error of O(h), which decreases proportionally to h.
  • Central Difference: The central difference approximation is more accurate and has a truncation error of O(h²), meaning it decreases proportionally to . This shows how selecting a particular difference formula will influence the level of truncation error present.

Summary of Truncation Error in Finite Difference

Feature Description
Definition Error from approximating a continuous derivative with a discrete difference operator.
Cause Truncation of the infinite series used to derive finite difference formulas.
Impact Influences the accuracy of the numerical solutions of differential equations.
Dependency Dependent on step size h and the order of the difference approximation. Smaller h usually leads to less error but at a cost of computations.

The truncation error is a crucial consideration when using finite difference methods for solving PDEs. Understanding it allows you to choose suitable approximations and optimize solutions for better accuracy.

Related Articles