TITLE: Let $g$ be a differentiable, continuous function $[0,1]$ and $a≤g'(x)≤b$ for all $x\in [0,1]$
QUESTION [6 upvotes]: Let $g$ be a differentiable, continuous function $[0,1]$ and $a≤g'(x)≤b$ for all $x\in [0,1]$ 
Then prove that : 
$$\frac{b^2}{12}≥\int_0^{1}g^{2}(x)dx-\left(\int_0^{1}g(x)dx\right)^{2}≥\frac{a^2}{12}$$
I'm trying using Hölder ? But I don't know how. 
I don't have any ideas to prove this inequality ? 
I think this is related with measure theory. 
If any one have idea please tell me.

REPLY [4 votes]: I'll assume that $a, b>0$ and the RHS is $a^{2}/12$, not $a^{2}/10$. (Otherwise, there is a counterexample.) By the Mean Value Theorem, we have
$$
a\leq \frac{g(y) - g(x)}{y-x} = g'(c) \leq b\Rightarrow a(y-x) \leq g(y)-g(x) \leq b(y-x)
$$
for any $y>x$. By the way, 
$$
\int_{0}^{1}\int_{0}^{1} (g(y)- g(x))^{2} dydx = \int_{0}^{1} \int_{0}^{1} g(x)^{2} - 2g(x)g(y) + g(y)^{2} dydx = 2 Var(g)
$$
where 
$$
Var(g) = \int_{0}^{1} g(x)^{2} dx - \left( \int_0^1 g(x)dx\right)^{2}
$$
which implies 
$$
\frac{a^{2}}{12} = a^{2}\int_{0}^{1}\int_{0}^{1}(x-y)^{2}dydx \leq Var(g) \leq b^{2}\int_{0}^{1}\int_{0}^{1}(x-y)^{2}dydx = \frac{b^{2}}{12}
$$