I was given the following integration rule:
$$\int_{x_0}^{x_1} y(x)\ dx = h(ay_0 + by_1 + cy_2) +R $$
Where $x_i = x_0 + ih$ and $y(x_i) = y_i$
I found that $a=5/12, b=2/3$ and $c=-1/12$ in order to make the rule exact for $\{1,x,x^2\}$.
Now, I was asked to show that $R = ky^{(n)}(\xi)$ where $x_0 \le \xi \le x_2$, but I'm not sure how to do it.
I'd be glad for help!
EDIT:
The final solution is: $$R = \frac{C}{3!}y^{(3)}(\xi), \ x_0 < \xi < x_1$$
Where $$C = \int_{x_0}^{x_1} x^3 dx - h(ax_0^3 +bx_1^3 + cx_2^3) = \frac{h^4}{24}$$
How to reach this solution? Is there a theorem behind that?