
What L'Hôpital's rule says
Suppose f and g are differentiable near a (except possibly at a), g′(x) ≠ 0 near a, and the limit of f(x)/g(x) is an indeterminate form 0/0 or ±∞/±∞. Then the limit of the fraction equals the limit of the ratio of derivatives, provided that second limit exists (or is ±∞):
The rule also works for one-sided limits and for limits as x → ∞ or x → −∞. The important detail is that you differentiate the numerator and the denominator separately. It is not the quotient rule: you never differentiate the fraction as a whole.
Why it works: near a point where f(a) = g(a) = 0, both functions are close to their tangent lines, so f(x) ≈ f′(a)(x − a) and g(x) ≈ g′(a)(x − a). The factors (x − a) cancel, leaving f′(a)/g′(a).
When can you use L'Hôpital's rule?
Only when direct substitution gives one of these two forms:
Always substitute first. If you get a number, that is the answer and L'Hôpital's rule must not be used. For example, the limit of (x + 1)/(x + 2) as x → 0 is 1/2 by substitution. Applying the rule anyway would give 1/1 = 1, which is wrong.
Forms such as 1/0, 5/∞ or ∞/3 are not indeterminate either. 1/0 means the limit is infinite or does not exist, and 5/∞ means the limit is 0. Neither needs the rule.
Note: Substitute first, every time. If you get a number, that is the answer; L'Hôpital's rule only applies to 0/0 and ∞/∞.
How to use L'Hôpital's rule, step by step
- Step 1: Substitute the limit point. Confirm the result is exactly 0/0 or ∞/∞. If it is another indeterminate form, rewrite it first (see below).
- Step 2: Differentiate the numerator and the denominator separately. Do not use the quotient rule.
- Step 3: Take the limit of the new fraction f′(x)/g′(x), simplifying first if you can.
- Step 4: If the result is still 0/0 or ∞/∞, apply the rule again. Check the form before every application.
Simplify between steps whenever possible. Cancelling a common factor or using a known limit such as sin(x)/x → 1 can save one or two rounds of differentiation.
Tip: Differentiate the numerator and the denominator separately. If you find yourself writing the quotient rule, stop: that is a different rule.
Rewriting other indeterminate forms
Five more indeterminate forms can be turned into 0/0 or ∞/∞, after which L'Hôpital's rule applies:
| Form | Typical example | Rewrite as |
|---|---|---|
The three power forms all use the same trick: write f(x)^g(x) as e^(g(x) ln f(x)), find the limit L of the exponent, and the answer is e^L. Because eˣ is continuous, the limit can move inside the exponential.
Tip: For any power form, take logarithms: find the limit L of g(x)·ln f(x), and the answer is e^L.
When L'Hôpital's rule fails
The rule says that if lim f′/g′ exists, then lim f/g equals it. It says nothing when lim f′/g′ does not exist. Take the limit of (x + sin x)/x as x → ∞. It is ∞/∞, but the rule gives (1 + cos x)/1, which keeps oscillating between 0 and 2 and has no limit. The original limit is still 1, which you can show by splitting the fraction or with the squeeze theorem. See the squeeze theorem with examples.
The rule can also go round in circles. For x/√(x² + 1) as x → ∞, each application flips the fraction to √(x² + 1)/x and back again. Dividing the numerator and denominator by x gives the answer 1 immediately. When derivatives get more complicated instead of simpler, switch methods.
Common mistakes to avoid
- Using the quotient rule. L'Hôpital's rule differentiates the top and the bottom separately: f′/g′, not (f′g − fg′)/g².
- Applying the rule without checking the form. If substitution gives a number, or a form like 1/0, the rule does not apply and will usually give a wrong answer.
- Forgetting to check the form again before a second application. After one round, the new fraction may no longer be indeterminate.
- Applying it directly to 0·∞, ∞ − ∞ or a power form. Rewrite as a single fraction first.
- Forgetting to undo the logarithm in power forms. If the exponent's limit is L, the answer is e^L, not L.
- Concluding that the limit does not exist because lim f′/g′ does not exist. The rule is simply inconclusive then.