My question seems pretty easy. Prove the correctness of the following approximation:
$f(x)''= \frac{-f(x-2h)+16f(x-h)-30f(x)+16f(x-h)-f(x+2h)}{12h^2}$
I rendered myself deeply saddened upon stumbling on this and being seemingly unable solve it by my own. I also failed to find proof anywhere online. Only final answer.
The way I tried to it is via pretty common Taylor series expansion:
$f(x+h) = f(x) + f'(x)h+\frac{1}{2!}f''(x)h^2+\frac{1}{3!}f^{(3)}(x)h^3 + \sum_{n=4}^\infty \frac{1}{n!}f^{(n)}(x)h^n\quad (1)$
I cut it off after $f^{(3)}$.
I use this formula to get rest of the points to have 5-stencils, simply by substituting $h$ with $\{-h; 2h; -2h\}$ Thus I get:
$f(x-h) = f(x) - f'(x)h+\frac{1}{2!}f''(x)h^2-\frac{1}{3!}f^{(3)}(x)h^3\quad (2)$ $f(x+2h) = f(x) + 2f'(x)h+\frac{4}{2!}f''(x)h^2+\frac{8}{3!}f^{(3)}(x)h^3\quad (3)$ $f(x-2h) = f(x) - 2f'(x)h+\frac{4}{2!}f''(x)h^2-\frac{8}{3!}f^{(3)}(x)h^3\quad (4)$
When I use equations $(1)$ and $(2)$, and add them by sides, I can get the 3-point formula:
$f(x+h) + f(x-h) = 2f(x) + f''(x)h^2\quad (5)$
$f''(x) = \frac{f(x-h) - f(2x) + f(x+h)}{h^2}$
However when I try to do this with all the equations $(1)$-$(4)$ I get:
$f(x+h) + f(x-h) = 2f(x) + f''(x)h^2 \quad (6)$
$f(x+2h) + f(x-2h) = 2f(x) +4f''(x)h^2\quad (7)$
Then I can try subtracting $(6)$ from $(7)$ and I get:
$f(x+h) + f(x-h) - f(x+2h) - f(x-2h) = 3 f''(x)h^2\quad (8)$
which gives
$f''(x) = \frac{f(x+h) + f(x-h) - f(x+2h) - f(x-2h) } {3 h^2} \quad(9)$
This is clearly different from what I am expecting. Also doing $(6)$+$(7)$ doesn't seem to yield correct coefficients, even though it preserves $f(x)$ term.
Could you point out flaw in the approach and provide correct reasoning or any materials? All I found were very general or final answers with no explicit transformations. I feel kinda stupid being unable to get it right but I can't spot the flaw.