# An example of a function over the reals that does not have a limit as x go to 0 but does when in substraction

Give an example of a function $f:\mathbb R \to \mathbb R$ that the limit $\displaystyle\lim_{x\to 0}(f(x)-f(2x))$ exists but $\displaystyle\lim_{x\to 0}f(x)$ does not exists.

I tried a few trig functions but they didn't work so any help would be appreciated.

-

How about $$f(x) = \begin{cases} 1,&x< 0\\ 2,&x \geq0.\end{cases}$$?

-
Doesn't this go to -1 or -2 when it's supposed to have a limit ? – GinKin Dec 16 '13 at 17:39
No; it becomes the $0$ function, since this function does not change under rescaling; if $x<0$, then $f(2x)=f(x)=1$, if $x\geq 0$ , then $f(2x)=f(x)=2$. – user99680 Dec 16 '13 at 17:43

Try $$f(x) = \begin{cases}\ln |x|,&x\ne 0\\-\ln 2,&x= 0.\end{cases}$$

Edit $$\lim_{x\to 0}(f(x)-f(2x) )= \lim_{x\to 0}(\ln |x|-\ln|2x|) = \lim_{x\to 0} (-\ln 2 ) =\ln 2.$$

On the other hand, $\lim_{x\to 0}\ln|x|=-\infty.$

-
I don't see how does the subtraction change the limit or it's absence. Can you explain a bit more please? – GinKin Dec 16 '13 at 17:41