"Counterexample" to L'Hopital's Rule as an exercise in "Understanding Analysis" by Stephen Abbott, 2nd Edition The following is taken from the 2nd Edition of Stephen Abbott's book "Understanding Analysis". I must admit that I am a huge fan of this book.
Theorem 5.3.6 (L'Hopital's Rule, 0/0 case) Let $f$ and $g$ be continuous on an interval containing $a$, and assume $f$ and $g$ are differentiable on this interval with the possible exception of the point $a$. If $f(a) = g(a) = 0$ and $g'(x) \neq 0$ for all $x \neq a$, then
$
\lim_{x \to a} \frac{f'(x)}{g'(x)} = L
$
implies
$
\lim_{x \to a} \frac{f(x)}{g(x)} = L.
$
Exercise 5.3.10
Let $f(x) = x \sin(1/x^4)e^{-1/x^2}$ and $g(x) = e^{1/x^2}$.
Using the familiar properties of these functions, compute the limit as $x$ approaches $0$ of $f(x)$, $g(x)$, $f(x)/g(x)$ and $f'(x)/g'(x)$.
Explain why the results are surprising, but not in conflict with the content of Theorem 5.3.6.
I found these limits to be
$\lim_{x \to 0} f(x) = 0$,
$\lim_{x \to 0} g(x) = + \infty$,
$\lim_{x \to 0} f(x)/g(x) = 0$ and
$\lim_{x \to 0} f'(x)/g'(x) = 0$.
Theorem 5.3.6 does not apply directly, since none of these functions or combinations of functions is even defined at $0$. Nor can $g(x)$, for example, be continuously extended to $0$.
There is a footnote to the exercise saying "A large class of "counterexamples" of this sort to L'Hopital's Rule are explored in [4]." Unfortunately I am away from my copy of the book and am unable to see what is reference [4].
My question is - in what sense are these results surprising, or like "counterexamples" to L'Hopital's Rule ?
 A: Everything makes sense if we assume there's a typo in the book, and it was intended to have $g(x) = e^{-1/x^2}$. Then we have $f(x) \to 0$, $g(x) \to 0$ and
$$\frac{f(x)}{g(x)} = x\sin (x^{-4}) \to 0$$
as $x \to 0$, but
\begin{align}
\frac{f'(x)}{g'(x)} &= \frac{\sin (x^{-4})g(x) -4x^{-4}\cos(x^{-4})g(x) + x\sin (x^{-4}) \frac{2}{x^3}g(x)}{\frac{2}{x^3}g(x)} \\
&= \frac{x^3}{2}\sin (x^{-4}) - \frac{2}{x}\cos (x^{-4}) + x\sin (x^{-4})
\end{align}
doesn't have a limit at $0$, due to the
$$-\frac{2}{x}\cos (x^{-4})$$
term. The other two terms tend to $0$.
This is "surprising" in so far as $\lim\limits_{x\to 0} \dfrac{f(x)}{g(x)}$ is not the same as $\lim\limits_{x\to 0} \dfrac{f'(x)}{g'(x)}$ - the latter doesn't exist, the former does. It's not a contradiction to theorem 5.3.6, since part of the hypothesis of that theorem is that $\lim\limits_{x\to 0} \dfrac{f'(x)}{g'(x)}$ exists. Since this is not the case here, the theorem doesn't say anything about the behaviour of $\dfrac{f(x)}{g(x)}$.
