A Taylor expansion I have asked a similar question elsewhere but there has remained a small gap for me:
How can I derive this approximate equation via the Taylor expansion: $$\frac{y(x+h)-y(x-h)}{2}-\frac{2h}{12}(y'(x+h)+4y'(x)+y'(x-h))=-\frac{1}{80}h^5y^{(5)}(x)+O(h^7) \ ?$$ Do we have to assume that $$y(x+h)-y(x-h)=2hy'(x)+\frac{1}{3}h^3y^{'''}(x)+\frac{1}{360}h^5y^{(5)}(x)+O(h^7)$$ or does this follow ? I think that it is too trivial to ask but the calculation doesn't follow for me.
 A: The Taylor expansion reads
\begin{eqnarray}
y(x+h) &=& y(x) + hy'(x) + \frac{h^2}{2!} y^{(2)}(x)+\ldots \\
y(x-h) &=& y(x) - hy'(x) + \frac{h^2}{2!} y^{(2)}(x)+\ldots \\
\end{eqnarray}
So the difference 'kills' the even derivatives and the first term is
$$
\frac12 [y(x+h)-y(x-h)]
= \color{red}{hy'(x) + \frac{h^3}{3!} y^{(3)}(x)} + \frac{h^5}{5!} y^{(5)}(x) 
$$
Repeating this for $y'$ yields
\begin{eqnarray}
y'(x+h) &=& y'(x) + hy^{(2)}(x) + \frac{h^2}{2!} y^{(3)}(x)+\ldots \\
y'(x-h) &=& y'(x) - hy^{(2)}(x) + \frac{h^2}{2!} y^{(3)}(x)+\ldots \\
\end{eqnarray}
It follows that
\begin{eqnarray}
[y'(x+h)+4y'(x)+y(x-h)]
&=& 6 y'(x) + 2\frac{h^2}{2!} y^{(3)}(x) + 2\frac{h^4}{4!} y^{(5)}(x) +\ldots \\
\frac{h}{6}[y'(x+h)+4y'(x)+y(x-h)]
&=& \color{red}{hy'(x) + \frac{h^3}{3!} y^{(3)}(x)} + \frac{h^5}{3\cdot 4!} y^{(5)}(x) +\ldots
\end{eqnarray}
The difference gives
$$
\frac{h^5}{4!} y^{(5)}(x) \left[ \frac15 - \frac13 \right]
=
-\frac{h^5}{180} y^{(5)}(x) + O(h^7) 
$$
which is the correct result.
