TITLE: Limits of functions that can't be attacked by Taylor series or L'hopital's rule
QUESTION [10 upvotes]: Often on this site there is posed a question about a limit which is hard to resolve using l'Hopital.  (I don't mean probelms asking to find a limit without using 'Lhopital, I mean problems where using l'Hopital leads to roadblocks or subtleties.)
I always attack those posed problems using Taylor series. For limit problems involving functions (as opposed to infinite sums or products) this pretty much always allows the limit to be found -- for the problems people pose here.  
I'm interested now in problems of the form "find $\lim_{x\to a}f(x)$" that resist solution by  l'Hopital's rule and also by Taylor series methods.  I have a fairly contrived example:
$$\lim_{x\to 0}\frac{1-\cos\left(\frac{2}{x+e^{-1/x^2}} \right)}{\sin^2\left(\frac{1}{x}\right)}
$$
The combination of the topologist's sin curve in the denominator and the infinitely differentiable but non-analytic $e^{-1/x^2}$ as part of the numerator makes this poison to Taylor series methods, and differentiating the numerator or denominator only makes the behavior worse.  Yet the answer for this case is fairly obvious.
My question is, can you find that limit (and prove the value you find is indeed the limit).
And can anybody come up with a less contrived function whose limit resists Tayler series, yet can be found by a different technique?

REPLY [3 votes]: There is no hope for a limit in this problem. First, to get rid of the obvious obstacle, we consider the expression only for $x\in A = \mathbb R \setminus \pi\mathbb Z.$ Then we have a bona-fide function $f(x)$ on $A.$ At the endpoints of the intervals $(1/((n+1)\pi), 1/(n\pi))$ we have $f \to \infty.$ Thus $f$ is unbounded in $A\cap (0,\delta)$ for each $\delta > 0.$ This already shows $f$ can't have a finite limit. Could the limit be $\infty?$ No, because for each $n$ there is a unique $x_n> 0$ such that $x_n+e^{-1/x_n^2} = 1/(n\pi).$ By the intermediate value theorem, it follows that for every $\delta > 0,$ $f(A \cap (0, \delta)) =[0,\infty).$