[Math] Richardson extrapolation – deriving methods for forward difference

approximation-theoryfinite differencesnumerical methodspolynomials

I am rather stuck on a question from a textbook that I am practicing from which goes as follows:

The forward difference formula can be expressed as $$f'(x_{0}) = \frac{1}{h}[f(x_{0} + h) – f(x_{0})] – \frac{h}{2}f^{2}(x_{0}) – \frac{h^{2}}{6}f^{3}(x_{0}) + O(h^{3})$$

Use extrapolation to derive an $O(h^{3})$ formula for $f'(x_{0})$. Basically the textbook has an answer that is given by $$f'(x_{0}) = \frac{1}{12h}[f(x_{0} + 4h) – 12f(x_{0} + 2h) + 32f(x_{0} + h) – 21f(x_{0})]$$ which is $O(h^{3})$.

Would someone mind explaining how this answer was arrived upon ? I arrived at a different answer where instead of using an expansion of points, I shrunk the it by using the points $(x_{0} + h/4,f(x_{0} + h/4)),(x_{0} + h/2,f(x_{0} + h/2)),(x_{0} + h,f(x_{0} + h))$ which gave me different coefficients and I am not sure if this is correct.

Also it would be nice if someone could explain when it is the case that when should reduce the side of the stepsize, h, as opposed to expanding it. The textbook covers a case of richardson extrapolation by reducing $h$ but I am slightly confused when to make the decision.

Thank you

Best Answer

If you expand the terms of the rhs as Taylor series around $h=0$, you have $$f(x+4h)=f(x)+4 h f'(x)+8 h^2 f''(x)+\frac{32}{3} h^3 f^{(3)}(x)+\frac{32}{3} h^4 f^{(4)}(x)+O\left(h^5\right)$$ $$f(x+2h)=f(x)+2 h f'(x)+2 h^2 f''(x)+\frac{4}{3} h^3 f^{(3)}(x)+\frac{2}{3} h^4 f^{(4)}(x)+O\left(h^5\right)$$ $$f(x+h)=f(x)+h f'(x)+\frac{1}{2} h^2 f''(x)+\frac{1}{6} h^3 f^{(3)}(x)+\frac{1}{24} h^4 f^{(4)}(x)+O\left(h^5\right)$$ Combining all of the above gives $$f(x + 4h) - 12f(x + 2h) + 32f(x + h) - 21f(x)=12 h f'(x)+4 h^4 f^{(4)}(x)+O\left(h^5\right)$$ Now, let us do the same with your data points $$f(x+\frac h4)=f(x)+\frac{1}{4} h f'(x)+\frac{1}{32} h^2 f''(x)+\frac{1}{384} h^3 f^{(3)}(x)+\frac{h^4 f^{(4)}(x)}{6144}+O\left(h^5\right)$$ $$f(x+\frac h2)=f(x)+\frac{1}{2} h f'(x)+\frac{1}{8} h^2 f''(x)+\frac{1}{48} h^3 f^{(3)}(x)+\frac{1}{384} h^4 f^{(4)}(x)+O\left(h^5\right)$$ $$f(x+h)=f(x)+h f'(x)+\frac{1}{2} h^2 f''(x)+\frac{1}{6} h^3 f^{(3)}(x)+\frac{1}{24} h^4 f^{(4)}(x)+O\left(h^5\right)$$ Now write $$F=af(x+\frac h4)+bf(x+\frac h2)+cf(x+h)+df(x)$$ and cancels as many terms as you can (you must set equal to $1$ the coefficient of $f'(x)$); this gives $$a+b+c+d=0$$ $$a+2b+4c=4$$ $$a+4b+16c=0$$ $$a+8b+64c=0$$ and the solutions are $$a=\frac{32}3\qquad b=-4\qquad c=\frac 13 \qquad d=-7$$ which gives $$F=h f'(x)+\frac{1}{192} h^4 f^{(4)}(x)+O\left(h^5\right)$$

Related Question