TITLE: Prove $\int_{0}^{x}f+\int_{0}^{f(x)}f^{-1}=xf(x)\qquad\text{for all $x\geq0$}$
QUESTION [13 upvotes]: Suppose that the function $f:[0,\infty)\rightarrow\mathbb{R}$ is continuous and strictly increasing and that $f:(0,\infty)\rightarrow\mathbb{R}$ is differentiable. Moreover, assume $f(0)=0$. Consider the formula $$\int_{0}^{x}f+\int_{0}^{f(x)}f^{-1}=xf(x)\qquad\text{for all $x\geq0$}$$ Prove this formula.


Attempt: Consider that $g(x)=\int_{0}^{x}f+\int_{0}^{f(x)}f^{-1}-xf(x)$ which is continuous on $\mathbb{R}$. Then differentiate $g(x)$, we have $g'(x)=f(x)+xf'(x)-f(x)-xf'(x)=0$. Thus for all $x$, $$g(x)-g(0)=0\Longrightarrow\int_{0}^{x}f+\int_{0}^{f(x)}f^{-1}-xf(x)=0$$

I am not sure my the equality valid not or not. If not, can someone give me a suggestion to modify the proof. Thanks.

REPLY [5 votes]: I think your proof is fine. Here is an alternative.
If you are willing to interpret an integral as area, then look at the plot of $y=f(x)$. It is anchored at $(0,0)$, and increasing. $xf(x)$ is the area of a rectangle with lower left corner at $(0,0)$. 
The two integrals are the area under the curve, and the area to the left of that curve (integrating with respect to $y$).

(OK, the picture abuses "$x$" in the lower integral. Maybe the indexing variable should be "$t$" or something other than "$x$".)