L'Hôpital's Rule: Formula, Conditions and Examples
L'Hôpital's rule evaluates 0/0 and ∞/∞ limits by differentiating the top and bottom. The exact conditions, worked examples and other indeterminate forms.
Limit laws Updated 3 min read
At a glance
- Applies to
- Limits of the indeterminate form \frac{0}{0} or \frac{\pm\infty}{\pm\infty}
- In words
- Differentiate the numerator and the denominator separately, then take the limit again
- Also requires
- The new limit \lim \frac{f'(x)}{g'(x)} exists or is \pm\infty
- Works for
- x \to a, one-sided limits and x \to \pm\infty
- Other forms
- 0 \cdot \infty, \infty - \infty, 1^\infty, 0^0, \infty^0 after rewriting
L'Hôpital's rule evaluates limits of fractions that come out as \frac{0}{0} or \frac{\infty}{\infty}. Instead of the original fraction, you take the limit of the derivative of the top over the derivative of the bottom. It is often the fastest way through a limit that algebra cannot easily simplify.
The rule and its conditions
Suppose f and g are differentiable on an open interval around a (except possibly at a), and g'(x) \ne 0 there for x \ne a. If
then
provided the limit on the right exists or is \pm\infty. The same holds for one-sided limits and for x \to \infty or x \to -\infty.
If the right-hand limit does not exist, the rule tells you nothing. The original limit may still exist.
Worked examples
Example 1: \frac{0}{0}. At x = 0, \frac{\sin x}{x} is \frac{0}{0}:
(The derivative of \sin x is itself proved using this limit, so in a proof course you would use the squeeze theorem instead. For computation, the shortcut is fine.)
Example 2: applying the rule twice. Each step is still \frac{0}{0} until the last:
Example 3: \frac{\infty}{\infty}. As x \to \infty, both \ln x and x grow without bound:
So x grows faster than \ln x.
Example 4: 0 \cdot \infty. Rewrite the product as a fraction first. As x \to 0^+, x \ln x has the form 0 \cdot (-\infty):
Other indeterminate forms
| Form | How to rewrite |
|---|---|
| 0 \cdot \infty | Write fg as \frac{f}{1/g} or \frac{g}{1/f} |
| \infty - \infty | Combine into one fraction (common denominator or conjugate) |
| 1^\infty, 0^0, \infty^0 | Let y = f^g, take \ln y = g \ln f, find that limit, then exponentiate |
For example, with y = \left(1 + \frac{1}{x}\right)^x you get \ln y = \frac{\ln(1 + 1/x)}{1/x}, which is \frac{0}{0} as x \to \infty. The rule gives \ln y \to 1, so y \to e.
Common mistakes
- Using the rule when the form is not indeterminate. \lim_{x \to 0} \frac{x + 1}{x + 2} = \frac{1}{2} by direct substitution. Differentiating would wrongly give 1.
- Using the quotient rule. Differentiate f and g separately. Do not compute the derivative of \frac{f}{g} with the quotient rule.
- Skipping the rewrite. The rule only applies to a fraction. Turn products, differences and powers into a fraction first.
- Not rechecking the form. Before each repeated application, confirm the new limit is still \frac{0}{0} or \frac{\infty}{\infty}.
For more examples, including limits at infinity and exponent forms, read the full guide to L'Hôpital's rule.
Practice it now
L'Hôpital's rule
Solve real problems on this topic with instant feedback, hints and a step-by-step walkthrough for every answer. Free, no sign-up needed to start.
Practice this lesson