L'Hôpital's rule, explained with examples
L'Hôpital's rule is a shortcut for limits that come out as 0/0 or ∞/∞. Used correctly, it turns a hard limit into an easy one.
On this page
The rule
Suppose f and g are differentiable near a, and limx→a f(x)/g(x) gives the indeterminate form 0/0 or ±∞/±∞. Then
limx→a f(x)/g(x) = limx→a f'(x)/g'(x),
provided the limit on the right exists (or is infinite). The rule also works for one-sided limits and for limits as x → ±∞.
Notice what the rule does not say. You differentiate the top and the bottom separately. You do not use the quotient rule. This is the most common mistake students make with it.
Why it works
Near x = a, a differentiable function looks like its tangent line. If f(a) = g(a) = 0, then f(x) ≈ f'(a)(x − a) and g(x) ≈ g'(a)(x − a). Dividing, the (x − a) factors cancel, leaving f'(a)/g'(a). In other words, when both functions are heading to zero, the ratio is decided by how fast each one is heading there, which is exactly what the derivatives measure.
Always check the form first
Before using the rule, substitute and confirm you really have 0/0 or ∞/∞. If you do not, the rule gives wrong answers. For example, limx→0 (x + 1)/(x + 2) is simply 1/2 by substitution, but differentiating top and bottom would wrongly give 1. On AP free-response questions, you must show that the limit is indeterminate before applying the rule, usually by writing the limits of the top and the bottom separately.
Worked examples
Example 1: a classic 0/0 limit
Find limx→0 sin x / x.
- Check: sin 0 = 0 and 0 = 0, so the form is 0/0.
- Differentiate top and bottom: cos x / 1 → cos 0 = 1.
Example 2: an exponential
Find limx→0 (ex − 1)/x.
- Form 0/0. Differentiate: ex/1 → 1.
Example 3: using the rule twice
Find limx→0 (1 − cos x)/x².
- Form 0/0. Differentiate: sin x/(2x), still 0/0.
- Differentiate again: cos x/2 → 1/2. Check the form before each use.
Example 4: infinity over infinity
Find limx→∞ x/ex.
- Form ∞/∞. Differentiate: 1/ex → 0.
- This shows exponentials grow faster than any power of x.
Example 5: logarithms
Find limx→∞ ln x / √x.
- Form ∞/∞. Differentiate: (1/x)/(1/(2√x)) = 2/√x → 0.
- Logarithms grow more slowly than any positive power of x.
Example 6: zero times infinity
Find limx→0+ x ln x.
- The form is 0 × (−∞). Rewrite as a fraction: ln x/(1/x), which is −∞/∞.
- Differentiate: (1/x)/(−1/x²) = −x → 0.
Example 7: an indeterminate power
Find limx→∞ (1 + 1/x)x.
- The form is 1∞. Let y = (1 + 1/x)x, so ln y = x ln(1 + 1/x) = ln(1 + 1/x)/(1/x), a 0/0 form.
- Differentiate: [(−1/x²)/(1 + 1/x)]/(−1/x²) = 1/(1 + 1/x) → 1.
- So ln y → 1 and y → e. This is one definition of the number e.
Example 8: AP style with a table
f and g are differentiable, f(3) = g(3) = 0, f'(3) = 4 and g'(3) = −2. Find limx→3 f(x)/g(x).
- Since f(3) = g(3) = 0, the form is 0/0 (f and g are continuous because they are differentiable).
- By L'Hôpital's rule, the limit is f'(3)/g'(3) = 4/(−2) = −2.
Comparing growth rates
Examples 4 and 5 point to a useful ranking for limits at infinity. As x grows, logarithms grow slowest, then powers of x, then exponentials. So ln x/x → 0, x10/ex → 0, and ex/x3 → ∞. Knowing this ranking lets you predict many answers instantly, and then L'Hôpital's rule gives you the working to justify them.
When not to use it
L'Hôpital's rule is powerful, but it is not always the best tool. For rational functions, factoring is often faster. For limits at infinity of rational functions, comparing the highest powers is quicker still. Sometimes the rule goes round in circles: for limx→∞ x/√(x² + 1), each application gives back a similar fraction, while dividing by x gives the answer 1 at once. If two applications have not simplified things, step back and try algebra.
The seven indeterminate forms
The forms 0/0 and ∞/∞ can be handled directly. Five others need rewriting first: 0 × ∞, ∞ − ∞, 00, 1∞ and ∞0. For a product, move one factor into the denominator as a reciprocal. For a difference, combine into a single fraction. For powers, take the natural log, find the limit of the log, and then exponentiate. AP Calculus BC can test the rewriting step; AB focuses mostly on 0/0 and ∞/∞.
Writing a full-credit justification
On free-response questions, a correct number alone may not earn the point. A clear justification looks like this: “Since limx→a f(x) = 0 and limx→a g(x) = 0, by L'Hôpital's rule, limx→a f(x)/g(x) = limx→a f'(x)/g'(x) = …”. Name the rule and show both limits are zero (or both infinite). Readers look for exactly this. If you apply the rule twice, justify the indeterminate form both times. It takes one extra line, and it protects marks you have already earned with correct calculus.
Common mistakes
- Using the quotient rule instead of differentiating the top and bottom separately.
- Applying the rule when the limit is not indeterminate.
- Not checking the form again before a second application.
- Forgetting to exponentiate at the end when solving a power form with logs.
Practice questions
Try each one before opening the answer.
Q1. Find limx→2 (x² − 4)/(x − 2).
Show answer
Q2. Find limx→0 tan(3x)/x.
Show answer
Q3. Find limx→∞ x²/ex.
Show answer
Q4. Find limx→0 (e2x − 1)/sin x.
Show answer
Q5. Find limx→1 ln x/(x − 1).
Show answer
Frequently asked questions
Is L'Hôpital's rule on AP Calculus AB?
Yes. It is in Unit 4 of both AB and BC for 0/0 and ∞/∞ forms. The other indeterminate forms are mainly tested in BC.
Is L'Hôpital's rule in A level Maths?
No, it is not in the A level Maths specification, though some Further Maths students meet it. A level limits are handled with algebra and standard results.
How do you pronounce it?
Roughly “low-pee-TAHL”. It is named after the French mathematician Guillaume de l'Hôpital, and you will also see it spelled L'Hospital.
Key takeaways
- Use the rule only for 0/0 or ∞/∞.
- Differentiate top and bottom separately, not with the quotient rule.
- Check the form again before each repeat.
- Rewrite other indeterminate forms into a fraction first.
- On free response, state the indeterminate form and name the rule.