TITLE: Proving that a function is odd
QUESTION [50 upvotes]: Assume that there exists a function $f:\mathbb{R}\to\mathbb{R}$ that is bijective and satisfies
$$
f(x) + f^{-1}(x)=x
$$
for all $x$. Here $f^{-1}$ is the inverse function. Show that $f$ is odd.
This was a brain-teaser given to me by a friend. Two other related questions are:

Show that $f$ is discontinuous
Give an example of such a function (if indeed one exists).

Edit: As an initial idea, maybe approaching the problem graphically would help? A function and its inverse are reflections of each other about $y=x$ on the $x$-$y$ plane. Does this lead to anywhere?

REPLY [33 votes]: Here is finally a constructive example of a solution, continuous except on a countable set.
Let $\phi = \frac{1+\sqrt5}{2}$, and let
$$f(x) =  \begin{cases} 
      0 & \text{if }x = 0 \\
      -\phi x & \text{if }|x| \in [\phi^{3k}, \phi^{3k+1}), k \in \mathbb Z \\
      \phi x & \text{if } |x| \in [\phi^{3k+1}, \phi^{3k+2}), k \in \mathbb Z \\
      \phi^{-2} x & \text{if } |x| \in [\phi^{3k+2}, \phi^{3k+3}), k \in \mathbb Z \\
   \end{cases}
$$
Then $f$ is a bijection, whose inverse is
$$f^{-1}(x) =  \begin{cases} 
      0 & \text{if }x = 0 \\
      \phi^2 x & \text{if }|x| \in [\phi^{3k}, \phi^{3k+1}), k \in \mathbb Z \\
      -\phi^{-1} x & \text{if } |x| \in [\phi^{3k+1}, \phi^{3k+2}), k \in \mathbb Z \\
      \phi^{-1} x & \text{if } |x| \in [\phi^{3k+2}, \phi^{3k+3}), k \in \mathbb Z \\
   \end{cases}
$$
Checking each case shows that $f(x)+f^{-1}(x) = x$, as required.