Last modified: December 22, 2024

This article is written in: 🇺🇸

Forward Difference Method

Untitled

Mathematical Formulation

The forward difference approximation of the first derivative of a function $f$ at a point $x$ with step size $h$ is given by:

$$f'(x) \approx \frac{f(x + h) - f(x)}{h}$$

This formula is derived from the definition of the derivative, and it represents the slope of the line passing through the points $(x, f(x))$ and $(x + h, f(x + h))$.

Example

Suppose we have a function $f(x) = x^2$, and we want to approximate the derivative at the point $x = 2$ with a step size $h = 0.01$. Using the forward difference method, we get:

$$f'(2) \approx \frac{f(2 + 0.01) - f(2)}{0.01} = \frac{4.0401 - 4}{0.01} \approx 4.01$$

The exact derivative of $f(x) = x^2$ at the point $x = 2$ is $f'(2) = 2*2 = 4$, so the approximation is close.

Advantages

Limitations

Table of Contents

    Forward Difference Method
    1. Mathematical Formulation
    2. Example
    3. Advantages
    4. Limitations