Prove that $\int^{1}_{0} f^{-1} = 1 - \int^1_0 f$

One more from hard to believe facts, which I'm curious why are true.

Let $f : [0,1] \rightarrow [0,1] $ is a continuous, monotonically increasing and surjective function

Then

$$\int^{1}_{0} f^{-1} = 1 - \int^1_0 f$$

Sorry if it was asked, but I can't find.

I've tried to use the theorem about derivative of reverse function, but I wasn't able today to connect it with this task.

Thanks in advance for help!


Because $f$ is continuous, monotonically increasing and surjective, $f(0) = 0$ and $f(1) = 1$.

Let $u = f^{-1}(x)$: $$ \int^1_0 f^{-1}(x) \,dx = \int^1_0 u\, df(u) = uf(u)\bigg|^1_0 - \int^1_0 f(u)\,du = 1- \int^1_0 f(x)\,dx. $$


Just drew a picture using tikz :

int

The code is as follows, feel free to take and use.

\begin{tikzpicture}[scale=4]
\shade[top color=blue,bottom color=gray!50] plot [smooth, tension=1] 
 coordinates { (0,0) (0.3,0.2) (0.6,0.8) (1,1)} |- (0,0);
\shade[bottom color=cyan,top color=gray!50] plot [smooth, tension=1] 
 coordinates { (0,0) (0.3,0.2) (0.6,0.8) (1,1)} |- (0,1);
\draw (0.7,0.2) node[above]   {$\displaystyle\int_0^{1} f(x)\,dx$};
\draw (0.3,0.7) node[above]   {$\displaystyle\int_0^{1} f^{-1}(y)\,dy$};

\draw[style=help lines] (0,0) grid (1.2,1.2);

\draw[->] (-0.2,0) -- (1.2,0) node[right] {$x$};
\draw[->] (0,-0.2) -- (0,1.2) node[above] {$y$};

\draw plot [smooth, tension=1] coordinates { (0,0) (0.3,0.2) (0.6,0.8) (1,1)};
\end{tikzpicture}

Draw the picture! The graph is inside a square. Write $y=f(x)$ and think of one integral as $$ \int_0^1 f(x)\,dx $$ and the other as $$ \int_0^1 f^{-1}(y)\,dy $$ and notice what is suggested by the use of $x$ in one case and $y$ in the other. One of these is the area under the graph, and the other is the area to the left of the graph. The two areas fill up the square and don't overlap.

Later edit: Someone posted nearly the same answer I wrote, and I'd have up-voted it if it hadn't been deleted.

There is something I like to call the boundary rule that goes like this:

[size of boundary] $\times$ [rate of motion of boundary] = [rate of change of size of bounded region]

Look at the point $(x,y)=(x,f(x))$ and imagine it moving along the curve. The rectangle bounded by $(0,0)$, $(x,0)$, $(0,y)$ and $(x,y)$ is growing. It has two moving boundaries: The vertical one moves at rate $x'$ and has length $y$, and the horizontal one moves at rate $y'$ and has length $x$. So the rate of change of size of the rectangle is $x'y+y'x$, but it is also $(xy)'$. In that way the product rule follows from the boundary rule. The total change as $(x,y)$ traverses the whole curve is $\int(y\,dx + x\,dy)$, but the total change is $1$, the area of the whole square. So integrating the product rule is integrating by parts. So my next question was how to phrase it as integration by parts. Then Shuhao Cao posted the integration-by-parts solution.

Still later edit: OK, how about like this: $$ \int_0^1 f^{-1}(y)\,dy + \int_0^1 f(x)\,dx = \int (x\,dy+y\,dx) = \left.\int d(xy) = xy\right|_{(x,y)=(0,0)}^{(x,y)=(1,1)}. $$


What about $$f(x)=\begin{cases}0& \text{ if }0\le x\le \frac{1}{2}\\2x-1 & \text{ if }\frac{1}{2}\le x\le0\end{cases}$$


I rembered an easy way to see it: the graph of the inverse function is the reflection of the graph across the line $y = x$. So on the $[0,1]\times[0,1]$ square, the area below $f^{-1}$ is the area above $f$.

area below $f^{-1} +{}$ area below $f =$ area above $f + {}$ area below $f =$ total area $= 1$