Show that if $f:\mathbb{R}\to\mathbb{R}$ is a continuous function such that $f(2x)=f(3x)$ for all $x \in \mathbb{R}$, then f is a constant. Show that if $f:\mathbb{R}\to\mathbb{R}$ is a continuous function such that $f(2x)=f(3x)$ for all $x \in \mathbb{R}$, then f is a constant.
My solution: 
$$f(2x) = f(3x)$$
$$\implies f(x) = f(\frac{2}{3}x) = f((\frac{2}{3})^2x) = ... = f((\frac{2}{3})^nx) = f(0)$$
Hence, the function is a constant. I find it weird because I did not use the fact that f is continuous. Can someone point out to me where is wrong with my solution? Thanks
 A: If $ f:\mathbb{R}\to\mathbb{R} $ is continuous and for each $x\in\mathbb{R}$, $f(2x)=f(3x)$, then $f$ is a constant function.
Proof. Assume the following:
(i) $f:\mathbb{R}\to\mathbb{R}$ is continuous.
(ii) For each $x\in \mathbb{R}$, $f(2x)=f(3x)$.  
Let $x\in\mathbb{R}$ be arbitrary. By (ii), $$f(x)=f\left(3\cdot\left(\frac{x}{3}\right)\right)=f\left(2\cdot\left(\frac{x}{3}\right)\right)=f\left(\left(\frac{2}{3}\right)\cdot x\right)$$
Therefore for each $n\in\mathbb{N}$, $$f(x)=f\left(\left(\frac{2}{3}\right)^{n}\cdot x\right)\tag{1}$$
By (i), for each convergent sequence $(x_n)$ in $\mathbb{R}$, the sequence $(f(x_n))$ in $\mathbb{R}$ is convergent, in which case $$\lim_{n\to\infty}f(x_n)=f\left(\lim_{n\to\infty}x_n\right)$$
This property is an equivalent notion for a function to be continuous!
Anyway we continue with the proof.
Because $\left(\left(\frac{2}{3}\right)^{n}\cdot x\right)$ is a convergent sequence in $\mathbb{R}$, the sequence $f\left(\left(\frac{2}{3}\right)^{n}\cdot x\right)$ in $\mathbb{R}$ is convergent, and $$\lim_{n\to\infty}f\left(\left(\frac{2}{3}\right)^{n}\cdot x\right)=f\left(\lim_{n\to\infty}\left(\frac{2}{3}\right)^{n}\cdot x\right)$$
Because of $(1)$,
$$f(x)=\lim_{n\to\infty}f(x)\overset{(1)}{=}\lim_{n\to\infty}f\left(\left(\frac{2}{3}\right)^{n}\cdot x\right)=f\left(\lim_{n\to\infty}\left(\frac{2}{3}\right)^{n}\cdot x\right)=f(0)$$
Recall that $x$ is arbitrary. Therefore for each $x\in\mathbb{R}$, $f(x)=f(0)$. Therefore $f$ is a constant function.$\square$  
Notice that $\epsilon$,$\delta$-proof is not necessary because of the equivalent notion for a function to be continuous.
A: Let $$f(x)=\begin{cases}1&\text{if }x>0\\0&\text{if }x=0\\-1&\text{if }x<0\end{cases}$$
Then $f(2x)=f(3x)$ for all $x$ but is not constant (and is not continuous). Hence continuity is needed. There are many more possible functions $f$ that work as such counterexample, such as $$f(x)=\begin{cases}1&\text{if }x\in\mathbb Q\\0&\text{if }x\notin\mathbb Q\end{cases} $$
The step in your proof that does not work with these $f$ is the last step $f((\frac23)^nx)=f(0)$ in your equation (if $x\ne0$, resp. $x\notin\mathbb Q$). And indeed, this step can  only be made rigorous because we are given that $f$ should be continuous: We have $(\frac23)^nx\to 0$ and hence by continuity the sequence  $f((\frac23)^nx)$ also tends to $f(0)$. But as $f((\frac23)^nx)=f(x)$ this sequence is in fact constant - so the only way to converge  is by being constant. 
More formally: For any $\epsilon>0$ we find that $|f(x)-f(0)|=|f((\frac23)^nx)-f(0)|<\epsilon$ for suitable $n$, hence $$f(x)-f(0)=0 \implies f(x)\text{ is a constant function}.$$
