If $f:\mathbb{R}\to\mathbb{R}$ is continuous and $f(x)\neq x$ for all $x$, must it be true that $f(f(x))\neq x$ for all $x$?

Solution 1:

Since $f$ is continuous, saying that $f(x) = x$ has no solution means that either $f(x) < x$ for all $x$ or $f(x) > x$ for all $x$. Let's assume wlog that $f(x) > x$, then $f(f(x)) > f(x) > x$ for all $x$ so $f(f(x))=x$ has no solution either.

Solution 2:

Just a variation of the proof. Suppose $f(f(x))=x$. Define $g:x\mapsto f(x)-x$, which is continuous, and has $g(f(x))=f(f(x))-f(x)=-(f(x)-x)=-g(x)$. Then by the intermediate value theorem $g(y)=0$ for some $y$ in the closed interval bounded by $x$ and $f(x)$, and then of course $f(y)=y$.

Solution 3:

Hint: We know that $f(x)\neq x$ for all $x\in\mathbb{R}$. Without loss of generality, let's say that at $x_0\in\mathbb{R}$, we have that $f(x_0)<x_0$. Can it ever be the case that $f(x_1)>x_1$ for any other $x_1\in\mathbb{R}$?