Show inequality of integrals (cauchy-schwarz??)
$f:[0,1]\to\mathbb{C}$ continuous and differentiable and $f(0)=f(1)=0$. Show that $$ \left |\int_{0}^{1}f(x)dx \right |^2\leq\frac{1}{12}\int_{0}^{1} \left |f'(x)\right|^2dx $$ Well I know that $$ \left |\int f(x)\cdot g(x)\ dx \right|^2\leq \int \left |f(x) \right|^2dx\ \cdot \int \left |g(x) \right |^2dx $$ and I think I should use it, so I guess the term $g(x)$ has to be kind of $\frac{1}{12}$ but I have no idea how I can choose g(x) so that I can show the inequality.
advice?
Integrate by parts to get $$ \int_0^1 f(x)\,dx = -\int_0^1 (x-1/2)f'(x)\,dx, $$ and then use Cauchy-Schwarz: $$ \begin{align*} \left|\int_0^1 (x-1/2)f'(x)\,dx\right|^2 & \leq \int_0^1(x-1/2)^2\,dx\int_0^1|f'(x)|^2\,dx \\ & = \frac{1}{12}\int_0^1|f'(x)|^2\,dx \end{align*} $$