---
name: richardson-extrapolation
description: "Estimate how accurate a computed result is, and make it more accurate, by repeating the computation with a smaller step size or grid spacing and combining the results. Works for ODE solvers, numerical integration, finite differences and simulations whose error shrinks predictably with the step size. Also gives the observed order of convergence, a standard check that a method is implemented correctly."
---

# Richardson extrapolation

> **Placeholder (demo).** Description only: there is no reference implementation or verification for this entry yet. It belongs to a demonstration set of textbook methods.

## What it does

If a quantity computed with step $h$ has error $A(h) - A = C h^p + O(h^{p+1})$, then two runs at $h$ and $h/2$ give an improved estimate $A \approx A(h/2) + \big(A(h/2) - A(h)\big)/(2^p - 1)$, and the correction term itself estimates the error of $A(h/2)$. With three runs at $h$, $h/2$, $h/4$, the observed order is $p \approx \log_2 \frac{A(h) - A(h/2)}{A(h/2) - A(h/4)}$, so the order does not have to be known in advance.

Mind the sign. Write the error of a result as *computed minus exact*. The **correction** $\big(A(h/2) - A(h)\big)/(2^p - 1)$ is what you **add** to $A(h/2)$; it equals minus the estimated error of $A(h/2)$, and it continues the trend the results already show as $h$ shrinks.

Which $p$ to use: if the method's theoretical order is known and the observed order agrees with it, use the theoretical value; otherwise use the observed one. Three runs give only one estimate of $p$; a fourth run at $h/8$ shows whether the observed order is stable, which means the step sizes are in the asymptotic range. The extrapolated value has a smaller error of higher order whose size is not estimated by this procedure.

**Worked example.** A second-order method gives $A(h) = 2.0480$, $A(h/2) = 2.0120$, $A(h/4) = 2.0030$:

- observed order: $p \approx \log_2 \frac{2.0480 - 2.0120}{2.0120 - 2.0030} = \log_2 \frac{0.0360}{0.0090} = 2.00$, matching the theoretical order;
- correction for the best result: $\big(A(h/4) - A(h/2)\big)/(2^p - 1) = (2.0030 - 2.0120)/3 = -0.0030$;
- so the error of $A(h/4)$ is about $+0.0030$ (it is too high by about $0.0030$);
- improved estimate: $A(h/4) + \text{correction} = 2.0030 - 0.0030 = 2.0000$.

Check: the results decrease as $h$ shrinks ($2.0480 \to 2.0120 \to 2.0030$), and the improved value continues that trend.

## When to use

- You have, or can cheaply compute, results at two or more step sizes and want an error estimate or a more accurate value.
- Checking a new implementation: the observed order should match the method's theoretical order.

## When not to use (and what to use instead)

| Situation | Use instead |
| --- | --- |
| The error does not behave like $C h^p$: step too large (not yet asymptotic), non-smooth solution, chaotic long-time dynamics | Reduce the step until the observed order is stable, or report the spread between runs instead |
| Rounding error dominates (very small steps) | Use larger steps; extrapolation amplifies noise |
| You only need step-size control during an ODE run | An adaptive method such as `dormand-prince-rk45`, which estimates the error at every step |

## Key facts

Needs the order $p$ (two runs) or estimates it (three runs). Outputs: an improved estimate, an error estimate and the observed order.

## Sources

- L. F. Richardson. The approximate arithmetical solution by finite differences of physical problems involving differential equations. *Philosophical Transactions of the Royal Society A* 210 (1911) 307–357. https://doi.org/10.1098/rsta.1911.0009
- L. F. Richardson, J. A. Gaunt. The deferred approach to the limit. *Philosophical Transactions of the Royal Society A* 226 (1927) 299–361. https://doi.org/10.1098/rsta.1927.0008
