Artificial intelligent assistant

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}$$?

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 049bf9dbcec5d26f7d50c0e51ff671df