# Determine all the functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that, for every $x \in \mathbb{R}$, $f(2x) = 2f(x)$ .

Basically I thought about a kind of modulo 2 equivalence class for real numbers, if that makes sense. With that, and noting that for each number $$y \in [1,2)$$, the numbers $$2y$$ and $$y/2$$ are not in $$[1,2)$$, I have defined an arbitrary function on the interval $$[1,2)$$ and repeated it (stretched or shrunk in a way that maintains the property) along the real axis. I have found that, if $$h$$ and $$g$$ are arbitrary functions from $$\mathbb{R}$$ to $$\mathbb{R}$$, then an $$f$$ constructed as follows satisfies the request. $$\lfloor \cdot \rfloor$$ represents the floor function.

$$\begin{equation*} f(x) = \begin{cases} 2^{\lfloor\log_2 |x|\rfloor} \cdot h(|x| \cdot 2^{-\lfloor\log_2 |x|-1\rfloor} )& x >0 \\ 2^{\lfloor\log_2 |x|\rfloor} \cdot g(|x| \cdot 2^{-\lfloor\log_2 |x|-1\rfloor} ) & x <0\\ 0 & x =0 \end{cases} \end{equation*}$$

This works because if $$x>0$$, then: $$f(2x) = 2^{\lfloor\log_2 (2x)\rfloor} \cdot h(2x \cdot 2^{-\lfloor\log_2 (2x)-1\rfloor} ) = 2^{1 + \lfloor\log_2 (x)\rfloor} \cdot h(2x \cdot 2^{- 1 -\lfloor\log_2 (x)-1\rfloor} ) = 2f(x) \, .$$

Similarly, this happens when $$x<0$$, and by defining $$f(0)=0$$ we also get that the property is satisfied for $$x=0$$.

My question is this: how can it be said that these are all the possible functions that satisfy the request? And also, if $$h$$ and $$g$$ are not the same linear function, can $$f$$ be differentiable at $$x=0$$? It seems strange to me that a function that oscillates infinitely many times near the origin would be differentiable there. Can it be that, if neither $$g$$ nor $$h$$ are linear, $$f$$ is $$C^\infty$$ at every $$x\neq 0$$? My candidate for that is $$g(x)=h(x)=\exp\left[-\left(\frac{1}{|x-2|} + \frac{1}{|x-4|} \right)\right]$$ . Lastly, is there a prettier way to express $$f$$ ?

It's easy to prove that what you wrote is the only correct form (and I don't think it can get much prettier). In fact every f such that $$f(2x)=2f(x)$$ of course induces an $$h:[1,2) \to \mathbb{R}$$ by restriction; then for every $$x >0$$ there exists a unique $$k \in \mathbb{Z}$$ such that $$2^k x \in [1,2)$$ and in particular $$f(x)=2^{-k} f( 2^k x) = 2^{-k}h(2^kx)$$ as you described.

regarding the differentiability in $$0$$ one has, for every $$x \in [1,2)$$ that $$x_k=x \cdot 2^{-k}$$ is a sequence tending to $$0$$. But then, by the properties of $$f$$, if it is differentiable in $$0$$ we would have

$$f'(0) = \lim_{k \to \infty} \frac {f(x_k)-f(0)}{x_k-0} = \frac {h(x)}{x}$$

and the same should be true for $$g$$; in particular $$f$$ is differentiable in $$0$$ iff $$h(x)=ax$$ and $$g(x)=ax$$ for the same $$a \in \mathbb{R}$$, which will be the derivative of $$f$$ in $$0$$.

You can have that the function is $$C^{\infty}$$ outside $$0$$, it is sufficient to take any $$C^{\infty}$$ function $$t$$ which is $$0$$ outside $$[0,1]$$, for example $$t(x)=e^{- 1/|x(1-x)|}$$, similarly as you suggested...

then you can consider $$h(x)=g(x)=x+ t(2*(x-4/3))$$ (in such a way that it gets modified only on $$[4/3,11/6]$$, and there should be no problems at $$1$$ and $$2$$, but you can take also $$h(x)=x+t(x-1)$$ it works fine).

In conclusion, in fact everything you said is true!