I'm having some trouble with the following exercise:
Deduce the following approximation: $$f''(x) \approx \frac{f(x+2h) - 2f(x+h) + f(x)}{h^2}$$ for small values of $h$, and find an expression for the error commited when using this approximation.
I was able to get to the expression but I don't know how to get an expression for the error. In my classnotes my teacher claimed that the error commited in the approximation: $$f''(x) \approx \frac{f(x+h) - 2f(x) + f(x-h)}{h^2}$$ is $$E=-\frac {h^2}{12}f^{(4)}(t)$$
for some $t \in (x-h,x+h)$, but my teacher didn't show us the proof and thus I have no reference to do this problem. How can I find an expression for the error?
So you know that $$ \frac{f(x+2h) - 2f(x+h) + f(x)}{h^2}=f''(x+h)+O(h^2). $$ Then $$ f''(x+h)=f''(x)+hf'''(x)+O(h^2), $$ which tells you all you need.