Let $f \in C^2 [a,b]$. Define $$\omega_2(r)= \sup \{||f''(x)|-|f''(y)|| \, : \, |x-y|\leq r\}$$ we can prove that $\omega_2(r)$ is continuous.
The following lemma is given in Convergence rates of approximate sums of Riemann integrals by Hiroyuki Tasaki, Lemma 4.2 page 487.
If either $f''(x) \geq 0$ or $f''(x)\leq 0$ for all $x \in [p,q] \subseteq [a,b]$ ($f''(x)$ does not change sign) then we have $$\left|\left|\int_p^q f(x) \, dx - (q-p)\left(\frac{f(q)+f(p)}{2}\right)\right| - \left(\frac{(q-p)^3}{12}\right) |f''(\xi)| \right| \leq \frac{1}{12} \omega_2 (q-p) (q-p)^3$$
I need a confirmation, is the condition $f''\geq 0$ or $f'' \leq 0$ necessary?
I think I've proven the inequality without the condition, but maybe I made an error. it's quite simple:
By mean value theorem for integral since $(p-x)(x-q)$ is always nonnegative on $[p,q]$ we have there exists $c\in (p,q)$ such that $$\int_p^q (p-x)(x-q)f''(x)\, dx=f''(c)\int_p^q (p-x)(x-q)\, dx = \frac{1}{12}f''(c)(q-p)^3$$ Using integration by part twice we have $$\int_p^q (p-x)(x-q)f''(x)\, dx=\frac{(q-p)}{2}[f(p)+f(q)]-\int_p^q f(x) \, dx $$
Thus the above inequality is reduced to $||f''(c)|-f''(\xi)|| \leq \omega_2(q-p)$, which is true.
Just need to know if this prove has error or not.
Nevermind the proof is fine. The condition $f"$ does not change sign was silently used on the last page of page 488, see http://www.sciencedirect.com/science/article/pii/S0021904508002335