TITLE: $\int_0^1f(x)dx=1, \int_0^1xf(x)dx=\frac16$ minimum value of $\int_0^1f^2(x) dx$?
QUESTION [20 upvotes]: Let $f(x)\geq0$ be a Riemann integrable function, and 
$$\int_0^1f(x)\,\mathrm dx=1, \int_0^1xf(x)\,\mathrm dx=\frac16.$$
Find the minimum value of  $\int_0^1f^2(x)\,\mathrm dx$

Cauchy-Schwarz inequality?  en, I'm  in trouble for $f(x)\geq0$ 
Thank you

REPLY [17 votes]: We equip the space of Riemann square integrable functions on $[0,1]$ with the usual scalar product. Now we have
$$
\int_0^1(1-2x)f(x)dx=1-\frac{1}{3}=\frac{2}{3}
$$
Hence
$$
\frac{2}{3}=\int_0^{1/2}(1-2x)f(x)dx+\underbrace{\int_{1/2}^1(1-2x)f(x)dx}_{\leq 0}
$$
it follows that, if $g(x)=4(1-2x){\bf 1}_{[0,1/2]}$ then
$$
\frac{8}{3}\leq\int_0^{1}4(1-2x){\bf 1}_{[0,1/2]}f(x)dx=\langle f,g\rangle\tag{1}
$$
On the other hand we have 
$$\eqalign{
\Vert g\Vert^2&=16\int_0^{1/2}(1-2x)^2dx=\frac{8}{3}\leq\langle f,g\rangle\cr}
$$
So $\langle f-g,g\rangle\geq0$, hence
$$
\Vert f\Vert^2=\Vert f-g\Vert^2+\Vert g\Vert^2+2\langle f-g,g\rangle\geq
\Vert f-g\Vert^2+\Vert g\Vert^2\tag{2}
$$
But $g$ is positive and satisfies
$$\langle g,1\rangle =4\int_0^{1/2}(1-2x) dx=1,\quad
\langle g,x\rangle =4\int_0^{1/2}x(1-2x) dx=\frac{1}{6}
$$
So, from $(2)$ we conclude that $\Vert f\Vert^2\geq\Vert g\Vert^2$ with equality, if and only if $f=g$, and the desired minimum is $\Vert g\Vert^2=8/3$.
Acknowledgment I want to acknowledge here that this solution, came from  Vladimir's observation, presented in his answer.