I'm teaching first semester calculus and trying to find a way to explain why each hypothesis in l'Hostpial's rule is needed.
If $f$ and $g$ are real differentiable functions on an interval containing a point $c$ then there are three hypotheses one needs to check in order to apply l'Hospitals rule to compute $\lim_{x \to c} f(x)/g(x)$ :
- $g'(x) \neq 0$ on a neighborhood of $c$, (the wikipedia page misses this)
- $\lim_{x \to c} f'(x)/g'(x)$ exists (in the extended sense including $\pm \infty$),
- Either $\lim_{x \to c} g(x) = \pm \infty$ or $\lim_{x \to c} f(x) = \lim_{x \to c} g(x) = 0$.
What I am looking for is a pair of functions $f$ and $g$ so that 2 and 3 both hold and you can reasonably compute $\lim_{x \to c} f(x)/g(x)$ but get a different answer than computing the limit of the quotient of the derivatives. Bonus points if you can make $\lim_{x \to c} f(x) = \pm \infty$ as well in the case that $g(x) \to \pm \infty$.
I was shown an example like this a long time ago in my analysis sequence but it would be lost on the students I think:
Let $f(x) = 2x + \sin(2x)$ and let $g(x) = (2x+\sin(2x))e^{-\sin(x)}$. Then $f/g = e^{\sin x}$ on $(0,\infty)$ so $\lim_{x \to \infty} f(x)/g(x)$ does not exist. Both functions will go to $\infty$ as $x \to \infty$ and the limit of the quotients of the derivatives actually goes to zero. The issue is that $g'(x)$ has infinitely many zeros as $x \to \infty$ so you cannot use l'Hospital.
Any clue on how to make this more inviting to a freshman calculus student?