Proving Integral Inequality I am working on proving the below inequality, but I am stuck.

Let $g$ be a differentiable function such that $g(0)=0$ and $0<g'(x)\leq 1$ for all $x$. For all $x\geq 0$, prove that
$$\int_{0}^{x}(g(t))^{3}dt\leq \left (\int_{0}^{x}g(t)dt  \right )^{2}$$


It's straightforward: The function $g$ is positive for all $x>0$. Therefore $g'(t)\leq 1$ implies
$$2 g(t)g'(t)\leq 2 g(t)\qquad(t>0)\ ,$$
and integrating this with respect to $t$ from $0$ to $y>0$ we get
$$g^2(y)\leq 2\int_0^y g(t)\ dt\qquad(y>0)\ .$$
Multiplying with $g(y)$ again we have
$$g^3(y)\leq 2 g(y)\ \int_0^y g(t)\ dt ={d\over dy}\left(\Bigl(\int_0^y g(t)\ dt\Bigr)^2\right) \qquad(y>0)\ ,$$
and the statement follows by integrating the last inequality with respect to $y$ from $0$ to $x>0$.
