# Finding functions satisfying $f(f(x))+f(x)+x=0$

Find the number of continous functions $f:\Bbb R\to\Bbb R$ which satisfy the following functional equation $$f(f(x))+f(x)+x=0$$

• Substituting $f(x)$ for $x$, you get $f(f(f(x)))+f(f(x))+f(x)=0$. Then, since $f(f(x))+f(x)+x=0$, $f(f(f(x)))=x$. – Michael Burr Jan 3 '18 at 4:01

There are $2^{2^{\aleph_0}}$ such functions. Given any partition of $\mathbb{R}$ into three-element subsets $\{a,b,c\}$ with $a+b+c=0$, you can get such a function $f$ by taking $f$ to be a cyclic permutation of each of the three-element subsets. Since there are two different ways to cyclically permute each subset and $2^{\aleph_0}$ subsets in the partition, this gives $2^{2^{\aleph_0}}$ different functions. Since there are only $2^{2^{\aleph_0}}$ functions $\mathbb{R}\to\mathbb{R}$ at all, there cannot be more than $2^{2^{\aleph_0}}$ functions with the required property.

It remains to be shown that such a partition exists. One can be constructed by a simple transfinite induction argument. Namely, enumerate the real numbers as $(x_\alpha)_{\alpha<2^{\aleph_0}}$, and inductively define triples $(a_\alpha,b_\alpha,c_\alpha)$ for each $\alpha<2^{\aleph_0}$ as follows. Having defined $(a_\beta,b_\beta,c_\beta)$ for all $\beta<\alpha$, let $S$ be the set of all the numbers $a_\beta$, $b_\beta$, and $c_\beta$ for $\beta<\alpha$. Note that $|S|\leq 3|\alpha|<2^{\aleph_0}$. Let $a_\alpha=x_\gamma$ where $\gamma$ is the least ordinal such that $x_\gamma\not\in S$. Let $b_\alpha=x_\delta$ where $\delta$ is the least ordinal such that $x_\delta\not\in S$ and $-a_\alpha-x_\delta\not\in S$ (there are only $|S|<2^{\aleph_0}$ choices of $\delta$ that fail each condition, so this is possible). Finally, let $c_\alpha=-a_\alpha-b_\alpha$. By our choice of $b_\alpha$, $c_\alpha\not\in S$.

This gives a sequence of triples $(a_\alpha,b_\alpha,c_\alpha)$ in which each real number can appear at most once and each triple sums to $0$. Furthermore, every real number appears in some triple (it is easy to see by induction that if $a_\alpha=x_\gamma$, then $\gamma\geq\alpha$, so $x_\alpha$ appears no later than the $\alpha$th step). Thus this gives the required partition of $\mathbb{R}$.

[More generally, this argument works with $\mathbb{R}$ replaced by any infinite abelian group $G$, to give that there are $2^{|G|}$ functions $f:G\to G$ such that $f(f(x))+f(x)+x=0$ for all $x\in G$.]

On the other hand, there are no such functions that are continuous. Indeed, note that plugging in $f(x)$ for $x$ in the functional equation gives $$f(f(f(x)))+f(f(x))+f(x)=0$$ which combined with the original equation gives $f(f(f(x)))=x$. Thus $f$ is a bijection, and all of its cycles have either $1$ element or $3$ elements. If $f$ is continuous, then it must be monotone, which means $f$ cannot cyclically permute any set of three numbers. Thus every cycle must have only $1$ element, and $f(x)=x$ for all $x$. This obviously does not work, so no such continuous function exists.

Another proof when $f(x)$ is continuous.

As already noted by Michael Burr and Eric Wofsey, $f$ satisfied $f^{(3)}(x)=x$, which shows that $f$ is a bijection. So, $f$ is monotone as a continuous injection.

The fucntions $f$ and $f^{-1}$ share the same monotonicity, and since $f(x)+f^{-1}(x)=-x$, $f$ must be decreasing. Consequently, $f^{(3)}(x)$ is decreasing, which gives a contradiction since $f^{(3)}(x)=x$.