Proving that a function is odd

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:

  1. Show that $f$ is discontinuous
  2. 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?


Solution 1:

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.

Plot of f

Solution 2:

By plugging in $x=f(y)$ we obtain: $$ f(f(y))=f(y)-y $$ Call this assertion $P(y)$ and let $f^{(n)}(x)=\underbrace{f(f(…f(x)...))}_{n \space times}$. Now we have: $$ P(f(x)): f^{(3)}(x)=f(f(x))-f(x)=f(x)-x-f(x)=-x \iff f^{(4)}(x)=f(-x) $$ But: $$ P\left(f(f(x))\right): f^{(4)}(x)=f^{(3)}(x)-f^{(2)}(x)=-x-(f(x)-x)=-f(x) $$ By combining these equations, we obtain $f(-x)=-f(x)$ and therefore, $f$ is odd.

Solution 3:

Proof that the function is odd (if it exists):

Suppose that $f(b)=a$. Now, consider $$f(b)+f^{-1}(b)=b.$$ Then, $f^{-1}(b)=b-a$ or that $f(b-a)=b$. Now, consider $$f(b-a)+f^{-1}(b-a)=b-a.$$ By substitution, we have $b+f^{-1}(b-a)=b-a$ or that $f^{-1}(b-a)=-a$. Therefore, $f(-a)=b-a$. Now, consider $$ f(-a)+f^{-1}(-a)=-a. $$ By substitution, $b-a+f^{-1}(-a)=-a$ or that $f^{-1}(-a)=-b$. In other words, $f(-b)=-a$, so the function is odd.