Last modified: March 19, 2026

This article is written in: 🇺🇸

Central Difference Method

The central‐difference method is a finite‐difference scheme for estimating derivatives that combines forward and backward differences via Taylor‐series expansions. By evaluating the function at points symmetrically placed around the target, it cancels out many of the lower‐order error terms, yielding a more accurate approximation than one‐sided methods. This balanced approach is especially useful in numerical analysis and computational applications where closed‐form derivatives are unavailable or costly to compute.

Central Difference Method Illustration

Mathematical Formulation and Derivation

The central 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)}{2h} $$

This formula can be motivated as the average of the forward and backward difference formulas.

Assume $f$ is three times differentiable on $[x-h,,x+h]$. By Taylor’s theorem, for some $\xi_1\in(x,x+h)$ and $\xi_2\in(x-h,x)$,

Note on $\xi_1,\xi_2$ Here we use the Lagrange remainder form of Taylor’s theorem. The derivatives in the polynomial part are evaluated at $x$, but the remainder term is evaluated at an intermediate point $\xi$ between the expansion point and the evaluation point. In general, replacing $\xi$ by $x$ is not valid (it would only be exact in special cases, e.g., when higher derivatives are constant). For a quick refresher on this notation, see Taylor Series.

$$ f(x+h) = f(x) + hf'(x) + \frac{h^2}{2}f''(x) + \frac{h^3}{6}f^{(3)}(\xi_1) $$

$$ f(x-h) = f(x) - hf'(x) + \frac{h^2}{2}f''(x) - \frac{h^3}{6}f^{(3)}(\xi_2) $$

Forward and Backward Differences

The forward difference approximation is:

$$ \frac{f(x+h)-f(x)}{h} = f'(x) + \frac{h}{2}f''(x) + \frac{h^2}{6}f^{(3)}(\xi_1) $$

Thus

$$ \frac{f(x+h)-f(x)}{h} = f'(x) + \mathcal{O}(h) $$

Similarly, the backward difference approximation is:

$$ \frac{f(x)-f(x-h)}{h} = f'(x) - \frac{h}{2}f''(x) + \frac{h^2}{6}f^{(3)}(\xi_2) $$

Thus

$$ \frac{f(x)-f(x-h)}{h} = f'(x) + \mathcal{O}(h) $$

Central Difference (Second-Order)

Average the two approximations:

$$ \frac12\biggl[\frac{f(x+h)-f(x)}{h} + \frac{f(x)-f(x-h)}{h}\biggr] $$

$$ = \frac12\Bigl[\bigl(f'(x) + \tfrac{h}{2}f''(x) + \tfrac{h^2}{6}f^{(3)}(\xi_1)\bigr)

$$ = f'(x) + \frac{h^2}{12}\bigl(f^{(3)}(\xi_1)+f^{(3)}(\xi_2)\bigr) $$

The $\pm\tfrac{h}{2}f''(x)$ terms cancel exactly, leaving only an $\mathcal{O}(h^2)$ remainder.

Rewriting the left-hand side:

$$ \frac{1}{2}\Bigl(\tfrac{f(x+h)-f(x)}{h} + \tfrac{f(x)-f(x-h)}{h}\Bigr) = \frac{f(x+h)-f(x-h)}{2h} $$

Hence

$$ \frac{f(x+h)-f(x-h)}{2h} = f'(x) + \underbrace{\frac{h^2}{12}\bigl(f^{(3)}(\xi_1)+f^{(3)}(\xi_2)\bigr)}_{\displaystyle \mathcal{O}(h^2)} $$

If $f^{(3)}$ is continuous, then there exists some $\xi\in(x-h,x+h)$ such that

$$ \frac{f^{(3)}(\xi_1)+f^{(3)}(\xi_2)}{2} = f^{(3)}(\xi) $$

and therefore

$$ \frac{f(x+h)-f(x-h)}{2h} = f'(x) + \frac{h^2}{6}f^{(3)}(\xi) = f'(x) + \mathcal{O}(h^2) $$

Equivalently,

$$ f'(x)=\frac{f(x+h)-f(x-h)}{2h}+\mathcal{O}(h^2) $$

Dropping the explicit remainder term gives the familiar approximation:

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

which is second‐order accurate (error $\propto h^2$) because the leading $h^1$ terms have cancelled.

Error in Central Difference Method

The error in the central difference method is of the order $\mathcal{O}(h^2)$, which implies that the truncation error decreases quadratically as the step size $h$ approaches zero. This quadratic rate of convergence makes the central difference method significantly more accurate than the forward or backward difference methods, which typically have an error of order $\mathcal{O}(h)$.

However, while reducing $h$ improves truncation error, it must be balanced against floating-point round-off. Extremely small values of $h$ can lead to subtractive cancellation in $f(x+h)-f(x-h)$, limiting the practical accuracy achievable with this method.

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 central difference method, we get:

$$ f'(2) \approx \frac{f(2 + 0.01) - f(2 - 0.01)}{2 \times 0.01} = \frac{4.0401 - 3.9601}{0.02} = 4.00 $$

The exact derivative of $f(x) = x^2$ at the point $x = 2$ is $f'(2) = 2 \times 2 = 4$, so the approximation is accurate. This example demonstrates how the central difference method can effectively approximate derivatives with high precision for smooth functions, while also highlighting the importance of an appropriate step size $h$.

Advantages

Limitations