If two continuous maps of an interval commute, then they agree at some point Let $f,g:[0,1] \rightarrow [0,1]$ be continuous functions such that $f\circ g =g\circ f$. Prove that there exists $x \in [0,1]$ such that $f(x)=g(x)$
 A: This answer was inspired by the one of @PaulSinclair.
Let us assume that the claim is false, so that $f\left(x\right)\neq g\left(x\right)$
for all $x\in I:=\left[0,1\right]$. By swapping $f,g$, we can assume
$f\left(0\right)<g\left(0\right)$. If we had $f\left(x\right)\geq g\left(x\right)$
for some $x\in I$, the intermediate value theorem (applied to $f-g$)
would yield the claim, in contradiction to our assumption. Hence,
$f\left(x\right)<g\left(x\right)$ for all $x\in I$.
By continuity, there is $\varepsilon>0$ with $\varepsilon+f\left(x\right)\leq g\left(x\right)$
for all $x\in I$. In particular $g\left(x\right)\geq\varepsilon$
for all $x\in I$.
By induction, we show $g^{n}\left(I\right)\subset\left[n\varepsilon,\infty\right)$
for all $n\in\mathbb{N}$. For $n=1$, we just showed that this holds.
Now, assume $g^{n}\left(I\right)\subset\left[n\varepsilon,\infty\right)$
and let $x\in I$ be arbitrary. We have
\begin{eqnarray*}
g^{n+1}\left(x\right) & = & g\left(g^{n}\left(x\right)\right)\\
 & \geq & \varepsilon+f\left(g^{n}\left(x\right)\right)\\
 & \overset{f\circ g=g\circ f}{=} & \varepsilon+g^{n}\left(f\left(x\right)\right)\\
 & \overset{\text{induction}}{\geq} & \varepsilon+n\varepsilon\\
 & = & \left(n+1\right)\varepsilon
\end{eqnarray*}
and thus $g^{n+1}(I) \subset [(n+1)\varepsilon, \infty)$.
For $n$ large enough, this is a contradiction to $g\left(I\right)\subset I$.
Hence, the claim must hold.
A: I haven't worked through it all, but I would start by assuming wlog that $f(0) < g(0)$, then use the composition reversal to show that $f < g$ cannot hold everywhere. Then the result will follow from the intermediate value theorem.
