# Difference of definite integrals inequality

Could you help me how prove that for any $\mathcal{C}^1$ function we have:

$$\left|\int_{a} ^{\frac{a+b}{2}}f(x) d x - \int_{\frac{a+b}{2}} ^bf(x)dx\right| \le \frac{(b-a)^2}{4} \cdot \max _{x \in [a,b]} |f'(x)|.$$

-
You were missing an integrand, so I edited. Is this what you meant? – 1015 Jun 6 '13 at 18:54
Yes, this is exactly what I meant. Could you help me with that? – Hagrid Jun 6 '13 at 18:57
You already got an excellent hint. Note that the inequality is optimal, as $f(x)=x$ achieves the equality. – 1015 Jun 6 '13 at 19:02
A small comment: if you replace $\max$ with $\sup$ in the inequality, then both the statment and the answer below are still valid when $f$ is only differentiable, i.e. the continuity of $f'$ is not necessary. – 23rd Jun 6 '13 at 19:11

Hint: Using mean value theorem for $$\left|\int_{a} ^{\frac{a+b}{2}}f(x) d x - \int_{\frac{a+b}{2}} ^bf(x)dx\right| =\left|\int_{a} ^{\frac{a+b}{2}}\big[f(x)-f(x+\frac{b-a}{2})\big] d x \right|.$$
@Hagrid $\int_{\frac{a+b}{2}}^b f(x)dx =\int_{a} ^{\frac{a+b}{2}}f(x+\frac{b-a}{2})d x$ – Ma Ming Jun 6 '13 at 19:13
Aha. Thank you. Is it equal to $|F(\frac{a+b}{2})-F(a) - F(\frac{a+b}{2} - \frac{b-a}{2})+F(a + \frac{b-a}{2})|$?, where $F'(x) = f(x)$ – Hagrid Jun 6 '13 at 19:36