Let $f:[0,1]\rightarrow[0,\infty)$ be an increasing function, $a \in (0,1)$, and $\displaystyle \int_0^1 f(x) \ dx =1 $. What are the maxima of $$i)\int_0^a f(x)^2 \ dx$$ $$ii)\int_0^a xf(x)^2 \ dx$$
Some clues?
EDIT: maxima need to be expressed as $g(a)$, $a \in (0,1)$