TITLE: A continuous function that when iterated, becomes eventually constant
QUESTION [5 upvotes]: Let $f: \mathbb{R} \rightarrow \mathbb{R}$ be a continuous function, and let $c$ be a number. Suppose that for all $x \in \mathbb{R}$, there exists $N_x > 0$ such that $f^n(x) = c$ for all $n \geq N_x$. Is it possible that $f^n$ (this is $f$ composed with itself $n$ times) is not constant for any $n$?
I don't know if this is true or false. So far I haven't made much progress besides trivial stuff (in an example $c$ is the unique fixed point of $f$, we have $f(x) > x$ for all $x > c$ or $f(x) < x$ for all $x > c$, etc..)

REPLY [3 votes]: Sure it is. Here is an example for $c = 0$. Define $f(x) = 0$ when $-1 < x < 1$, $f(x) = x+1$ when $x \leq -1$, and $f(x) = x-1$ when $x \geq 1$.
$f$ "pulls" all the numbers towards $0$ by the distance at most $1$ unit. $f^n$ acts in a similar fashion, except each $x$ travels the distance of at most $n$ units. Explicitly, $f^n(x)=0$ when $-n < x < n$, $f^n(x) = x + n$ when $x \leq -n$, and $f^n(x) = x-n$ when $x \geq n$.
It is also quite easy to see that $f$ satisfies the required property, namely $f^n(x)=0$ whenever $n > |x|$.

REPLY [3 votes]: Take for example
$$f_k(x) = \begin{cases}0 &\text{ for } x \geq -k \\ x+k & \text{ otherwise}\end{cases}$$
which are all continuous and we have $f_1^n = f_n$ which is not constant.
I hope this helps $\ddot\smile$