Spivak's Calculus, Chapter 5, Problem 23 Someone asked this question before. However, it is still not clear to me how Spivak comes up with those hints.


The following is my take. However, I am not sure whether it is rigorous or not. Especially for the red sentence below, do I need to elaborate it more?

 A: Case (1): There exists some $\varepsilon > 0$ such that  $\lvert f(x)\rvert > \varepsilon$ for all sufficiently small $x$.
In other words, there exists some $\varepsilon > 0$ and some $\delta > 0$ such that for all $x$ if
$0<\lvert x\rvert < \delta$, then $\lvert f(x)\rvert > \varepsilon$
We can define $g(x)$ for these small $x$ as
$g(x) = \frac {1}{f(x)}$
(We know for these small x, the denominator is $\neq 0$, so no trouble there).
Now $\lim_{x \to 0} f(x)g(x) = \lim_{x \to 0}1 = 1$
So the limit of $f(x)g(x)$ exists. If $\lim_{x\to0}g(x)$ exists, then so too must the limit of $f(x)$ (Part a). Therefore the limit of $g(x)$ also does not exist.
Edit: How do we know $\lim_{x\to 0}g(x) \neq 0$, and hence part (a) applies?
Suppose $\lim_{x\to 0} g(x) = 0$
By our case(1) definition we have
$$\lim_{x\to 0} \frac{1}{f(x)} = 0$$
So for any $\varepsilon > 0$ there exists some $\delta > 0$ such that for all $x$ if
$$0 < |x| < \delta \text{ then } \left|\frac{1}{f(x)}\right| < \varepsilon$$.
Inverting we have
$$|f(x)| > \frac{1}{\varepsilon}$$
Rephrasing, for any $\frac{1}{\varepsilon} > 0$ there exists some $\delta > 0$ such that for all $x$ if
$$0 < |x| < \delta \text{ then } |{f(x)}| > \frac{1}{\varepsilon}$$.
This means $\lim_{x\to 0} |f(x)| = \infty$, a contradiction. (part(b) already covered that possibility).
Case(2): Here, unlike case(1), as $x$ approaches $0$, $f(x)$ gets arbitrarily small for some x.
To put this in $\varepsilon-\delta$ terms:
For each $\varepsilon > 0$ and for every $\delta > 0$ there is some x with
$0 < \lvert x\rvert < \delta$ and $\lvert f(x)\rvert < \varepsilon$
This looks very close to the definition of a limit; the key difference is that here, $\lvert f(x)\rvert < \varepsilon$ only for some of the x's in the specified $\delta$ region, not for all of them, and that we can always find such x's no matter how small we make $\delta$.
In other words, some values of $f(x)$ seem to be heading towards $0$ for very small $x$ and other values aren't.
Spivak's idea is to define $g(x)$ so that $g(x)f(x) = f(x)$ for the "well behaving" x's, and $0$ for everything else.
See if you can do this. Once you do, you'll see that for your $g(x)$, $\lim_{x \to 0} g(x)$ does not exist.
It might help to begin by considering a concrete example: $f(x) = sin(\frac{1}{x})$
Notice that as $x \rightarrow 0, f(x)$ fluctuates between $1$ and $-1$. $f(x) = 0$ when $x = \frac{1}{k\pi}$ where $k$ is an integer.
As $k$ gets bigger, $x$ gets closer and closer to $0$ and $\lvert f(x)\rvert= 0$ over and over.
Can you define a function $g$ such that $g(x)f(x)$ emphasizes these $x = \frac{1}{k\pi}$ points, and "smooths out" the others?
