How prove this inequality $\left(\int_{0}^{1}f(x)dx\right)^2\le\frac{1}{12}\int_{0}^{1}|f'(x)|^2dx$ 
Let $f\in C^{1}[0,1]$ such that $f(0)=f(1)=0$. Show that
  $$\left(\int_{0}^{1}f(x)dx\right)^2\le\dfrac{1}{12}\int_{0}^{1}|f'(x)|^2dx.$$

I think we must use Cauchy-Schwarz inequality 
$$\int_{0}^{1}|f'(x)|^2dx\ge \left(\int_{0}^{1}f(x)dx\right)^2$$
but this maybe is not useful to problem.
The coefficient $\dfrac{1}{12}$ is strange. How find it ?
 A: In fact
$$ \left(\int_0^1(2x-1)f'(x)dx\right)^2\le\int_0^1(2x-1)^2dx\int_0^1(f'(x))^2dx. \tag1 $$
But
$$ \int_0^1(2x-1)f'(x)dx =-2\int_0^1f(x)dx$$
by using the Integration-by-Parts formula and
$$ \int_0^1(2x-1)^2dx=\frac{1}{3}. $$
Putting these two into (1), you can get the desired inequality.
A: Using integration by parts we find that $$\int_0^1 f(x)dx = - \int_0^1 xf'(x)dx$$
Then Cauchy-Schwarz will give $$\left( \int_0^1 x f'(x) dx \right)^2 \le \left( \int_0^1 |x f'(x)| dx \right)^2 \le  \int_0^1 x^2 dx \cdot \int_0^1 |f'(x)|^2 dx$$
A: Using integration by parts and $f(0)=f(1)=0$, we have:
$$ \int_0^y f(x)dx = \int_0^y(y-x)f'(x) dx$$ 
and 
$$ \int_y^1 f(x)dx = \int_y^1(y-x)f'(x) dx$$
for all $y\in [0,1]$. 
Taking $y=1/2$ and using Cauchy-Schwarz inequality we get:
$$ \left(\int_0^{1/2} f(x)dx\right)^2 = \left(\int_0^{1/2}({1/2}-x)f'(x) dx\right)^2 $$
$$\leq \int_0^{1/2}({1/2}-x)^2 dx \int_0^{1/2}(f'(x))^2 dx = \frac{1}{24} \int_0^{1/2}(f'(x))^2 dx$$
and
$$ \left(\int_{1/2}^1 f(x)dx\right)^2 = \left(\int_{1/2}^1({1/2}-x)f'(x) dx\right)^2 $$
$$\leq \int_{1/2}^1({1/2}-x)^2 dx \int_{1/2}^1(f'(x))^2 dx = \frac{1}{24} \int_{1/2}^1(f'(x))^2 dx.$$
So:
$$\frac{1}{2} \left(\int_0^{1} f(x)dx\right)^2\leq \left(\int_0^{1/2} f(x)dx\right)^2 + 
\left(\int_{1/2}^1 f(x)dx\right)^2 $$
$$\leq \frac{1}{24} \int_0^{1/2}(f'(x))^2 dx+\frac{1}{24} \int_{1/2}^1(f'(x))^2 dx = \frac{1}{24} \int_0^{1}(f'(x))^2 dx.$$
A: The parameter $\frac{1}{12}$ is kind of weird, it has the factor of 3, when the problem is about integration or derivation，we can assume it's about quadratic function.
what's more, as $f(0) = f(1) = 0$, we assume the equality stands when the function is symmetrical.
after trying, we can see function $f(x) = x(1-x)$ can satisfy the equality, while $f'(x) = -2x+1 = -2(x-\frac{1}{2})$.
in the light of the fact above, we substitute $\frac{1}{12}$ with $\int_{0}^{1}|x-\frac{1}{2}|dx$, using C-S inequality , we have:
$$
\frac{1}{12}\int_{0}^{1}|f'(x)|^2dx = \int_{0}^{1}|x-\frac{1}{2}|^2dx\int_{0}^{1}|f'(x)|^2dx \geq (\int_{0}^{1}|f'(x)(x-\frac{1}{2})|dx)^2
$$
$$
\int_{0}^{1}|f'(x)(x-\frac{1}{2})|dx \geq |\int_{0}^{1}f'(x)(x-\frac{1}{2})dx| = |\int_{0}^{1}f(x)dx|
$$
so, 
$$
(\int_{0}^{1}f(x)dx)^2 \leq \frac{1}{12}\int_{0}^{1}|f'(x)|^2dx
$$
A: By integration by parts,
\begin{align*}
\int_0^1f(x)\mathrm{d}x&=\int_0^1f(x)\mathrm{d}(x+C)\\
&=(x+C)f(x)\bigg|_0^1-\int_0^1(x+C)f'(x)\mathrm{d}x\\
&=-\int_0^1(x+C)f'(x)\mathrm{d}x
\end{align*}
Hence by Cauchy-Schwarz inequality
$$\left(\int_0^1f(x)\mathrm{d}x\right)^2\leqslant\int_0^1(x+C)^2\mathrm{d}x\int_0^1(f'(x))^2\mathrm{d}x$$
and,
$$\int_0^1(x+C)^2\mathrm{d}x=\frac{1}{3}(3C^2-3C+1)=g(C)$$
we can easily get $\min g(C)=g(\frac{1}{2})=\frac{1}{12}$. Therefore,
$$\left(\int_0^1f(x)\mathrm{d}x\right)^2\leqslant\frac{1}{12}\int_0^1(f'(x))^2\mathrm{d}x$$
