MTH 343 · 4.2 Richardson's extrapolation

Richardson Derivative Lab

Pick a function, a point x₀, a step size h, an order of accuracy and a step ratio r. The lab builds the Richardson approximation of f′(x₀) from centered differences and compares its slope with the exact tangent line.

f(x) =

Use x as the variable. You can write + − * / ^, sin, cos, tan, exp, ln (or log), sqrt, abs, pi, e.

The slider is logarithmic and goes down to h = 10−8. Try h between 10−6 and 10−8 to watch round-off error take over.

Order of accuracy

Steps h, rh, r²h, … with 0 < r < 1. Type a fraction like 1/3 or a decimal like 0.25. The slides use r = 1/2.

Exact f′(x₀)—
Richardson approximation—
Absolute error—
Relative error—

Tangent lines at x₀

  • f(x)
  • Exact tangent
  • Slope from the approximation
  • Points where f is evaluated
x₀ ± 1

Zoom in around x₀ to see the gap between the two lines. Hover or tab into the plot to read values.

Extrapolation table

Column 1 holds the centered differences. Each later column cancels one more error term using . The highlighted entry is the approximation above; grey numbers are absolute errors.

Error as h shrinks

  • Selected order
  • Other orders

Both axes are logarithmic, so a method of order n shows up as a line with slope n. When h gets too small, round-off error takes over and the curves turn back up.