Given the values $f(0),f(h),f(2h)$ and $f'(h)$ , I need to find a numerical differentiation of highest approximation order to approximate $f''(0)$. Usually I'd use Taylor expansion , but I need to find the highest order approximation and prove why is it actually the highest order approximation.
I'd be thankful if anyone could point me to the solution,thanks in advance !
Obviously, you already did the Taylor series computation leading to \begin{align} &a_0f(0)+a_1f(h)+a_2f(2h)+b_1hf'(h)\\ &= (a_0+a_1+a_2)f(0)+(a_1+2a_2+b_1)f'(0)h+\tfrac12(a_1+4a_2+2b_1)f''(0)h^2+\tfrac16(a_1+8a_2+3 b_1)f'''(0)h^3+\tfrac1{24}(a_1+16a_2+4b_1)f^{IV}(0)h^4+...\\ \end{align} leading to the system of linear equations $$ \begin{aligned} a_0+a_1+a_2&=0\\ a_1+2a_2+b_1&=0\\ a_1+4a_2+2b_1&=2\\ a_1+8a_2+3 b_1&=0 \end{aligned} \quad\implies\quad \begin{aligned} a_1&=-2\\a_1+b_1&=4\\b_1&=6\\a_2&=-2\\a_0&=4 \end{aligned} $$ That is $$ f''(0)=2\frac{2f(0)-f(h)-f(2h)+3hf'(h)}{h^2}-\frac5{12}f^{IV}(0)h^2+O(h^3) $$ Since there is no degree of freedom left over, the coefficient of the fourth derivative can not be set to zero without changing the coefficient of a lower derivative, it remains at $-\frac5{12}$. All combinations of derivative values up to the fourth derivative can naturally be achieved using polynomials, so the linear equations are all necessary.