STEM-TutorLearn • Practice • ExcelBook Free DemoFree demo

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
  1. The rule
  2. Why it works
  3. Always check the form first
  4. Worked examples
  5. Comparing growth rates
  6. When not to use it
  7. The seven indeterminate forms
  8. Writing a full-credit justification
  9. Common mistakes
  10. Practice questions
  11. Frequently asked questions
  12. Key takeaways
  13. Related guides

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.

Example 2: an exponential

Find limx→0 (ex − 1)/x.

Example 3: using the rule twice

Find limx→0 (1 − cos x)/x².

Example 4: infinity over infinity

Find limx→∞ x/ex.

Example 5: logarithms

Find limx→∞ ln x / √x.

Example 6: zero times infinity

Find limx→0+ x ln x.

Example 7: an indeterminate power

Find limx→∞ (1 + 1/x)x.

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).

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

Practice questions

Try each one before opening the answer.

Q1. Find limx→2 (x² − 4)/(x − 2).

Show answer
0/0: 2x/1 → 4 (factoring works too).

Q2. Find limx→0 tan(3x)/x.

Show answer
3sec²(3x)/1 → 3.

Q3. Find limx→∞ x²/ex.

Show answer
Twice: 2x/ex, then 2/ex → 0.

Q4. Find limx→0 (e2x − 1)/sin x.

Show answer
2e2x/cos x → 2.

Q5. Find limx→1 ln x/(x − 1).

Show answer
(1/x)/1 → 1.

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