Second Order forward finite difference scheme Show that
$d^2u/dx^2(x_i)=[(-u_{i+3})+(4u_{i+2})-(5u_{i+1})+2u_i]/h^2 +O(h^2)$ 
provided all terms in the expression are well defined is a second order finite difference scheme for second order derivative.
I know how to approach this question. I know I use the taylor expression and everything but I don't know which formula to use. For example, I know that when finding a first order derivative I use
$u'(x)=au(x+2h)+bu(x+h)+cu(x)+du(x-h)+eu(x-2h)$.
I've already solved a question using this but I don't know what the formula is for $u''(x)$. 
Would it be something like
$u''(x)=au(x+3h)+bu(x+2h)+cu(x+h)+du(x)+eu(x-3h)+fu(x-2h)+g(x-h) ? $ 
I'm pretty sure this is wrong because I don't think I should have this many unknowns. What equation should I be using?
 A: Substitute a smooth solution $u$ into the finite difference scheme to
get
\begin{align*}
 & \phantom{=}\frac{-u\left(x+3h\right)+4u\left(x+2h\right)-5u\left(x+h\right)+2u\left(x\right)}{h^{2}}\\
 & =-\frac{1}{h^{2}}\left[u\left(x\right)+3hu^{\prime}\left(x\right)+\frac{9}{2}h^{2}u^{\prime\prime}\left(x\right)+\frac{9}{2}h^{3}u^{\prime\prime\prime}\left(x\right)+O\left(h^{4}\right)\right]\\
 & \qquad+\frac{4}{h^{2}}\left[u\left(x\right)+2hu^{\prime}\left(x\right)+2h^{2}u^{\prime\prime}\left(x\right)+\frac{4}{3}h^{3}u^{\prime\prime\prime}\left(x\right)+O\left(h^{4}\right)\right]\\
 & \qquad-\frac{5}{h^{2}}\left[u\left(x\right)+hu^{\prime}\left(x\right)+\frac{1}{2}h^{2}u^{\prime\prime}\left(x\right)+\frac{1}{6}h^{3}u^{\prime\prime\prime}\left(x\right)+O\left(h^{4}\right)\right]\\
 & \qquad+\frac{2}{h^{2}}u\left(x\right).\\
 & =\frac{u\left(x\right)}{h^{2}}\underbrace{\left[-1+4-5+2\right]}_{0}+\frac{u^{\prime}\left(x\right)}{h}\underbrace{\left[-3+8-5\right]}_{0}\\
 & \qquad+u^{\prime\prime}\left(x\right)\underbrace{\left[-\frac{9}{2}+8-\frac{5}{2}\right]}_{1}+u^{\prime\prime\prime}\left(x\right)h\underbrace{\left[-\frac{9}{2}+\frac{16}{3}-\frac{5}{6}\right]}_{0}+O\left(h^{2}\right)\\
&=u^{\prime\prime}\left(x\right)+O\left(h^2\right)
\end{align*}
as desired.
