# Does function $f(x)=f(2x)$, $f(x)$ - non const, exist? ($f(x)$ - continuous function on real numbers) [closed]

When I tried solve it I had found just answer "No". I spoke with some people but I cannot understand why the answer is exactly it...

Frankly speaking, this function haunts me:

$$f(x) = abs((abs(x) - floor_2(abs(x))) / floor_2(abs(x)) - 0.5)$$

abs - absolute value of a number

or the same: $$f(x) = |\frac{|x| - floor_2(|x|)}{floor_2(|x|)} - \frac{1}{2}|$$

$$floor_2$$ - function which returns maximize number which equals power of two (2^), and which less parameter number. Sorry, I can't come up simpler. I hope with examples will be simpler:

$$floor_2(4)=4=2^2; floor_2(5)=4=2^2; floor_2(7)=4=2^2; floor_2(9)=8=2^3; floor_2(157)=128=2^7; floor_2(1234)=1024=2^{10}; floor_2(0.6)=0.5=2^{-1}; floor_2(0.123)=0.0625=2^{-4}; floor_2(1/3)=0.25=2^{-2}$$

Also for the best understanding I specify results of function $$f(x)$$: (for the best understanding I executed nested "abs")

$$f(6)=|\frac{6-4}{4}-\frac{1}{2}|=0\\ f(12)=|\frac{12-8}{8}-\frac{1}{2}|=0\\ f(-12)=|\frac{12-8}{8}-\frac{1}{2}|=0$$

$$f(7)=|\frac{7-4}{4}-\frac{1}{2}|=\frac{1}{4}\\ f(14)=|\frac{14-8}{8}-\frac{1}{2}|=\frac{1}{4}\\ f(5)=|\frac{5-4}{4}-\frac{1}{2}|=\frac{1}{4}\\ f(10)=|\frac{10-8}{8}-\frac{1}{2}|=\frac{1}{4}$$

$$f(\frac{1}{3})=|\frac{1/3-1/4}{1/4}-\frac{1}{2}|=\frac{1}{6}\\ f(\frac{2}{3})=|\frac{2/3-1/2}{1/2}-\frac{1}{2})=\frac{1}{6}$$

Could you help me to understand why this function cannot be answer? Or maybe function exists...

• Suppose that $f\colon\mathbb{R}\to\mathbb{R}$ is continuous and satisfies $f(x)=f(2x)$. Let $\varepsilon>0$ and pick $\delta>0$ such that $\lvert f(x)-f(0)\rvert<\varepsilon$ for all $\lvert x\rvert<\delta$. Then for each $x\in\mathbb{R}$, $\lvert f(x)-f(0)\rvert=\lvert f(x/2^k)-f(0)\rvert<\varepsilon$ (where $k$ is chosen large enough so that $\lvert x/2^k\rvert<\delta$). Since this holds for all $x\in\mathbb{R}$ and all $\varepsilon>0$, this forces $f(x)=f(0)$ for all $x\in\mathbb{R}$. – Thomas Browning Nov 28 '20 at 4:17
• What is the value of your function at $x = 0$? – LSpice Nov 28 '20 at 4:41
• After all $(\mathbb{R}_+,\cdot)$ is isomorphic as a topological group to $(\mathbb{R},+)$. So, up to notation, the question is whether there exist nonconstant, continuous, $2$-periodic functions: yes on $\mathbb{R}$, no if one also wants a limit at $-\infty$, that is at $0$ in the multiplicative formulation. – Pietro Majer Nov 28 '20 at 12:39
• Thank you! Function really has problem when $x = 0$ – Dmitriy Shekhmatov Nov 28 '20 at 14:58

Note that $$floor_2(x)=2^{\lfloor{\log_2x}\rfloor}$$.

Your function does satisfy $$f(x)=f(2x)$$, but it is not continuous at $$x=0$$ (graph). For a proof that your function is not continuous at $$x=0$$, note that $$f(2^{-n})=\left\lvert\frac{2^{-n}-floor_2(2^{-n})}{floor_2(2^{-n})}-\frac{1}{2}\right\rvert=\left\lvert\frac{2^{-n}-2^{-n}}{2^{-n}}-\frac{1}{2}\right\rvert=\left\lvert0-\frac{1}{2}\right\rvert=\frac{1}{2}$$ and $$f(3\cdot2^{-n})=\left\lvert\frac{3\cdot2^{-n}-floor_2(3\cdot2^{-n})}{floor_2(3\cdot2^{-n})}-\frac{1}{2}\right\rvert=\left\lvert\frac{3\cdot2^{-n}-2\cdot2^{-n}}{2\cdot2^{-n}}-\frac{1}{2}\right\rvert=\left\lvert\frac{1}{2}-\frac{1}{2}\right\rvert=0$$ so there is no choice of $$f(0)$$ that makes your function continuous.

Indeed, there is no such function (as I prove in my comment on the question).

Such continuous non-constant functions would exist if we considered the positive axis $$\ (0;\infty)\$$ as their domain of arguments. It's even easy to describe all of them. But just let me provide one example of such $$\ f:(0;\infty)\to\mathbb R\$$ --
$$\forall_{x>0}\quad f(x) \ :=\ \sin(\,2\cdot\pi\cdot \log_2(x)\,)$$
• Thank you for shorter formula! Could you answer why that system cannot be an answer? $$\begin{cases} x\ =\ 0,\ f(x)\ :=\ 0;\\ x\ \neq\ 0,\ f(x)\ :=\ \sin(\,2\cdot\pi\cdot \log_2(|x|)\,) \end{cases}$$ Sorry for the stupid question... – Dmitriy Shekhmatov Dec 1 '20 at 23:25
• You require continuity. However, your variant is not continuous at $0$ since $f$ swings between $1$ and $-1$ again and again when the argument approaches $0$ hence your $f$ is not continuous at $0$. – Wlod AA Dec 2 '20 at 6:19
• Okay, what about this one? $$\begin{cases} x\ =\ 0,\ f(x)\ :=\ 1;\\ x\ \neq\ 0,\ f(x)\ :=\ |\sin(\,2\cdot\pi\cdot \log_2(|x|)\,)| \end{cases}$$ – Dmitriy Shekhmatov Dec 2 '20 at 10:17
• THEOREM $\ \$ Every function $\ f:\mathbb R\to\mathbb R\$ such that (1)$\ \forall_{x\in\mathbb R} f(2\cdot x)=f(x),\$ and (2) $f$ is continuous at $0$, is constant. $\ \$ PROOF $\frac x{2^n} \to 0\$ hence $f(x)=f(\frac x{2^n})=f(0).\ \$ End of Proof (It's trivial. End of discussion). – Wlod AA Dec 2 '20 at 11:38