Consider the formula :
$$\displaystyle \int_{a}^{a+h} f(x) \, \mathrm{d}x=K_1hf(a+h)+error term$$
1/ Find $K_1$ by polynomial interpolation.
2/ Find the Taylor expansion of the error term when $h\to 0$ and predict the polynomial order on the error term basis.
1/ we approximate f|[a,a+h] using a single interpolation point $[a+h]$ : $p(x)=f(a+h)$
$\displaystyle \int_{a}^{a+h} f(x) dx \, \mathrm{d} \approx \int_{a}^{a+h}p(x) dx = f(a+h)[a+h-a]=h*f(a+h)$
So we have $K_1$=1.
2/ $p(h)=f(a+h)$
The Taylor expansion is : $p(h)=f(a)+f'(a)*h+f"(a)*h²/2+....$
$\displaystyle I(h)=\int_{a}^{a+h} f(x) \, \mathrm{d}x$
The Taylor expansion is :
$I(h)=0+f(a)h+f'(a)*h/2+....$
The error term is : $I(h)-p(h)=0+f(a)h+f'(a)*h/2-f(a)-f'(a)*h-f"(a)*h²/2$
The error should be in h, but here the leading term is f(a) !! as h tends to 0? I don't know where is the mistake
Thanks