# Second-derivative finite-difference approximation: What is the correct order?

The "standard" second-derivative centered finite-difference approximation is given by LeVeque as $$u''(x)\approx\frac{u(x+h)+u(x-h)-2u(x)}{h^2}\,.$$ So if I insert $$u(x+h)=u(x)+h u'(x)+\frac{1}{2} h^2 u''(x)+\frac{1}{6} h^3 u^{(3)}(x)+\frac{1}{24} h^4 u^{(4)}(x)+\mathcal{O}\left(h^5\right)$$ and $$u(x-h)=u(x)-h u'(x)+\frac{1}{2} h^2 u''(x)-\frac{1}{6} h^3 u^{(3)}(x)+\frac{1}{24} h^4 u^{(4)}(x)+\mathcal{O}\left(h^5\right)$$ into the first equation, the $u(x)$, $u'(x)$, and $u'''(x)$ terms cancel, and the rest are divided by $h^2$ to give $$u''(x)+\frac{1}{12} h^2 u^{(4)}(x)+\mathcal{O}\left(h^3\right)\,.$$ Here I am assuming that $$\frac{\mathcal{O}(h^5)}{h^2}=\mathcal{O}(h^3)\,.$$ But LeVeque says the result should be $$u''(x)+\frac{1}{12} h^2 u^{(4)}(x)+\mathcal{O}\left(h^4\right)\,.$$ Where have I gone wrong?

• All of the odd degree terms cancel, provided enough regularity for them to even exist.
– Ian
Commented Jan 7, 2018 at 19:44

If you can't get the answer from the comment, write one more term. \begin{aligned} u(x+h)&=u(x)+hu'(x)+\frac{1}{2} h^2 u''(x)+\frac{1}{6} h^3 u^{(3)}(x)+\frac{1}{24} h^4 u^{(4)}(x)+\frac{1}{120} h^5 u^{(5)}(x)+\operatorname{O}\left(h^6\right) \\ u(x-h)&=u(x)-hu'(x)+\frac{1}{2} h^2 u''(x)-\frac{1}{6} h^3 u^{(3)}(x)+\frac{1}{24} h^4 u^{(4)}(x)-\frac{1}{120} h^5 u^{(5)}(x)+\operatorname{O}\left(h^6\right) \end{aligned} Add these two equations and observe that the odd degree terms cancel out. $$u(x+h)+u(x-h)=2u(x)+h^2\left(u''(x)+\frac{1}{12} h^2 u^{(4)}(x)+\operatorname{O}\left(h^4\right)\right)$$ This shows the desired error of the centered finite-difference approximation of the second derivative. $$\frac{u(x+h)+u(x-h)-2u(x)}{h^2}=u''(x)+\frac{1}{12} h^2 u^{(4)}(x)+\operatorname{O}\left(h^4\right)$$
• Note that this almost entirely follows by symmetry considerations: $\frac{f(x+h)+f(x-h)-2f(x)}{h^2}$ is invariant under $h \mapsto -h$.