TITLE: Approximation of first derivative?
QUESTION [7 upvotes]: Find the best approximation to the first derivative of $f(x)$ based on the values of $f(x), f(x+h), f(x+2h)$. What is the accuracy of this approximation?
I was thinking of using a central difference approximation (because it is a 2nd order approximation) but I am unsure if that is correct.

REPLY [5 votes]: Here's a slight elaboration of my comment to Henry's answer: consider the series expansion
$$\frac{f(x+h)-f(x)}{h}=f^\prime(x)+\frac{f^{\prime\prime}(x)}{2}h+\frac{f^{(3)}(x)}{6}h^2+\cdots$$
From this, we get the double-step expansion
$$\frac{f(x+2h)-f(x)}{2h}=f^\prime(x)+f^{\prime\prime}(x)h+\frac{2f^{(3)}(x)}{3}h^2+\cdots$$
Richardson extrapolation here consists of finding a linear combination of the two previous expansions that knocks out the $h$ term; we find that
$$2\frac{f(x+h)-f(x)}{h}-\frac{f(x+2h)-f(x)}{2h}=f^\prime(x)-\frac{f^{(3)}(x)}{3}h^2+\cdots$$
and the left-hand side, after simplification, is precisely the last expression Henry obtained.