I understand how this proof works geometrically. Considering the unit square with corners $(0,0),(0,1),(1,1)$, and $(0,0)$, taking the integral of $f(x)$ and then adding its inverse would produce an area equivalent to this unit square. However, I am having a hard time trying to prove this algebraically or anyway that is not geometric. I've tried:
$\int_{0}^{1} f(x)dx + \int_{0}^{1}f^{-1}(x)dx = $
Manipulating the right side:
$ \int_{0}^{1}f^{-1}(x)dx = \int_{0}^{1} f^-1(f(y))f'(y)dy = \int_{0}^{1} yf'(y)dy = f(y)(y)|_{0}^{1} - \int_{0}^{1} f(y)dy = 1 -\int_{0}^{1} f(y)dy $
Plugging back into the original equation we get:
$\int_{0}^{1}f(x)dx + 1 - \int_{0}^{1}f(y)dy $ which equals 1, since changing the variable we are integrating with respect to does not change the result of integrating the function.
The problem I've found in this path is that I'm assuming that $x = f(y)$, which I do not believe is necessarily true in this case. Does anybody have any advice on how to approach this problem? Thank you