Solution (source code)

= Solution

The assumptions imply $f\ge0$. Since $(f^2)\prime=2ff\prime\le2f$ and both sides vanish at zero, integration gives $f(x)^2\le2F(x)$ where $F(x)=\int_0^xf$. Now
$$
\frac d{dx}\left(F(x)^2-\int_0^xf(t)^3dt\right)=2Ff-f^3=f(2F-f^2)\ge0.
$$
The bracket vanishes at zero, proving $\int_0^xf^3\le(\int_0^xf)^2$.