TITLE: To find maximum possible value of this integral
QUESTION [8 upvotes]: If $\int_{0}^{1} f dx=3$  and  $\int_{0}^{1} xf dx  =2$, then find the maximum value of $$\int_{0}^{1} f^2 dx.$$

What methods would apply to find this maximum value? I am not approaching the methods...

REPLY [12 votes]: Let $f(x) = 6x + \lambda (x^2-x+{1 \over 6})$. It is easy to check that $f$
satisfies the conditions and
$\int_0^1 f^2 = 12+\lambda^2 {1 \over 180}$.
Hence we can choose $\lambda$ as large as we want and so there is no maximum.
Here is how I approached the problem: Let $\langle f, g \rangle = \int_0^1 f(x)g(x) dx$.
Then we are looking to maximise $\|f\|^2$ for  $f$ such that $\langle f, x \mapsto 1 \rangle = 3$,
$\langle f, x \mapsto x \rangle = 2$.
By choosing a function that is orthogonal to $x \mapsto 1, x \mapsto x$, we
can add multiples of this function without changing the value of the constraints. In this case, one such function is $x \mapsto x^2-x+{1 \over 6}$.
The rest is algebra.