<s>[INST] Minimize $\int\limits _{0}^{1} f^2(x) dx$ if $\int\limits_{0}^{1} f(x) dx = 1$, $\int\limits_{0}^{1} xf(x)dx = 1$ Any hints? Using integration by parts didn't produce any result. Interestingly, I cannot find any function $f(x)$ which such a property.
 [/INST] Using the standard inner product on $L^2$, we have
$$
\langle a+bx,f(x)\rangle=\int_0^1(a+bx)f(x)\,dx=a+b
$$
Also
$$
\|a+bx\|^2=\int_0^1(a+bx)^2\,dx=a^2+ab+b^2/3
$$
and, by Cauchy-Schwarz,
$$
\int_0^1f(x)^2\,dx\ge\frac{(a+b)^2}{a^2+ab+b^2/3}
$$
Setting $t=a/b$, we want to find the maximum of
$$
g(t)=3\frac{(t+1)^2}{3t^2+3t+1}
$$
Since
$$
g'(t)=-3\frac{(t+1)(3t+1)}{(3t^2+3t+1)^2}
$$
Note that $g(t)\ge0$, so the maximum is at $t=-1/3$, with
$$
g(-1/3)=4
$$
This value is actually attained:
$$
\int_0^1 (a(-1+3x))^2\,dx=a^2\int_0^2(1-6x+9x^2)\,dx=a^2(1-3+3)=a^2
$$
so $a=\pm2$; also
$$
\int_0^1a(-1+3x)\,dx=a(-1+3/2)=a/2
$$
so we need $a=2$. Finally
$$
\int_0^12x(-1+3x)\,dx=1
$$
</s>