The following problem is from Spivak's Calculus.
Suppose that $f$ is a continuous increasing function with $f(0)=0$. Prove that for $a,b \gt 0$ we have Young's inequality
$$ ab \le \int_0^af(x)dx+\int_0^bf^{-1}(x)dx$$, and that equality holds if and only if $b=f(a)$.
It is enough to consider the case $f(a) \gt b$, and show that the strict inequality occurs in this case.
I've tried proving this using the theorem $$ \int_a^bf^{-1}=bf^{-1}(b)-af^{-1}(a)-\int_{f^{-1}(a)}^{f^{-1}(b)}f$$
but I got stuck along the way.
How may I show this rigorously using the definition or properties of integrals? Any hint, suggestions or solutions would be appreciated.