Continuous Invertible Function Satisfying $ f ( x ) + f ^ { - 1 } ( x ) = x $ While working with inverse functions I come across the following question:

Find all functions $ f : \mathbb R \to \mathbb R $, which are continuous and invertible and satisfy the equation $ f ( x ) + f ^ { - 1 } ( x ) = x $,
where $ f ^ { - 1 } ( x ) $ is the inverse function of $ f ( x ) $.

I started with a linear function $ f ( x ) = a x + b $ and got $ b = 0 $ and $ a + \frac 1 a + 1 = 0 $ which has only complex solutions for $ a $. I have no good idea, how to solve this equation for non-linear function.
 A: We can write that
$$
x = f(f^{-1}(x)) = f(x - f(x)).
$$


*

*Notice that the left hand side can assume any value on $\mathbb{R}$, so the image of $f$ is $\mathbb{R}$.

*Also, since $f$ is invertible it must be injective.

*In particular, there is a point $x_0$ such that $f(x_0) = 0$. Substituting on the previous equation, we conclude that $x_0 = f(x_0 - 0) = 0$. We have then $f(0) = 0$.

*We claim that $0$ is the only fixed point of $f$. Indeed, let $x_1$ be some fixed point of the function. Then $x_1 = f(f(x_1) - x_1) = f(0) = 0$.

*We have $f$ is a monotone function, as a consequence of the intermediate value theorem.

*We claim that $f$ cannot be increasing. Indeed, assume that $f$ is increasing. Then, $f^{-1}$ is also increasing. Then, for $x > 0$ since $f(x) \neq x$ we have two possible cases:


*

*$0 < x < f(x)$, implying that $0 < f^{-1}(x) < x$ and thus $x < f(x) < f(x) + f^{-1}(x) = x$, contradiction.

*$0 < f(x) < x$, implying that $0 < x < f^{-1}(x)$ and thus $x < f^{-1}(x) < f^{-1}(x) + f(x) = x$, contradiction.


*We claim that $f$ cannot be decreasing. If it were, then for $x > 0$ we would have $f(x) < 0 < x$ and applying the also decreasing function $f^{-1}$, one would get $x > 0 > f^{-1}(x)$. Thus, we conclude that $x = f(x) + f^{-1}(x) < 0 < x$, contradiction.
Since $f$ cannot be decreasing nor increasing, we conclude that there is no $f$ satisfying the equation.
