Let $I(f)=\int_a^b f(x)\, dx$. The midpoint rule (open Newton-Cotes for $n=0$) is $I_0(f)=(b-a)f(\frac{a+b}{2})$
Show: For $f\in C^2([a,b])$ holds $|I(f)-I_0(f)|\leq \frac{(b-a)^3}{24}\|f''\|_\infty$
This question is related to: Midpoint rule, error estimation, $|I(f)-I_0(f)|\leq\frac{(b-a)^2}{4}\|f'\|_\infty$
I tried to adapt the given proof by RRL, but I did not succed and appreciate any hints.
As in the answer by RRL let $h=(a-b)$ and $c=\frac{a+b}{2}$
I used the Taylor formula, to write:
$T_2 f(x,c)=f(c)+f'(c)(x-c)+f''(c)(x-c)^2$
With this, I get to:
$\int_a^b f(x)\, dx - hf(c)=\int_a^b f'(c)(x-c)+\frac12 f''(c)(x-c)^2\, dx$
The problem is, that I can not stipulate by $\|f''\|_\infty$ like in the other question.
Is there a way to avoid the first derivative?
Thanks in advance.
With $f \in C^2([a,b])$ the second-derivative is bounded and we can obtain an error estimate that is $\mathcal{O}(h^3)$.
Using the Taylor approximation with Lagrange remainder,
$$f(x) = f(c) + f'(c)(x-c) + \frac{1}{2}f''(\xi_x)(x-c)^2,$$
the midpoint-rule error estimate is
$$\left|\int_a^b f(x)\, dx - hf(c) \right|\leqslant \left|\int_a^b f'(c)(x-c) \, dx \right|+ \left|\frac{1}{2}\int_a^b f''(\xi_x)(x-c)^2 \, dx \right|$$
Note that, since $b-c = c- a = h/2$, we have
$$\int_a^b f'(c)(x-c) \, dx = \frac{f'(c)}{2}\left((b-c)^2 - (a-c)^2 \right)= \frac{f'(c)}{2}\left(\frac{h^2}{4} - \frac{h^2}{4} \right) =0$$
Thus,
$$\left|\int_a^b f(x)\, dx - hf(c) \right| \leqslant \frac{1}{2}\int_a^b |f''(\xi_x)|(x-c)^2 \, dx \leqslant \frac{1}{2} \|f''\|_\infty\frac{1}{3}( \, (b-c)^3 - (a-c)^3\, )\\ = \frac{h^3}{24} \|f''\|_\infty $$