1. Continuous Functions – Difference Approximations
Definition – Forward difference
From , take a finite :
Definition – Backward difference
Take the step backwards ():
Theorem – Accuracy from Taylor series
If and its derivatives are continuous between and , with :
Solving for :
The truncation error is of order : halve the step and the error roughly halves. Forward and backward differences are both .
2. Central Difference
Derivation
Expand forward () and backward ():
Subtract: the even terms (, ) cancel:
Theorem – Central divided difference
More accurate: halve the step and the error drops about 4×.
| Formula | Points used | Error order |
|---|---|---|
| Forward | ||
| Backward | ||
| Central |
Example (extra) – at
Exact: m/s²
| Forward | Backward | Central | Forward error | Central error | |
|---|---|---|---|---|---|
| 2 | 30.4739 | 28.9145 | 29.6942 | 0.800 | 0.0205 |
| 1 | 30.0684 | 29.2892 | 29.6788 | 0.395 | 0.0051 |
| 0.5 | 29.8697 | 29.4802 | 29.6750 | 0.196 | 0.0013 |
| 0.25 | 29.7714 | 29.5766 | 29.6740 | 0.098 | 0.0003 |
Halving : the forward error halves (); the central error is divided by 4 ().
How accurate is my answer? (step halving)
In practice the exact derivative is unknown. Start with a step, then keep halving it until the absolute relative approximate error between two successive estimates
is within a pre-specified tolerance.
⚠️ Don’t shrink forever: below some size, round-off in (subtracting nearly equal numbers) starts to grow and dominates the truncation error.
3. Higher-Order Derivatives
Formulas
Combine Taylor series the same way to approximate :
The central version is more accurate.
⚠️ The slide text for these formulas is garbled (""). The correct numerators are (forward) and (central).
Example (extra)
Same , , at ; exact :
- Central: (error )
- Forward: (error )
4. Discrete Functions (Tabulated Data)
Example 1 (slides) – acceleration from a difference
| (s) | 0 | 10 | 15 | 20 | 22.5 | 30 |
|---|---|---|---|---|---|---|
| (m/s) | 0 | 227.04 | 362.78 | 517.35 | 602.97 | 901.67 |
Use the two data points closest to , i.e. and :
⚠️ Strictly, is the forward difference at (or the central difference at ). Using it for is an approximation on top of an approximation. The slide’s general formula with in the numerator but only in the denominator is a typo.
Method – Direct-fit polynomials
Fit an interpolating polynomial to points (3.1 or Lagrange 3.3), then differentiate the polynomial:
Other derivatives follow the same way.
Example 2 (slides) – acceleration from the cubic interpolant
Use the 4 points nearest 16 (10, 15, 20, 22.5), as in 3.1:
(With unrounded coefficients, ; the rounded ones above give .)
⚠️ The slide prints the cubic as (and has a typo for ). Solving the 4×4 system exactly gives the 3.1 coefficients above. The final answer m/s² is the same either way.