Find a formula to approximate $f''(x_0)$ which uses $f( x_0),f\left(x_0+\frac{h}{2}\right)$ and $f(x+2h)$.
My workings so far,
$$f''(x) \approx Af(x+2h) + B(x) + C f\left(x_0+\frac{h}{2}\right)$$
Expand in a Taylor series:
$$Af(x+2h) = Af(x) +2Ahf(x) + 2Ah^2f(x)$$ Do I need to solve this using the method of undetermined coefficients? I tried to do this with the rest but I am stuck!.
We have two obvious formulae for approximating $\require{cancel}f'(x_0)$: \begin{align} f'(x_0)&\approx \frac{f(x_0+2h)-f(x_0)}{2h}\tag{1}\label{1sta}\\ f'(x_0)&\approx \frac{f(x_0+h/2)-f(x_0)}{h/2}\tag{2}\label{1stb} \end{align} When you Taylor expand the RHS of both equations, there are no contribution from $f(x_0)$ and the contribution from $f'(x_0)$ are the same (this is why they approximate $f'(x_0)$). So it makes sense to try subtracting one from another, and the "next" derivative term $f''(x_0)$ will appear (in general, there won't be any miraculous cancellation): \begin{align} &\frac{f(x_0+2h)-f(x_0)}{2h}-\frac{f(x_0+h/2)-f(x_0)}{h/2}\\ &\approx \frac{\color{red}{f(x_0)}+\color{blue}{2hf'(x_0)}+\frac12(2h)^2f''(x_0)\color{red}{-f(x_0)}}{2h}\\ &\qquad\qquad-\frac{\color{red}{f(x_0)}+\color{blue}{\frac12hf'(x_0)}+\frac12(\frac12h)^2f''(x_0)\color{red}{-f(x_0)}}{h/2}\tag{3}\label{01cancel} \\ &=\left[\frac{\frac12(2h)^2}{2h}-\frac{\frac12(\frac12h)^2}{\frac12h}\right]f''(x_0)=\frac34hf''(x_0). \end{align} The cancellations in line \eqref{01cancel} are already alluded to above: $f(x_0)$ already don't appear in \eqref{1sta} and \eqref{1stb}, the $f'(x_0)$ cancel because they are the LHS of \eqref{1sta} and \eqref{1stb} which we are subtracting from. Now rearrange to give an approximation formula for $f''(x_0)$ \begin{align} f''(x_0)&\approx\frac{\dfrac{f(x_0+2h)-f(x_0)}{2h}-\dfrac{f(x_0+h/2)-f(x_0)}{h/2}}{\frac34h}\\ &=\frac{f(x_0+2h)-4f(x_0+h/2)+3f(x_0)}{\frac32h^2}. \end{align}