If
$$\int_0^1xf(x) dx=\int_0^1f(x) dx = 1$$
prove that
$$\int_0^1(f(x))^2 dx \geq 4$$
EDIT My attempt is as follows - I can use only the $\int xf(x)$dx part to get a bound $\int f^2(x) dx \geq 3$ from cauchy schwarz. I can't think of ways how to incorporate the other given condition.
Of course once the inequality condition is obtained (or guessed by trying out a general linear polynomial), Cauchy-Schwarz is a breeze:
$$\int_0^1 f^2 dx \ge \frac{\left(\int_0^1 (3xf-f)dx\right)^2}{\int_0^1(3x-1)^2 dx } = \frac{4}{1}=4$$
Equality is when $f(x)$ is proportional to $3x-1$.
In general we can have $$\int_0^1 f^2 dx \ge \frac{\left(\int_0^1 (axf+bf)dx\right)^2}{\int_0^1(ax+b)^2 dx } = \frac{(a+b)^2}{a^2/3+ab+b^2}$$ where the maximum is when $(a, b)$ is proportional to $(3, -1)$, so $4$ is indeed the best possible.