Numerical Differentiation — Definition, Formula & Examples
Numerical differentiation is a technique for estimating the derivative of a function using known function values at specific points, rather than applying symbolic differentiation rules. It is especially useful when the function is defined only by data or is too complex to differentiate analytically.
Given a function evaluated at discrete points, numerical differentiation approximates by computing a finite difference quotient. The simplest forms—forward, backward, and central differences—are derived from truncating the Taylor series expansion of about , yielding approximations with known orders of truncation error in terms of the step size .
Key Formula
Where:
- = Approximate value of the derivative at x
- = The function being differentiated
- = The point at which the derivative is estimated
- = Step size (a small positive number)
How It Works
You choose a small step size and evaluate at nearby points. The forward difference uses and ; the backward difference uses and ; the central difference uses and . The central difference is generally more accurate because its truncation error is , compared to for forward and backward differences. However, making extremely small on a computer can introduce round-off error, so there is a practical tradeoff in choosing .
Worked Example
Problem: Estimate for using the central difference formula with .
Step 1: Compute and .
Step 2: Apply the central difference formula.
Step 3: Compare with the exact derivative , so . The approximation is very close.
Answer: The central difference estimate of is , with an error of compared to the exact value of .
Why It Matters
Numerical differentiation is essential when working with experimentally measured data or computer simulations where no closed-form expression exists. Engineers use it to compute stress rates from sensor readings, and it forms the backbone of finite difference methods for solving differential equations in physics and finance.
Common Mistakes
Mistake: Using an extremely small step size and expecting better accuracy.
Correction: On computers, very small values amplify round-off error. A moderate (e.g., for double precision) often gives the best balance between truncation error and round-off error.
