Find an example of function where $\lim_{x\to 0}(f(x)+f(2x))=0$ but $\lim_{x\to 0}f(x)\neq 0.$ when 
$$\lim_{x\to 0}(f(x)+f(2x))=0$$ 
but 
$$\lim_{x\to 0}f(x)\neq 0$$
I've tried some trig functions and logs but couldn't find an example
help would be appreciated.
thanks! 
 A: Here's a way to construct an $f$ so that $\lim_{x\rightarrow 0} f(x) + f(2x) = 0$ (in fact $f(x) + f(2x)$ is identically $0$) but $\lim_{x \rightarrow 0} f(x)$ does not exist.
Edit: Choose $f(x) = (-1)^k$ when $x = 2^k$ for some $k \in \mathbb{Z}$, otherwise $x = 0$. 
Then the limit $\lim_{x\rightarrow 0} f(x)$ does not exist since, e.g., $2^{-k} \rightarrow 0$ but $f(2^{-k})$ alternates between $-1$ and $1$.
A: How about
$$
f(x)=\sin\left(\pi\cdot\frac{\ln x}{\ln 2}\right)?
$$
As $x\to 0^+$, we have $\ln x\to -\infty$, so the $\sin$ will oscillate and not approach a limit. On the other hand, $f(x)+f(2x)=0$ for all $x>0$, so the limit is clearly zero.
If you want something defined for negative $x$ as well, replace $x$ with $|x|$.
A: Let $\lim_{x\rightarrow 0}f(x)=L\ne 0$, then $\lim_{x\rightarrow 0}f(2x)=L$ and hence $\lim_{x\rightarrow 0}(f(x)+f(2x))=2L\ne 0$.
A: Consider the function $$f(x)=\begin{cases}p\cdot(-1)^{[s \text{ mod }2]},p  \text{ is an odd prime},x=\frac{2^s}{p}\\0, \text{otherwise}\end{cases}$$
It is obvious that $\lim_{x\to 0} f(x) \neq 0$.
But, $f(x)+f(2x)\equiv0$.
