TITLE: An integral inequality for variance
QUESTION [5 upvotes]: Suppose the real valued function $f$ is differentiable on $[0,\,1]$ with bounded derivative. How do we prove the following? 
$$\int_0^1 f^2-\bigg(\int_0^1 f\bigg)^2\le \frac1{12}\sup_{x\in[0,1]}|f'(x)|^2.$$
I tried substituting $f(x)^2=f(0)^2+2\int_0^x f(t)f'(t)\,dt$, but it did not seem to work.

REPLY [4 votes]: Let $X \sim U(0,1)$, then we may write the left-hand side as $\mathbb{V}(f(X))$. Now the variance is invariant under translations, so $\mathbb{V}(f(X)) = \mathbb{V}(f(X)-f(1/2))$. This yields
\begin{align}\mathbb{V}(f(X)-f(1/2)) &= \int_{0}^{1}(f(x)-f(1/2))^2 dx - \left(\int_{0}^{1} f(x) - f(1/2)dx\right)^2 \\
&\leq \int_{0}^{1} (f'(\xi_x)(x-1/2))^2 dx \leq \sup_{x\in [0,1]}|f'(x)|^2\int_{0}^{1}(x-1/2)^2 dx \\
&= \frac{1}{12}\sup_{x\in [0,1]}|f'(x)|^2 \\
&   \end{align}