# Example of a non-trivial function such that $f(2x)=f(x)$

Could you give an example of a non-constant function $f$ such that $$f(x) = f(2x).$$ The one that I can think of is the trivial one, namely $\chi_{\mathbb{Q}}$, the characteristic function on the rationals.

I am wondering if there is any other such function other than this one. TQVM!

• Constant functions? – Kim Jong Un Sep 27 '14 at 15:51
• Just by curiosity, what is TQVM standing for ? I never saw this acronym anywhere. – Claude Leibovici Sep 27 '14 at 15:52
• My guess: Thank Q Very Much - taking Q to mean You – Mufasa Sep 27 '14 at 15:53
• @KimJongUn I forgot to impose the restriction to non-constant functions. Thanks. – Guo Xian Yau Sep 27 '14 at 19:34
• @ OP: see my answer below. – Kim Jong Un Sep 27 '14 at 19:37

One more example $$f(x) = \sin(2\pi\log_2x)$$ $$f(2x) = \sin(2\pi\log_2(2x)) = \sin(2\pi(1 + \log_2x)) = \sin(2\pi\log_2x) = f(x)$$

Consider the following function: $$f(x)=\left\{\begin{array}{ccc} k & \text{if} & x= 2^mk,\,\,\, \text{for some}\,\,\,k,m\in \mathbb Z, \\ 0 & \text{otherwise}. \end{array} \right.$$ Indeed, $\,\,f(2x)=f(x)$.

The only continuous function satisfying the relation is the constant function. Indeed the given equality gives

$$f(x)=f\left(\frac x{2^n}\right)\xrightarrow{n\to\infty}f(0)$$

To construct a general function let $S\subset \Bbb R$ and consider the set

$$A=\{2^n s\;|\; n\in\Bbb Z,\;s\in S\}$$ and define $f$ by $$f(x)=\text{constant if}\; x\in A,\; \text{other constant}\;\text{otherwise}$$

A less trivial example: define $f(0)$ to be any thing and for $x\neq 0$, define $f(x)=g(x/|x|)$ for any function $g:\mathbb{R}-\{0\}\to\mathbb{R}$.