If $f$ continuous and $f(x^2) = f(x)$, then $f$ is a const

Problem: Given $f:[0,1] \rightarrow \mathbb{R}$ ($f$ continuous ) and $f(x^2) = f(x)$ $\forall x \in [0,1]$. Show that function $f$ is a const.

• Hint: $\displaystyle \lim_{n \rightarrow \infty} a^n = 0$, $\forall a \in [0,1)$ – user17762 Jan 27 '11 at 19:37
• Here is a hint. $f(x) = \cos(2\pi \log_2 \log_2 (1/x))$ very nearly works. Why doesn't it? – mjqxxxx Jan 27 '11 at 19:45
• A cuter question would be: Let $f:[0,1] \to \mathbf R$ a measurable function. Assume that $f(x^2) = f(x)$ on the whole domain. Is $f$ a constant almost everywhere? – Jonas Teuwen Jan 27 '11 at 21:01
• @Ma.H: It might be worth your while posting your solution as an answer, then. If you've made a lapse, or there is a point where you should be clearer, it can be pointed out to you. Eventually you can even accept it, so the question does not seem to be "unanswered". – Arturo Magidin Jan 27 '11 at 21:18
• @Jonas T: See my comment (and let $f(0)$ and $f(1)$ be anything). – mjqxxxx Jan 27 '11 at 21:18

Consider the sequence $a,a^2,a^4,a^8,\ldots$ i.e. $x_n = a^{2^{n}}$ where $a \in [0,1)$.

Clearly, we have $\displaystyle \lim_{n \rightarrow \infty} x_n = 0$.

We have $f(a) = f(a^2)$, $\forall a \in [0,1]$.

Using this, it is easy to prove by induction that $f(a) = f(a^{2^{n}})$, $\forall a \in [0,1]$ and $\forall n \in \mathbb{N}$

Further, every continuous function is sequentially continuous i.e. $\displaystyle \lim_{n \rightarrow \infty} f(x_n) = f(\lim_{n \rightarrow \infty} x_n)$.

Hence, $\displaystyle \lim_{n \rightarrow \infty} f(x_n) = f(\lim_{n \rightarrow \infty} x_n)$.

Using the above arguments, we get that $\forall a \in [0,1)$, $$f(a) = \displaystyle \lim_{n \rightarrow \infty} f(a) = \displaystyle \lim_{n \rightarrow \infty} f(a^{2^{n}}) = f(\displaystyle \lim_{n \rightarrow \infty} a^{2^{n}}) = f(0)$$

Hence, $f(a) = f(0)$, $\forall a \in [0,1)$. Use continuity to conclude that $f(1) = f(0)$ and hence $$f(a) = f(0), \forall a \in [0,1]$$

EDIT

I just want to make this argument symmetric for $0$ and $1$.

Just like we argued out that $f(a) = f(0)$, $\forall a \in [0,1)$, we can argue out that $f(a) = f(1)$, $\forall a \in (0,1]$.

Instead of considering the sequence $a,a^2,a^4,a^8,\ldots$ consider $a, \sqrt{a}, \sqrt[4]{a}, \sqrt[8]{a}, \ldots$ i.e. $x_n = \sqrt[2^n]{a}$ where $a \in (0,1]$.

Clearly, we have $\displaystyle \lim_{n \rightarrow \infty} x_n = 1$.

We have $f(a) = f(\sqrt{a})$, $\forall a \in [0,1]$.

Using this, it is easy to prove by induction that $f(a) = f(\sqrt[2^n]{a})$, $\forall a \in [0,1]$ and $\forall n \in \mathbb{N}$

Further, every continuous function is sequentially continuous i.e. $\displaystyle \lim_{n \rightarrow \infty} f(x_n) = f(\lim_{n \rightarrow \infty} x_n)$.

Hence, $\displaystyle \lim_{n \rightarrow \infty} f(x_n) = f(\lim_{n \rightarrow \infty} x_n)$.

Using the above arguments, we get that $\forall a \in (0,1]$, $$f(a) = \displaystyle \lim_{n \rightarrow \infty} f(a) = \displaystyle \lim_{n \rightarrow \infty} f(\sqrt[{2^{n}}]{a}) = f(\displaystyle \lim_{n \rightarrow \infty} \sqrt[{2^{n}}]{a}) = f(1)$$

Hence, $f(a) = f(1)$, $\forall a \in (0,1]$.

So we have that $f(0) = f(a) = f(1)$, $\forall a \in [0,1]$.