Let $f: [0,1] \to \mathbb R$ be a continuous function. What is the maximum value of the following functional?
$$\displaystyle \int_0 ^1 f(x)(x^2) \,\mathrm d x - \int_0^1 x(f(x)^2) \,\mathrm d x $$
Unable to understand how to solve this problem. I have thought about it analytically and think that the following points are important:
- $x^2 \le x$ for $x\in [0,1]$
- $(f(x) )^2 x ^2 \le x(f(x))^2$
How do I proceed from here?
We have $$ \begin{aligned} \int_0^1 f(x) \cdot x^2 \,dx - \int_0^1 f^2(x) x \,dx &\leq \sqrt{\left(\int_0^1 f^2(x) x \,dx \right)\left(\int_0^1 x^3 \,dx\right)} - \int_0^1 f^2(x) x \,dx \\ &= \frac{1}{2}\sqrt{\int_0^1 f^2(x) x \,dx } - \int_0^1 f^2(x) x \,dx\\ &\leq \frac{1}{16} + \int_0^1 f^2(x) x \,dx - \int_0^1 f^2(x) x \,dx\\ &= \frac{1}{16}, \end{aligned} $$ where the first inequality follows from the Cauchy-Schwarz inequality, and the second inequality follows from the AM-GM inequality. It can be verified that all inequalities become equalities when $f(x) = x/2$.