derive the following differentiation formula
$$f''(0)=f(-1)-2f(0)+f(1) $$
a) using interpolation
b) using method of undetermined coefficients
c) find an upper bound for the error $\lvert e''(0)\rvert$
derive the following differentiation formula
$$f''(0)=f(-1)-2f(0)+f(1) $$
a) using interpolation
b) using method of undetermined coefficients
c) find an upper bound for the error $\lvert e''(0)\rvert$
On
$$ f(x) = f\left(x_{0} \right) + \sum_{k=1}^{\infty} \frac{\left(x-x_{0}\right)^{k}}{k!}f^{k}(x_{0}) $$
Look left: $$ f'(x_{0} \color{red}{-} h) = f\left(x_{0} \right) \color{red}{-} f'\left(x_{0} \right) h + f''\left(x_{0} \right) \frac{h^{2}}{2!}\color{red}{-} f'''\left(x_{0} \right) \frac{h^{3}}{3!} + \dots \tag{2} $$
$(1) \color{red}{-} (2)$ $$ f'(x_{0}) = \frac{f(x_{0} + h) - f(x_{0} - h)}{2h} + \mathcal{O}\left( h^{2} \right) \tag{3} $$
$(1) \color{blue}{+} (2)$ $$ f''(x_{0}) = \frac{f(x_{0} - h) - 2f(x_{0}) + f(x_{0} + h)}{h^{2}} + \mathcal{O}\left( h^{2} \right) \tag{4} $$
The stated question is in the form $(4)$ with the assignments $$ x_{0} = 0, \quad h = 1 $$
Rearrange $(1)$ for the forward difference approximation $$ f'_{R}(x_{0}) = \frac{f(x_{0}+h) - f(x_{0})}{h} + \mathcal{O}\left( h \right) \tag{5} $$ Rearrange $(2)$ for the backward difference approximation $$ f'_{L}(x_{0}) = \frac{f(x_{0}) - f(x_{0}-h)}{h} + \mathcal{O}\left( h \right) \tag{6} $$ Derive $(4)$ from $(5)$ and $(6)$ $$ \begin{align} % f''(x_{0}) &= \left( f'(x_{0}) \right)' \\ &= \left( \frac{f(x_{0} + h) - f(x_{0} - h)}{h} \right)' \\ &= % \frac{f'_{R}(x_{0}) - f'_{L}(x_{0})}{h} \\ % &= \frac{ \frac{f(x_{0}+h) - f(x_{0})}{h} - \frac{f(x_{0}) - f(x_{0}-h)}{h}} {h} \\ % & = \frac{f(x_{0} - h) - 2f(x_{0}) + f(x_{0} + h)}{h^{2}} % \end{align} $$
The truncation error in $(1)$ and $(2)$ is majorized by $$ M \frac{h^{2}}{3!} $$
hint
$$f (1)\approx f (0)+f'(0)+\frac{f''(0)}{2}$$
$$f (-1)\approx f (0)-f (0)+\frac {f''(0)}{2} $$
by sum, we find
$$f (1)+f (-1)=2f (0)+f''(0) $$