Showing $f$ constant if it is continuous and $f(2x) = f(x)$

Let $f$ be a continuous function such that $f(2x) = f(x)$ for all $x\in \mathbb{R}$. Prove that $f(x)$ is a constant function.

I want to know whether my proof for it is correct.

I proceeded by taking: $$f(x)=f\left(\frac{x}{2}\right)=f\left(\frac{x}{4}\right)=\dots=f\left(\frac{x}{2^n}\right)$$

For any real number $x'\in \mathbb{R}$, we have $$f(x')=f\left(\frac{x'}{2^n}\right)$$

We now take a limit on both sides: $$\lim_{n\to\infty}f(x') = \lim_{n\to\infty}f\left(\frac{x'}{2^n}\right)$$

The sequence $\frac{x'}{2^n}$ converges to $0$. Hence we get, $f(x')=f(0)$ for all $x'\in \mathbb{R}$, implying $f(x)$ is a constant function.


Solution 1:

Note that $$\ f(x)=f(\frac{x}{2})=\lim_{n\to\infty}f(\frac{x}{{2}^{n}})$$ Now since $\ f(x)$ is a continuous function, it is continuous at $\ x=0$. Hence, by definition, $$\ \lim_{n\to\infty}f(\frac{x}{{2}^{n}})=f(0)$$ Therefore $$\ f(x)=f(0) \forall x\in \mathbb{R}$$ Yes, your proof is correct. But make sure that you use the definition of continuity in this step $$\ \lim_{n\to\infty}f(\frac{x}{{2}^{n}})=f(0)$$ Hope it helps!