Skip to content

Richardson Extrapolation

Richardson extrapolation is a technique to mathematically eliminate the leading error term in a numerical approximation. Applied to the central difference formula, each level of extrapolation removes the dominant error term and raises the accuracy by two orders. With just a few function evaluations, we can achieve an approximation far more accurate than what the central difference formula alone provides.


The Central Difference Error Structure

Before deriving the extrapolation, we need to know the exact form of the error in the central difference formula. Expanding f(x+h)f(x+h) and f(x−h)f(x-h) in Taylor series:

f(x+h)=f(x)+f′(x)h+f′′(x)2!h2+f(3)(x)3!h3+f(4)(x)4!h4+f(5)(x)5!h5+O(h6)f(x+h) = f(x) + f'(x)h + \frac{f''(x)}{2!}h^2 + \frac{f^{(3)}(x)}{3!}h^3 + \frac{f^{(4)}(x)}{4!}h^4 + \frac{f^{(5)}(x)}{5!}h^5 + O(h^6)

f(x−h)=f(x)−f′(x)h+f′′(x)2!h2−f(3)(x)3!h3+f(4)(x)4!h4−f(5)(x)5!h5+O(h6)f(x-h) = f(x) - f'(x)h + \frac{f''(x)}{2!}h^2 - \frac{f^{(3)}(x)}{3!}h^3 + \frac{f^{(4)}(x)}{4!}h^4 - \frac{f^{(5)}(x)}{5!}h^5 + O(h^6)

Subtracting the two equations, the even-power terms cancel:

f(x+h)−f(x−h)=2f′(x)h+2f(3)(x)3!h3+2f(5)(x)5!h5+O(h7)f(x+h) - f(x-h) = 2f'(x)h + \frac{2f^{(3)}(x)}{3!}h^3 + \frac{2f^{(5)}(x)}{5!}h^5 + O(h^7)

Dividing by 2h2h:

Dh=f(x+h)−f(x−h)2h=f′(x)+f(3)(x)3!h2+f(5)(x)5!h4+O(h6)D_h = \frac{f(x+h)-f(x-h)}{2h} = f'(x) + \frac{f^{(3)}(x)}{3!}h^2 + \frac{f^{(5)}(x)}{5!}h^4 + O(h^6)

This shows that DhD_h equals the true derivative f′(x)f'(x) plus an infinite series of even-power error terms. The dominant error is f(3)(x)3!h2\frac{f^{(3)}(x)}{3!}h^2, which is O(h2)O(h^2).


First-Level Extrapolation: Dh(1)D_h^{(1)}

Let’s derive the first level of Richardson extrapolation, denoted as Dh(1)D_h^{(1)}. The main idea here is to combine two estimates of the derivative to completely cancel out the leading error term—which, for the central difference, is O(h2)O(h^2).

We’ll start with the standard central difference formula at a step size hh:

Dh=f′(x)+f(3)(x)3!h2+f(5)(x)5!h4+O(h6)D_h = f'(x) + \frac{f^{(3)}(x)}{3!}h^2 + \frac{f^{(5)}(x)}{5!}h^4 + O(h^6)

If we halve the step size to h/2h/2, the equation becomes:

Dh/2=f′(x)+f(3)(x)3!h24+f(5)(x)5!h416+O(h6)D_{h/2} = f'(x) + \frac{f^{(3)}(x)}{3!}\frac{h^2}{4} + \frac{f^{(5)}(x)}{5!}\frac{h^4}{16} + O(h^6)

To knock out the h2h^2 term, we can multiply the Dh/2D_{h/2} equation by 222^2 (or 4) to match the coefficients, and then subtract DhD_h:

4Dh/2−Dh=3f′(x)−34f(5)(x)5!h4+O(h6)4D_{h/2} - D_h = 3f'(x) - \frac{3}{4}\frac{f^{(5)}(x)}{5!}h^4 + O(h^6)

Finally, dividing by 3 isolates f′(x)f'(x) and gives us our new estimate, free of the h2h^2 error:

Dh(1)=4Dh/2−Dh3D_h^{(1)} = \frac{4D_{h/2} - D_h}{3}

With the h2h^2 term gone, this first-level extrapolation formula is now accurate to O(h4)O(h^4).


Second-Level Extrapolation: Dh(2)D_h^{(2)}

Now we can take it a step further. Let’s eliminate the new leading error term, h4h^4, to find Dh(2)D_h^{(2)}.

From the previous derivation, we know the exact error structure of our first-level estimate looks like this:

Dh(1)=f′(x)−14f(5)(x)5!h4+O(h6)D_h^{(1)} = f'(x) - \frac{1}{4}\frac{f^{(5)}(x)}{5!}h^4 + O(h^6)

