I have been given a question that reads:
Use the method of undetermined coefficients to find an approximation for the second derivative of the form: $$f''(0) \approx A f(-h) + B f(0) + C f(h),$$ which is exact for all quadratic polynomials.
To be perfectly honest, I have no idea how to commence this question, nor the purpose of it, nor how it works. Any help or guidance would be much appreciated!
Let's use $$f(x)=ax^2+bx+c$$ Then $$f''(0)=2a$$ Now we plug in this form of $f$ into the original equation, and we know that for quadratic polynomial is exact (so $\approx$ becomes $=$) $$f''(0)=A\left(a(-h)^2+b(-h)+c)\right)+B(a0^2+b0+c)+C(ah^2+bh+c)$$ Now let's group terms as powers of $h$: $$2a=h^2a(A+C)+hb(-A+C)+c(A+B+C)$$ This is valid for any value of $h$, and any values of $a,b,c$. So $$A+B+C=0\\-A+C=0\\(A+C)h^2=2$$ This means $A=C$ (in the second equation), $$2Ah^2=2\\A=\frac{1}{h^2}$$ Then finally $B=-2A$. With these: $$f''(0)=\frac{f(-h)-2f(0)+f(h)}{h^2}$$ This is the same formula as on wikipedia, with $x=0$.