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}$$

 A: Since $0<g'(x)$ for all $x$, we have $g(x)\geq g(0)=0$. Now let $F(x)=\left (\int_{0}^{x}g(t)dt  \right )^{2}-\int_{0}^{x}(g(t))^{3}dt$. Then 
$$F'(x)=2g(x)\left (\int_{0}^{x}g(t)dt  \right )-g(x)^3=g(x)G(x),$$
where 
$$G(x)=2\int_{0}^{x}g(t)dt-g(x)^2.$$
We claim that $G(x)\geq 0$. Assuming the claim, we have $F'(x)\geq 0$ from the above equality, which implies that $F(x)\geq F(0)=0$, which proves the required statement. 
To prove the claim, we have
$$G'(x)=2g(x)-2g(x)g'(x),$$
which is nonnegative since $g'(x)\leq 1$ and $g(x)\geq 0$ for all $x$. Therefore, 
$G(x)\geq G(0)=0$ as required. 
A: 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$.
