Error of midpoint rule is $E_m = \frac{f''(c)}{24}(b-a)^3$, where $c\in (a, b) $. I made research and I found out that i can approximate it by $E_m = \frac{f''(a)}{24}(b-a)^3 + O((b-a)^4)$, but i don't know how. Can someone make some step-by-step solution?
Edit:
Ok, I should add background to my problem.
I'm doing analysis of numerical integration methods and what I'm trying to do now is deriving Simpson method from errors of Mid-point rule and trapezoid rule.
As I mentioned earlier I made research and I found out that:
$E_m = \frac{f''(a)}{24}(b-a)^3 + O((b-a)^4)$, and for trapezoid rule:
$E_t = \frac{f''(a)}{-12}(b-a)^3 + O((b-a)^4)$.
Since I know that, I can take weighted avarage $\frac{2E_m + E_t}{3} = O((b-a)^4)$ (which is actually how we get Simspons rule).
And here comes my problem becouse on my own I was beable to calculate:
$E_m = \frac{f''(c)}{24}(b-a)^3$, $E_t = \frac{f''(d)}{-12}(b-a)^3$, $c, d \in (a, b)$
I already found earlier that I may should try with Taylor, but I don't know how to do it properly, that's why I wanted step-by-step solution.
Thanks.
$E_m = \frac{f''(a)}{24}(b-a)^3 + O((b-a)^4)$ comes directly from the Taylor series of $f$ around $a$. This approximates of course the remainder term $E_m = \frac{f''(c)}{24}(b-a)^3$ due to Taylor's theorem.