Exercise: Richardson on ln(x)

Approximating f(1.8)f'(1.8) for f(x)=lnxf(x)=\ln x with O(h)\mathcal{O}(h) forward differences and improving to O(h2)\mathcal{O}(h^2) via Richardson extrapolation.

Two steps and one extrapolation

Example

Find f(1.8)f'(1.8) for f(x)=lnxf(x)=\ln x with O(h)\mathcal{O}(h) forward differences and h=0.1h=0.1, and improve to O(h2)\mathcal{O}(h^2) with Richardson. The exact value is f(1.8)=11.8=0.5556f'(1.8)=\frac{1}{1.8}=0.5556.

  1. Forward approximation with hh and h/2h/2:

    N1(0.1)=f(1.9)f(1.8)0.1=0.5407,N1(0.05)=f(1.85)f(1.8)0.05=0.5480N_1(0.1)=\frac{f(1.9)-f(1.8)}{0.1}=0.5407,\qquad N_1(0.05)=\frac{f(1.85)-f(1.8)}{0.05}=0.5480
  2. Richardson extrapolation (all-terms case):

    N2(0.1)=N1(0.05)+[N1(0.05)N1(0.1)]=0.5480+0.0073N_2(0.1)=N_1(0.05)+\left[N_1(0.05)-N_1(0.1)\right]=0.5480+0.0073

The extrapolated value is much more accurate:

N2(0.1)=0.5553  0.5556=f(1.8)N_2(0.1)=0.5553\ \approx\ 0.5556=f'(1.8)