Prove that $\int_0^x f^3 \le \left(\int_0^x f\right)^2$

This problem comes from Calculus by Spivak, namely in Chapter 14- "The Fundamental Theorem of Calculus".

Suppose that $f$ is a differentiable function with $f(0)=0$ and $0<f'\le1$. Prove that for all $x\ge0$ we have $$ \int_0^x f^3 \le \left(\int_0^x f\right)^2. $$

Now, I have a (proposed) solution, so my question is whether the following is correct.

We know that both the l.h.s. and r.h.s. of the inequality begin at 0, so we can prove the inequality by showing that the same inequality holds for the derivatives of each side. (If both begin at the same value and one increases more quickly or at the same rate than the other, then that one will also take on a value greater than or equal to the other for all $x\ge0$.) So, we have $$f^3 \le 2f\int_0^x f. $$ If $f=0$ the inequality is clearly satisfied, otherwise we have that $$f^2 \le 2\int_0^x f. $$ We then apply the same logic as before, showing that this inequality holds after differentiating (since, again, both expressions evaluate to 0 when $x=0$). So, we have that $$2ff' \le 2f.$$ We have already taken care of the case that $f=0$ (and the inequality holds anyway for $f=0$) so we end up with $$f' \le 1.$$ This is given, so the first inequality is proven.

I sort of feel (for no particular reason) like part of this may be incorrect, which is why I'm asking here. So if any part (or the whole thing) is incorrect, could someone please point to the mistake? If not, great. Thanks.


Basically, this is fine, but you seem slightly confused about the logical structure of a backward argument and the $f=0$ business. Every time you say "So, we have that", you should say "So, we want". And going through the proof from bottom to top, you will see that there is no issue at all about potentially multiplying by 0.

I might add as a bonus question that at first sight I wondered if there is any relation to the fact that $\sum_{k=0}^n k^3 = (\sum_{k=0}^n k)^2$