If we evaluate this same formula using a step size of h/2h/2, we get:

Dh/2(1)=f′(x)−14f(5)(x)5!h416+O(h6)D_{h/2}^{(1)} = f'(x) - \frac{1}{4}\frac{f^{(5)}(x)}{5!}\frac{h^4}{16} + O(h^6)

This time around, we need to multiply Dh/2(1)D_{h/2}^{(1)} by 242^4 (or 16) so the h4h^4 coefficients match up perfectly:

16Dh/2(1)=16f′(x)−14f(5)(x)5!h4+O(h6)16D_{h/2}^{(1)} = 16f'(x) - \frac{1}{4}\frac{f^{(5)}(x)}{5!}h^4 + O(h^6)

Subtracting Dh(1)D_h^{(1)} from this equation eliminates the h4h^4 term entirely:

16Dh/2(1)−Dh(1)=15f′(x)+O(h6)16D_{h/2}^{(1)} - D_h^{(1)} = 15f'(x) + O(h^6)

Divide by 15, and we arrive at our second-level extrapolation formula:

Dh(2)=16Dh/2(1)−Dh(1)15D_h^{(2)} = \frac{16D_{h/2}^{(1)} - D_h^{(1)}}{15}

By chaining these approximations together, we’ve bumped our accuracy up to O(h6)O(h^6).


Generalized Formula

The same elimination pattern continues at every level. To eliminate the leading h2nh^{2n} error term, the general step is:

Dh(n)=22n Dh/2(n−1)−Dh(n−1)22n−1D_h^{(n)} = \frac{2^{2n}\,D_{h/2}^{(n-1)} - D_h^{(n-1)}}{2^{2n} - 1}

LevelFormulaAccuracy
BaseDh=f(x+h)−f(x−h)2hD_h = \dfrac{f(x+h)-f(x-h)}{2h}O(h2)O(h^2)
FirstDh(1)=4 Dh/2−Dh3D_h^{(1)} = \dfrac{4\,D_{h/2} - D_h}{3}O(h4)O(h^4)
SecondDh(2)=16 Dh/2(1)−Dh(1)15D_h^{(2)} = \dfrac{16\,D_{h/2}^{(1)} - D_h^{(1)}}{15}O(h6)O(h^6)

Each additional level requires one more central difference evaluation at a halved step size, and raises the accuracy order by 2.


Worked Example

Let’s put the formulas to the test with a concrete problem. We have the function f(x)=4x3−9e7xf(x) = 4x^3 - 9e^{7x}, and we want to evaluate its derivative at x=2.7x=2.7 using Richardson extrapolation, specifically finding D0.2(1)D_{0.2}^{(1)} and D0.2(2)D_{0.2}^{(2)} to 4 significant figures.


Part (a): First-Level Richardson Extrapolation

To find our first-level extrapolation, D0.2(1)D_{0.2}^{(1)}, we first need two basic central difference estimates: one at our starting step size h=0.2h=0.2, and another at half that step size, h=0.1h=0.1.

Let’s calculate D0.2D_{0.2} first:

D0.2=f(2.7+0.2)−f(2.7−0.2)2(0.2)=f(2.9)−f(2.5)0.4D_{0.2} = \frac{f(2.7 + 0.2) - f(2.7 - 0.2)}{2(0.2)} = \frac{f(2.9) - f(2.5)}{0.4}

Plugging in the numbers gives us D0.2=−1.384×1010D_{0.2} = -1.384 \times 10^{10} (to 4 s.f.).

Now, we halve the step size to find D0.1D_{0.1}:

D0.1=f(2.7+0.1)−f(2.7−0.1)2(0.1)=f(2.8)−f(2.6)0.2D_{0.1} = \frac{f(2.7 + 0.1) - f(2.7 - 0.1)}{2(0.1)} = \frac{f(2.8) - f(2.6)}{0.2}

Which evaluates to D0.1=−1.103×1010D_{0.1} = -1.103 \times 10^{10} (to 4 s.f.).

With both estimates in hand, we can blend them using our first-level extrapolation formula to knock out the O(h2)O(h^2) error:

D0.2(1)=4D0.1−D0.23=4(−1.103×1010)−(−1.384×1010)3D_{0.2}^{(1)} = \frac{4D_{0.1} - D_{0.2}}{3} = \frac{4(-1.103 \times 10^{10}) - (-1.384 \times 10^{10})}{3}

=−4.412×1010+1.384×10103=−3.028×10103= \frac{-4.412 \times 10^{10} + 1.384 \times 10^{10}}{3} = \frac{-3.028 \times 10^{10}}{3}

This leaves us with a much sharper estimate:

