Find the order of the error for the approximation $f' '(x)$

1.8k Views Asked by At

Given $$f''(x) = \frac{ f(x+h) - 2f(x) + f(x-h)}{h^2}.$$

I realize that this is just an approximation - that it won't give the exact value of $f''(x)$ and therefore there is an error term. However, I have no clue how to go about this question. Any help would be much appreciated!

1

There are 1 best solutions below

0
On

Use Taylor's expansion.

\begin{aligned} &f(x+h)=f(x)+f'(x)h+\frac{f''(x)}{2}h^2+\frac{f'''(x)}{2}h^3+\mathrm{O}(h^4)\\ &f(x-h)=f(x)-f'(x)h+\frac{f''(x)}{2}h^2-\frac{f'''(x)}{2}h^3+\mathrm{O}(h^4), \mathrm{add\,these\,two}\\ &f(x+h)+f(x-h)=2f(x)+f''(x)h^2+\mathrm{O}(h^4)\Rightarrow\\ &f''(x)=\frac{f(x+h)+f(x-h)-2f(x)}{h^2}+\mathrm{O}(h^2) \end{aligned}