In my problem book there is this question
Show by example that the condition $\lim\limits_{x \to 0} (f(x)+ f(2x) ) $ doesn't imply that $f$ has a limit at $0$.
Although I solved this question but I wondered Is there a function $f : \mathbb{R}-\{ 0\} \to \mathbb{R}$ such that $f(x)= - f(2x)$ for all $x \in \mathbb{R}-\{ 0\}$ , $f(x) \ne 0$?
I tried to come up with some examples that turn out they don't work like $\sin\left( \frac{\pi}{2}\left(\lfloor 2\frac{1}{x} \rfloor +1 \right) \right)$
So I tried to come up with one for rational as an easier part for this, I tried many functions like $f : \mathbb{Q}-\{ 0\} \to \mathbb{R}$ let $x$ be a rational number in the simplest form $\frac{a}{b}$ if $a $ is odd then $f(x) = -1$ , if $a$ is even then $a= 2^r m $ for some integers $r, m$ if $r$ is odd then $f(x) =1$ if $r$ is even $f(x ) = -1 $ but this also won't work
If $f : \mathbb{N} \to \mathbb{R}$ it easy to find such example
After a lot of failed attempts to find such function I decided to ask here for an example or a proof of non existence.
Let $f$ be any function on $(1,2]$. Define $f$ on $(2^{n},2^{n+1}]$ by $f(x)=(-1)^{n}f(2^{-n}x)$ for $n=1,2,....$. This defines $f$ in $(1,\infty)$. Do a similar thing on $(2^{-(n+1)}, 2^{-n}]$ for $n=1,2...$ Now you have $f$ on $(0,\infty)$. Finally, define $f(x)=f(-x)$ for $ x<0$.