askvity

What is Discretization Error in Finite Difference?

Published in Numerical Analysis 3 mins read

Discretization error in the context of finite difference methods is the error introduced when a continuous mathematical problem (like a differential equation) is approximated by a discrete numerical method. Essentially, it's the difference between the exact solution of the continuous problem and the approximate solution obtained using the finite difference method.

Here's a breakdown:

Understanding the Concept

Finite difference methods replace derivatives in a differential equation with approximations based on difference quotients. This transformation allows us to solve the problem numerically on a computer. However, these approximations are not perfect, and that's where discretization error comes in.

Imagine you want to approximate the derivative of a function f(x) at a point x. The true derivative is defined as:

f'(x) = lim (h->0) [f(x + h) - f(x)] / h

In a finite difference method, we use a small, but finite, value of 'h' to approximate this:

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

Because 'h' is not infinitesimally small, the approximation introduces an error. This error is the discretization error.

Sources of Discretization Error

  • Truncation Error: The primary source is the truncation error arising from truncating Taylor series expansions used to derive the finite difference approximations. For example, when we approximate a derivative, we are essentially using a truncated Taylor series, neglecting higher-order terms.

  • Grid Spacing: The size of the grid spacing (represented by 'h') directly impacts the accuracy. Smaller grid spacing generally leads to smaller discretization errors but also increases computational cost.

Impact of Discretization Error

  • Accuracy of Solutions: Discretization error affects the accuracy of the numerical solution. A large discretization error means the numerical solution is significantly different from the true solution.

  • Stability of Numerical Schemes: Discretization error can also influence the stability of numerical schemes. Unstable schemes can produce solutions that grow unboundedly, even if the true solution is bounded.

Minimizing Discretization Error

  • Higher-Order Methods: Using higher-order finite difference schemes reduces the truncation error. Higher-order methods use more points in the approximation, resulting in a more accurate representation of the derivative.

  • Grid Refinement: Reducing the grid spacing (making 'h' smaller) generally decreases the discretization error. However, this increases the computational cost as it requires more calculations.

  • Richardson Extrapolation: This technique can be used to improve the accuracy of a numerical solution by combining solutions obtained with different grid spacings.

Example

Consider approximating the solution to a simple differential equation:

dy/dx = f(x)

Using the forward difference method:

(y<sub>i+1</sub> - y<sub>i</sub>) / h  ≈ f(x<sub>i</sub>)

The error in this approximation (discretization error) is roughly proportional to 'h'. This means that reducing 'h' will reduce the error, but it will also increase the number of calculations required to solve the problem over a given domain.

In summary, discretization error is an inherent consequence of approximating continuous problems with discrete numerical methods like finite difference methods. Understanding its sources and impacts is crucial for developing accurate and reliable numerical simulations.

Related Articles