Prove $\frac{dy}{dx}$ is approximated by $\frac{y(x+h)-y(x-h)}{2h}$ to $O(h^2)$

85 Views Asked by At

I tried to solve it by truncating the Taylor series expansions for $y(x+h)$ and $y(x-h)$ but I couldn't find a way to relate it to the derivative. I wasn't sure where the appropriate place to truncate was so I tried using 2nd order Taylor polynomials. Any suggestions?

1

There are 1 best solutions below

6
On BEST ANSWER

If $y$ is twice differentiable,

$$y(x+h)=y(x)+hy'(x)+O(h^2)$$ $$y(x-h)=y(x)-hy'(x)+O(h^2)$$ Subtract $$(y(x+h)-y(x-h))=2hy'(x)+O(h^2)$$ $$\frac{y(x+h)-y(x-h)}{2h}=y'(x)+O(h)$$ And the approximation is to $O(h)$ (actually, you can get $o(h)$ in this case, using Taylor-Young formula, but not $O(h^2)$).

However, if $y$ has a third derivative,

$$y(x+h)=y(x)+hy'(x)+\frac12h^2y''(x)+O(h^3)$$ $$y(x+h)=y(x)-hy'(x)+\frac12h^2y''(x)+O(h^3)$$ Subtract $$(y(x+h)-y(x-h))=2hy'(x)+O(h^3)$$ $$\frac{y(x+h)-y(x-h)}{2h}=y'(x)+O(h^2)$$ And then the approximation is to $O(h^2)$.