L’Hôpital’s Rule: When to Use It (and When Not To) — 7 Examples and 6 Solved Exercises
L'Hôpital's rule (LH) is a powerful shortcut for some limits: instead of the limit of a quotient, you take the limit of the quotient of the derivatives. But it comes with conditions, and using it at the wrong moment gives a wrong answer without you noticing. Here is my summary of section 3.10: the statement, why it works, 7 examples (including a classic mistake and an endless loop), and 6 exercises for practice.
Topics: indeterminate forms \(\frac{0}{0}\) and \(\frac{\infty}{\infty}\), L'Hôpital's rule, repeated use, dominant terms, \(\sqrt{x^2}=|x|\)
Prerequisites: derivatives of \(\ln x\), \(e^{kx}\), \(\sin x\), \(\cos x\), \(\sqrt{u}\)
Table of Contents
- The statement of the rule
- Why it works
- 7 worked examples
- 6 solved exercises
- Traps to avoid
- My handwritten notes
1. The statement of the rule
Consider the limit of a quotient \(\displaystyle\lim_{x\to *}\frac{f(x)}{g(x)}\) of the form \(\dfrac{0}{0}\) or \(\dfrac{\pm\infty}{\pm\infty}\), where \(*\) stands for \(a\in\mathbb{R}\), \(a^+\), \(a^-\), \(+\infty\) or \(-\infty\).
If \(g'(x)\) is defined and not zero near \(*\) (except possibly at \(*\)), then
provided this last limit exists (a real number) or equals \(+\infty\) or \(-\infty\).
2. Why it works
In the simplest case, \(f(a)=g(a)=0\) and both functions are differentiable at \(a\). Then we can write
Each small quotient is a rate of change, which tends to the derivative. In other words: near \(a\), both functions look like their tangent lines, and the ratio of two tangent lines that pass through zero is the ratio of their slopes.
Another way to see it: if a point moves with \(x=g(t)\) and \(y=f(t)\), then \(\dfrac{f'(t)}{g'(t)}=\dfrac{dy/dt}{dx/dt}=\dfrac{dy}{dx}\) is the slope of its path. The ratio \(f/g\) is the slope of the line joining the origin to the point; as the point approaches the origin, this slope becomes the slope of the tangent.
3. 7 worked examples
Always the same routine: 1) evaluate to find the form; 2) if it is \(\frac00\) or \(\frac\infty\infty\), apply LH; 3) simplify before evaluating again.
Example 1 — A logarithm
Form: \(\dfrac{\ln 1}{1-1}=\dfrac00\), indeterminate.
Example 2 — LH several times
Form: \(\dfrac{\infty}{\infty}\), indeterminate.
After the first application, the form is still \(\frac\infty\infty\), so we apply it again. LH may have to be applied several times. The exponential always ends up beating any power of \(x\).
Example 3 — ln versus square root
Form: \(\dfrac{\infty}{\infty}\).
You have to simplify the fraction of fractions before evaluating. Conclusion: \(\sqrt x\) grows faster than \(\ln x\).
Example 4 — Three times in a row
Form: \(\dfrac{0-0}{0}=\dfrac00\).
After each step, check the form: \(\frac{1-1}{0}=\frac00\), then \(\frac00\), then finally \(\frac16\), a determinate form. That's where you stop.
Example 5 — The classic mistake: LH without an indeterminate form
\(\displaystyle\lim_{x\to3}\frac{x^2-9}{x-3}\) has the form \(\frac00\). Two methods give the same answer:
But watch out for \(\displaystyle\lim_{x\to3}\frac{x^2-9}{x+3}\): the form is \(\dfrac{9-9}{3+3}=\dfrac06=0\). This is a determinate form and the answer is 0. If you apply LH anyway, you get \(\frac{2x}{1}\to6\): wrong!
The first thing to do, always: evaluate the form. If it is not \(\frac00\) or \(\frac\infty\infty\), LH does not apply.
Example 6 — When another method is faster
Form: \(\dfrac\infty\infty\) (a rational function at infinity).
Factor out the dominant term in the numerator and the denominator. LH would also work, but you would have to apply it 4 times: factoring is much faster.
Example 7 — The endless loop
Form: \(\dfrac\infty\infty\).
We're going in circles: after two applications, we're back to the original limit! LH leads nowhere. Another strategy: rewrite the function by factoring \(x^2\) out of the square root.
Since \(x\to+\infty\), \(x\gt0\), so \(|x|=x\). Important reminder: \(\sqrt{x^2}=|x|\), not \(x\). For example, \(\sqrt{(-3)^2}=\sqrt9=3\), not \(-3\). (See exercise 6 for \(x\to-\infty\).)
4. 6 solved exercises
For each limit, start by evaluating the form. Try it before opening the solution.
Exercise 1
\(\displaystyle\lim_{x\to0}\frac{e^x-1}{x}\)
Show the solution
Form \(\frac{1-1}{0}=\frac00\). \(\displaystyle\lim_{x\to0}\frac{e^x-1}{x}\overset{LH}{=}\lim_{x\to0}\frac{e^x}{1}=e^0=\mathbf{1}\).
Exercise 2
\(\displaystyle\lim_{x\to0}\frac{\sin 3x}{x}\)
Show the solution
Form \(\frac00\). \(\displaystyle\lim_{x\to0}\frac{\sin 3x}{x}\overset{LH}{=}\lim_{x\to0}\frac{3\cos 3x}{1}=3\cos0=\mathbf{3}\). Don't forget the inner derivative (the 3) from the chain rule.
Exercise 3
\(\displaystyle\lim_{x\to0}\frac{1-\cos x}{x^2}\)
Show the solution
Form \(\frac00\). Apply LH twice:
This is actually the middle step of example 4, divided by 3.
Exercise 4
\(\displaystyle\lim_{x\to\infty}\frac{x^3}{e^x}\)
Show the solution
Form \(\frac\infty\infty\), three times in a row:
This is the "mirror" of example 2: the exponential always wins, whether it's on top (\(+\infty\)) or on the bottom (0).
Exercise 5 — A 0 · ∞ form
\(\displaystyle\lim_{x\to0^+}x\ln x\)
Show the solution
Form \(0\cdot(-\infty)\): it's not a quotient, so LH does not apply directly. Rewrite the product as a quotient:
Now the form is \(\frac{-\infty}{+\infty}\), so LH applies. Answer: 0.
Exercise 6 — The \(|x|\) trap
\(\displaystyle\lim_{x\to-\infty}\frac{x}{\sqrt{x^2+1}}\)
Show the solution
LH goes in circles as in example 7, so rewrite:
This time \(x\lt0\), so \(|x|=-x\):
Answer: −1. If you had written \(\sqrt{x^2}=x\), you would have found 1: wrong. The graph above clearly shows both asymptotes, \(y=1\) on the right and \(y=-1\) on the left.
5. Traps to avoid
- Not checking the form: LH applies only to \(\frac00\) and \(\frac{\pm\infty}{\pm\infty}\). With \(\frac06\), the answer is simply 0.
- Differentiating the quotient: differentiate the top and the bottom separately, without the quotient rule.
- Not simplifying: after LH, simplify fractions of fractions before evaluating.
- Not checking at every step: if the form is still indeterminate, apply LH again; if it's determinate, stop.
- Getting stuck in a loop: if LH brings you back to the original limit, change strategy (dominant term, factoring).
- \(\sqrt{x^2}=x\): false in general. \(\sqrt{x^2}=|x|\), which equals \(-x\) when \(x\to-\infty\).
6. My handwritten notes
Here is my page of notes for section 3.10, in French, the language of my course. Everything on it is explained in English above. The red notes mark the mistake to avoid and the loop in example 7.
- "Règle de L'Hôpital (RH)" = L'Hôpital's rule (LH). "Soit…" = "Let…"; "au voisinage de" = near.
- "pas la dérivée du quotient" = not the derivative of the quotient.
- "indéterminée" = indeterminate; "forme connue" = determinate (known) form; "simplifier avant de réévaluer" = simplify before evaluating again.
- "RH peut devoir être appliquée plusieurs fois" = LH may have to be applied several times; "3 fois RH" = LH three times.
- "le √x augmente plus rapidement que le ln(x)" = √x grows faster than ln x.
- "1ère chose : évaluer forme" = first thing: evaluate the form; "RH non applicable" = LH does not apply; "erreur" = mistake.
- "Plus efficace que faire 4 fois RH" = faster than applying LH 4 times; "dominant(e)" = dominant term.
- "on tourne en rond, retour à la lim de départ" = going in circles, back to the original limit; "autre stratégie : écrire autrement la fonction" = another strategy: rewrite the function; "car x > 0" = because x > 0.
Keep Reviewing
- Indeterminate Forms 0/0 and ∞/∞: Limits, Methods and Asymptotes
- Calculus Review: Limits, Derivatives and the Chain Rule — 16 Solved Exercises
- Kinetic Friction, Reverse Yield, and a Limit with a Conjugate
StudyGroup AN — Mathematics, physics and chemistry exercises and solutions for CEGEP students.
Review: Yootak Hong, PhD

