# Can the limit of a product exist if neither of its factors exist?

Show an example where neither $\lim\limits_{x\to c} f(x)$ or $\lim\limits_{x\to c} g(x)$ exists but $\lim\limits_{x\to c} f(x)g(x)$ exists.

Sorry if this seems elementary, I have just started my degree...

-
It looked like you meant $\lim_{x\to c}f(x)...$ etc. Or did you mean $\lim_{x\to\infty}f(x)...$? – abiessu Oct 3 '13 at 19:56
Your notation is a bit confusing, do you mean the limit as x goes to some particular value? – Nate Oct 3 '13 at 19:56
I apologise, i missed out the c in the question, I hope this clears it for you... edit: i have corrected my question – Jam-Hop Oct 3 '13 at 19:59
Why do you want to look for an example like this? Because in elementary calculus, the rule is that the product of two limits equals the limit of two products IFF both individual limits exist. If one of the limits does not exist, say infinity, then things can go terribly wrong in its product, ie.e getting the wrong limit for an answer. – imranfat Oct 3 '13 at 20:06

For example $f(x)=0$ for $x\in\mathbb{Q}$, $f(x)=1$ for $x\notin\mathbb{Q}$, $g(x)=1$ for $x\in\mathbb{Q}$, $g(x)=0$ for $x\notin\mathbb{Q}$.

-
+1 ! good show! – Rustyn Oct 3 '13 at 20:08
Im sorry, I partially understand what you have said but as I said, I am only in the first week of my degree and thus am still developing my basic understanding of the subject. Is there a way you could explain in layman's terms? – Jam-Hop Oct 3 '13 at 20:19
Functions $f$ and $g$ do not have limits for any $c\in\mathbb{R}$ since in any neighborhood of $c$ you can find both a rational and irrational number. However $fg$ is a constant function $0$. – kedrigern Oct 3 '13 at 20:22

Looking at the bigger picture a little, the idea behind most answers given works not just for product but also for sum, difference, quotient, exponent, and most other binary operations.

The common idea is that for many ways that f can vary, g can also vary in some way that cancels it out, making the product (or sum, etc.) constant. For instance, as long as $f(x) \neq 0$, setting $g(x) := \frac{1}{f(x)}$ makes their product $g(x)f(x)$ the constant function 1. Similarly, taking $g(x) := -f(x)$ would make their sum constant.

Now, look for some $f$, such that $\lim_{x \to c}f(x)$ doesn’t exist, but satisfying $f(x) \neq 0$ (or whatever other constraint was needed for defining $g$ above). One way to fail to converge, while avoiding 0, is to oscillate within some fixed strictly positive range, so as a first try, one might think of something like $f(x) := 2 + \sin(x)$. This is always non-zero, and its limit as $x \to \infty$ is undefined because of the oscillation; but this doesn’t work since we wanted the limit as some specific value, not at infinity.

So, change it to make those oscillations happen as $x$ approaches $0$ by inverting the argument, setting $f(x) := 2 + \sin \frac{1}{x}$ for $x \neq 0$ (and doing whatever we want for $x=0$, e.g. $f(0) = 1$). This now gives a function, continuous everywhere except at $x=0$, oscillating as $x$ goes to $0$ enough that $\lim_{x \to 0} f(x)$ doesn’t exist, and always non-zero so that we can set $g(x) = \frac{1}{f(x)}$.

This $f$ and $g$ are now as desired, since $f(x)g(x) = 1$ for all $x$, and so its limit is defined at any argument, in particular as $x \to 0$.

-

Neither of $$\lim_{x\to0}\left(2+\sin{\frac1x}\right)$$ and $$\lim_{x\to0}\left(\frac{1}{2+\sin{\frac1x}}\right)$$ exists, but $$\lim_{x\to0}\left(2+\sin{\frac1x}\right)\left(\frac{1}{2+\sin{\frac1x}}\right)=1.$$

-
Is the 2 necessary in that? At a glance it looks like it would work without that but I am just glancing... ;-) – Chris Oct 3 '13 at 22:28
@Chris: The 2 is needed to ensure that the denominator in $\frac{1}{2+ \sin \frac{1}{x}}$ is always non-zero. – Peter LeFanu Lumsdaine Oct 3 '13 at 22:44
@PeterLeFanuLumsdaine: Ah yes, of course. Cheers. :) – Chris Oct 6 '13 at 0:06

Let $f$ be a function taking values between $1$ and (for instance) $2$ such that $\lim_{x\rightarrow c}f\left(x\right)$ does not exist. Then $g(x)=1/f(x)$ is well defined and $\lim_{x\rightarrow c}g\left(x\right)$ does not exist. This while $f(x)g(x)=1$ for every $x$.

-

If you accept divergence as well, $f(x)=g(x)=1/x$ has no limit at $0$, but $1/x^2$ diverges to infinity as $x$ goes to $0$.

-

I would like to reiterate a solution given above. Neither of the limits $$\lim_{x\to0}\left(\sin{\frac1x}\right), ~~~\lim_{x\to0}\left(\frac{1}{\sin{\frac1x}}\right)$$ exist, but $$\lim_{x\to0}\left(\sin{\frac1x}\right)\left(\frac{1}{\sin{\frac1x}}\right)=1.$$ I am aware that $\large f(x) = \frac{1}{\sin{\frac1x}}$ has infinite discontinuities as x approaches zero. In particular the expression is undefined when $f(\frac{1}{\pi n }) =\large \frac{1}{\sin{\frac{1}{ \left( \frac{1}{ \pi n } \right) }}}$. But I don't see why this is a problem as far as the limit goes.

-