Finding the error of $f''(x) \approx \frac{f(x+2h) - 2f(x+h) + f(x)}{h^2}~$

239 Views Asked by At

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?

2

There are 2 best solutions below

2
On

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.

0
On

$$f(x+2h)=f(x)+2hf'(x)+\frac{(2h)^2}2f''(x)+\frac{(2h)^3}6f'''(x)+\frac{(2h)^4}{24}f^{(4)}(t)\\-2f(x+h)=-2(f(x)+hf'(x)+\frac{h^2}2f''(x)+\frac{h^3}6f'''(x)+\frac{h^4}{24}f^{(4)}(t))\\f(x)=f(x) $$ sum of them $$f(x+2h)-2f(x)+f(x)=\\(f(x)-2f(x)+f(x))+\\(2hf'(x)-2hf'(x))+\\(\frac{(2h)^2}2f''(x)-2\frac{h^2}2f''(x))+\\(\frac{(2h)^3}6f'''(x)-2\frac{h^3}6f'''(x))+\\...\\=\frac{h^2}2f''(x)(4-2)+....=\\o(h^2)$$