Improve derivative accuracy by combining two central-difference
estimates with different step sizes:
R = (4·D(h/2) - D(h)) / 3.
Example: f(x)=x³, x=2, h=1 gives exact result R=12, error=0.
The result has O(h⁴) accuracy.
Example
Combine two estimates to cancel the leading error term. The remaining error is exactly zero here only because the sampled function is a cubic; for a general smooth function a nonzero higher-order error term remains.
highlighted = computed this step
Step 1 — Set up
Set up Richardson extrapolation.
f(x)=x3x=2h=1
Step 2 — Estimate D(h)
Compute the first central-difference estimate.
D1=(27−1)/2=13
Step 3 — Estimate D(h/2)
Compute the half-step central estimate.
D2=(8125−827)/1=449
Step 4 — Richardson combine
Combine 4 times D2 minus D1 over 3.
R=(4⋅449−13)/3=36/3=12
Step 5 — Result
State the Richardson estimate.
richardson-extrapolation
Richardson extrapolation cancels the leading O(h²) error term by combining two central-difference approximations: D1 = (f(x+h) - f(x-h)) / (2h) D2 = (f(x+h/2) - f(x-h/2)) / h R = (4·D2 - D1) / 3