D0.2(1)=−1.009×1010D_{0.2}^{(1)} = -1.009 \times 10^{10}


Part (b): Second-Level Richardson Extrapolation

Moving on to the second level, our goal is to compute D0.2(2)D_{0.2}^{(2)}, which requires eliminating the O(h4)O(h^4) error. The formula for this is:

D0.2(2)=16D0.1(1)−D0.2(1)15D_{0.2}^{(2)} = \frac{16D_{0.1}^{(1)} - D_{0.2}^{(1)}}{15}

We already figured out D0.2(1)D_{0.2}^{(1)}, but we’re missing D0.1(1)D_{0.1}^{(1)}. To get that, we have to drill down one step further and compute a raw central difference at h=0.05h=0.05.

D0.05=f(2.7+0.05)−f(2.7−0.05)2(0.05)=f(2.75)−f(2.65)0.1D_{0.05} = \frac{f(2.7 + 0.05) - f(2.7 - 0.05)}{2(0.05)} = \frac{f(2.75) - f(2.65)}{0.1}

This comes out to D0.05=−1.038×1010D_{0.05} = -1.038 \times 10^{10} (to 4 s.f.).

Next, we combine D0.05D_{0.05} and D0.1D_{0.1} to get our missing first-level piece:

D0.1(1)=4D0.05−D0.13=4(−1.038×1010)−(−1.103×1010)3D_{0.1}^{(1)} = \frac{4D_{0.05} - D_{0.1}}{3} = \frac{4(-1.038 \times 10^{10}) - (-1.103 \times 10^{10})}{3}

=−4.152×1010+1.103×10103=−3.049×10103= \frac{-4.152 \times 10^{10} + 1.103 \times 10^{10}}{3} = \frac{-3.049 \times 10^{10}}{3}

So, D0.1(1)=−1.016×1010D_{0.1}^{(1)} = -1.016 \times 10^{10}.

Finally, we have everything we need. We can plug our two first-level estimates into the second-level formula:

D0.2(2)=16(−1.016×1010)−(−1.009×1010)15D_{0.2}^{(2)} = \frac{16(-1.016 \times 10^{10}) - (-1.009 \times 10^{10})}{15}

=−16.256×1010+1.009×101015=−15.247×101015= \frac{-16.256 \times 10^{10} + 1.009 \times 10^{10}}{15} = \frac{-15.247 \times 10^{10}}{15}

Giving us our highly accurate final answer:

D0.2(2)=−1.016×1010D_{0.2}^{(2)} = -1.016 \times 10^{10}


Custom Extrapolation: Non-Standard Step Ratio

Richardson extrapolation isn’t limited to the standard hh and h/2h/2 pairing. As long as we know the ratio between two step sizes, we can combine their estimates to knock out that leading h2h^2 error term.

Let’s see how this plays out if we decide to replace hh with 3h/43h/4. We’ll start by recalling our standard central difference expansion:

Dh=f′(x)+f(3)(x)3!h2+O(h4)D_h = f'(x) + \frac{f^{(3)}(x)}{3!}h^2 + O(h^4)

If we evaluate this using a step size of 3h/43h/4 instead, the h2h^2 gets scaled by (3/4)2(3/4)^2, which gives us:

D3h/4=f′(x)+f(3)(x)3!9h216+O(h4)D_{3h/4} = f'(x) + \frac{f^{(3)}(x)}{3!}\frac{9h^2}{16} + O(h^4)

Our strategy remains exactly the same: we need to make the h2h^2 coefficients match so we can subtract them away. To turn that 9/169/16 back into a 1, we multiply the entire D3h/4D_{3h/4} equation by its reciprocal, 16/916/9:

169D3h/4=169f′(x)+f(3)(x)3!h2+O(h4)\frac{16}{9}D_{3h/4} = \frac{16}{9}f'(x) + \frac{f^{(3)}(x)}{3!}h^2 + O(h^4)

Now, if we subtract our original DhD_h equation from this scaled version, the h2h^2 terms cancel out perfectly:

169D3h/4−Dh=(169−1)f′(x)+O(h4)=79f′(x)+O(h4)\frac{16}{9}D_{3h/4} - D_h = \left(\frac{16}{9} - 1\right)f'(x) + O(h^4) = \frac{7}{9}f'(x) + O(h^4)

To wrap things up, we isolate f′(x)f'(x) by dividing both sides by 7/97/9 (which is the same as multiplying the numerator and denominator of our fraction by 9). This gives us our custom extrapolation formula:

Dh(1)=16D3h/4−9Dh7D_h^{(1)} = \frac{16D_{3h/4} - 9D_h}{7}

And just like that, using an arbitrary step ratio, we’ve successfully derived an estimate that completely avoids the O(h2)O(h^2) error.