[Math] Deriving the approximation formula

approximation

$f'(x) \thickapprox$ $\frac{1}{2h} [ 4f(x+h) – 3 f(x) + f(x + 2h)]$

I need to derive the approximation formula for the function above. And I need to show that it's error term is of the form $\frac{1}{3}h^2 f'''(\xi)$

How do I go around doing this? I've been suggested to use the Central Difference Formula or Forward or Backward Approximation

Best Answer

Let $f(x)=x$. Then $$4f(x+h)-3f(x)+f(x+2h)=4(x+h)-3x+(x+2h)=2x-2h.$$ When you divide by $2h$, you get $\dfrac{x}{h}-1$. This is nowhere near the derivative. Actually, there is also terrible behaviour for the function $f(x)=1$!

How to modify so that things look roughly like the given expression? There are lots of possibilities. For sure the coefficients need to have sum $0$. My two guesses as to what might have been meant have error behaviour worse than the one asked for.

Probably the most popular approximation formula that in general behaves better than the ordinary $(f(x+h)-f(x))/h$ is $(f(x+h)-f(x-h))/2h$. It has error behaviour of the kind you want, with I think $1/6$ instead of $1/3$.

There are many others, involving more complicated combinations of differences.

Remark: Suppose that a numerical differentiation procedure has error behaviour of the type that you are looking for. Then since the third derivative of $1$, $x$, and $x^2$ is identically $0$, the procedure must be exact for $f(x)=1$, $f(x)=x$, and $f(x)=x^2$.