# $\lim\limits_{x \to 0^+}f(x)$ and $\lim\limits_{x \to 0^+}g(x)$ do not exist, $\lim\limits_{x \to 0^+}f(x)g(x)$ does

I am looking for functions $f, g: (0, +\infty) \to (0, +\infty)$ such that $\lim\limits_{x \to 0^+}f(x)$ and $\lim\limits_{x \to 0^+}g(x)$ do not exist, however, $\lim\limits_{x \to 0^+}f(x)g(x)$ does. So far, I have only encountered two functions for which the one-sided limit doesn't exist: $\sin{1 \over x}$ and $\cos{1 \over x}$. This doesn't seem to be what I'm looking for. I would appreciate any hints.

## 3 Answers

For example: $$f(x)=\begin{cases} 2 & \text{if}& x\text{ rational}\\1/2 & \text{if}& x\text{ irrational},\end{cases}\qquad g(x)=\begin{cases} 2 & \text{if}& x\text{ irrational}\\1/2 & \text{if}& x\text{ rational.}\end{cases}$$

• These are not functions from $(0,\infty)$ to $(0,\infty)$, but it's easily fixable: take $2$ instead of $1$ and $1/2$ instead of $0$. – egreg Jan 16 '17 at 23:46
• Sorry, I had a distraction error reading $[0,\infty)$ Now I fix it. Thanks. – Fernando Revilla Jan 16 '17 at 23:56

Consider $$f(x)=2+\sin\frac{1}{x}$$ This is never zero, so also $$g(x)=\frac{1}{f(x)}$$ is well defined.

What's $f(x)g(x)$?

• That's a nice one. – Clement C. Jan 16 '17 at 23:09
• @ClementC. Yours too. – egreg Jan 16 '17 at 23:10
• Haha. In general, we should just have $g(x)=1/f(x)$ :-) – Simply Beautiful Art Jan 16 '17 at 23:43

The simplest I can think of, in terms of continuous (and even smooth) functions: $f,g$ defined for any $x>0$ by $$f(x) = e^{\sin \frac{1}{x}}, \qquad g(x) = e^{-\sin \frac{1}{x}}$$