Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

 Open In Colab

Richardson Extrapolation

An alternative to the Newton-Cotes formulae uses successive sampling step sizes to estimate and cancel error. We begin with Richardson extrapolation and extend this to Romberg integration.

Richardson extrapolation is an algorithm that uses successive applications of the trapezoid rule with differing step sizes to achieve superior accuracy without computing higher derivatives.

The exact integral can always be expressed as:

I=I(h)+E(h)I = I(h) + E(h)

where I(h)I(h) is the approximation with step hh and E(h)E(h) is the associated truncation error. Writing this for step h1h_1 and h2=h1/2h_2 = h_1 / 2:

I=I(h1)+ch12+O(h14)I=I(h2)+ch22+O(h24)=I(h2)+ch124+O(h14)\begin{aligned} I &= I(h_1) + c h_1^2 + O(h_1^4) \\ I &= I(h_2) + c h_2^2 + O(h_2^4) = I(h_2) + c \frac{h_1^2}{4} + O(h_1^4) \end{aligned}

NB cc here, which depends on f′′f'', is assumed to be the same between steps. This subtly assumtion is only a good one for well-behaved functions.

Multiplying the second equation by 4 and subtracting the first eliminates the leading h12h_1^2 error term:

I=4I(h2)−I(h1)3+O(h14)I = \frac{4 I(h_2) - I(h_1)}{3} + O(h_1^4)

This is an interesting result! Effectively what we have done is use a second estimate to cancel the next power in our expansion, leading to a higher-order result without evaluating new derivatives.

The Romberg Integration Algorithm

In fact, we can repeat this procedure arbitrarily! Above we combined two O(h2)O(h^2) estimates to make an O(h4)O(h^4) estimate. We can take this result, combine it with another, and make an O(h6)O(h^6) estimate, and so on.

This recursive extrapolation generates the Romberg tableau:

I4≈43I(h2)−13I(h1)I6≈1615I(h3)−115I4I8≈6463I(h4)−163I6⋮Ij,k≈4k−1Ij+1,k−1−Ij,k−14k−1−1\begin{align} I^4 &\approx \frac{4}{3} I(h_2) -\frac{1}{3} I(h_1) \\ I^6 &\approx \frac{16}{15} I(h_3) - \frac{1}{15} I^4 \\ I^8 &\approx \frac{64}{63} I(h_4) - \frac{1}{63} I^6 \\ \vdots \\ I_{j,k} &\approx \frac{4^{k-1} I_{j+1,k-1} - I_{j,k-1}}{4^{k-1}-1} \end{align}

where the last line is the Romberg Integration Algorithm which has some very nice properties:

  • lends itself to recursive programming (elegant)

  • parallelizes nicely since each interval is independent.

  • can integrate to arbitrary accuracy (if a callable function is provided)

  • Can reuse function evaluations if the step size is chosen well.

However, it requires either:

  • the ability to sample the function at will

  • a structured sampling grid

Remember however that we assumed the second derivative doesn’t change much between levels. If there is high frequency noise and a low frequency trend, the cancellation of the errors isn’t so robust. For these reasons, heuristics based on Newton-Cotes (Decision trees of applications of Simpson’s rules and trapezoid depending on sampling structure) remains a common robust choice.

Example: Romberg Integration vs. Simpson’'s Rule

Approximate ∫0πsin⁡(x) dx=2\int_0^\pi \sin(x) \,\mathrm{d}x = 2 using the Romberg rule and compare with Simpson’'s 1/3 rule:

Convergence to Machine Precision

Note the error became zero (or reached double-precision floating point limits ≈10−16\approx 10^{-16})! What does that mean?

By systematically canceling higher-order polynomial truncation terms, Romberg integration converges exponentially for smooth functions with very few function evaluations.