# Let $f:[0,1] \to [0,1]$ be a continuous function with fixed points $0, 1$. Prove that if $f \circ f \circ f...$ converges uniformly, then $f(x) = x$.

Let $f:[0,1] \to [0,1]$ be a fontinuous function such that $f(0)=0$ and $f(1)=1$. Consider the sequence of functions $f_n:[0,1] \to [0,1]$ defined as follows: $f_1=f$ and $f_{n+1} = f \circ f_n$ for all $x \in [0,1]$.

I am not sure how to approach this question. I was thinking of one of two ways: either assume that there exists a point in $[0,1]$ that's not fixed - and hence there exists an open interval that is not fixed - and try to deduce a contradiction, or let $g_n=f_n-f$ and try to show that $g_n$ converges uniformly to $0$. The second approach seems more likely, but I still cannot get it. We know that since the sequence of functions are continuous, the uniform limit must be continuous as well. We also know that such uniform limit, denoted $g$, must satisfy $g(0)=0, g(1)=1$.

Since $f_n$ converges to $g$ uniformly on $[0, 1]$, then $g$ is continuous. Moreover, $g(0) = 0$ and $g(1)=1$, then for every $y \in [0, 1]$ there exists $c \in [0, 1]$ such that $g(c) = y$. Since \begin{align} f(g(x)) = g(x) \end{align} then for every $y$ we have that \begin{align} f(y) = f(g(c))= g(c) = y. \end{align}
Additional: Since $f$ is continuous, then it follows \begin{align} g(x) =\lim_{n\rightarrow \infty}f_{n+1}(x) = \lim_{n\rightarrow \infty} f\left( f_n(x)\right) = f\left(\lim_{n\rightarrow \infty}f_n(x) \right) = f(g(x)). \end{align}