I am studying for an exam and I would like to receive feedback on my solution to a past problem on numerical integration and/or receive suggestions about how to improve my analysis. The question is as follows.
A quadrature method has the form $\int_0^h f(x) d x \approx a f(h / > 2)+b f(h)$.
(a) Determine $a$ and $b$ such that the method is exact for the highest degree polynomial $p(x)=f(x)$ with the constraint $f(0)=p(0)=0$.
(b) Give an error estimate for the approximation if $f > \in C^3, f(0)=0$.
(c) Describe how Richardson extrapolation can be used for an error estimate and to enhance the accuracy.
Part A
Since $p(x)=0$, we want to consider a quadratic polynomial $tx+rx^2$ since it is the lowest degree polynomial with two free parameters vanishing at zero. We compute that $$\int_0^h p(x)\,dx = t\frac{1}{2}h^2 + r\frac{1}{3}h^3$$ and $$af(h/2)+bf(h)=t(ah/2+bh) + r(ah^2/4 +bh^2).$$ Equating coefficients, we find that $a=2h/3, b=h/6$.
Part B
We use that we can write $f(x)= f'(0)x +\frac{1}{2}x^2f''(0)+\frac{1}{6} f'''(\xi(x))x^3$for some $\xi(x)\in[0,h]$. The quadrature formula is exact for the quadratic part of $f$, hence the error is
$$\frac{1}{6}\int_0^h f'''(\xi(x))x^3\,dx + (2h/3)\frac{1}{6}(h/2)^3f'''(h/2) + \frac{h}{6}h^3 f'''(h),$$ which is bounded above in magnitude by the triangle inequality by $C h^4 \| f'''\|_{L^\infty(0,h)}.$ for some fixed $C>0$.
Part C
If we have an asymptotic expansion for an integral $I(h)$ of the following form, with $a_0$ the estimate and the rest as error terms, $$I(h)=a_0 + h^2a_2 + h^4 a_2 + \ldots,$$ Richardson extrapolation consists of first computing $$I_2(h)=\frac{4I(h/2)-I(h)}{3}a=a_0+O(h^4).$$ Notice that now the error is of order $h^4$ instead of $h^2$, an improvement of $h^2$. The procedure can be repeated to obtain an error of $h^{2N}$ for any positive integer $N$.
Beyond the correctness of the calculations, I am also interested in whether there are more efficient or different ways of solving this problem.