Start the course

Applications

L'Hôpital's rule: how it works and when to use it

7 min readUpdated

Quick answer

L'Hôpital's rule says that if a limit of a fraction gives 00 or ∞∞, you can replace the top and the bottom by their derivatives: limf(x)g(x)= limf′(x)g′(x), as long as the new limit exists. Differentiate the top and bottom separately (not with the quotient rule), and always check the form first.

Key points
  • It only applies to the forms 00 and ∞∞; check by substituting first.
  • Differentiate the top and the bottom separately; this is not the quotient rule.
  • You can apply it more than once if the new limit is still 00 or ∞∞.
  • Forms like 0⋅∞, ∞−∞ and 1∞ must be rewritten as a fraction first.

What problem does L'Hôpital's rule solve?

When substituting into a limit gives 00, the usual move is algebra: factor and cancel, or use a conjugate (see how to evaluate limits). But some limits, such as limx→0e2x−1sin⁡x, mix functions that no algebra can simplify together. L'Hôpital's rule (pronounced lo-pee-TAHL) handles these using derivatives.

What is an indeterminate form?

Forms like 00 and ∞∞ are called indeterminate, because knowing the form doesn't determine the answer. In 00, the top pulls the fraction toward 0 while the bottom pulls it toward something huge, and the limit depends on which shrinks faster. For example, as x→0, all three of x2x, xx and xx2 start as 00, yet their limits are 0, 1, and nonexistent.

What does L'Hôpital's rule say?

L'Hôpital's rule
Suppose limx→af(x)g(x) has the form 00 or ±∞±∞, and f and g are differentiable near a with g′(x)≠0 there. Then limx→af(x)g(x)= limx→af′(x)g′(x), provided the right side exists (or is ±∞). The same holds for one-sided limits and for x→±∞.
Why it works
  1. Take the 00 case with f(a)=g(a)=0 and g′(a)≠0.
  2. Near a, each function is close to its tangent line: f(x)≈f(a)+f′(a)(x−a)= f′(a)(x−a), and likewise g(x)≈g′(a)(x−a).
  3. So f(x)g(x)≈f′(a)(x−a)g′(a)(x−a)= f′(a)g′(a), and the approximation gets better as x→a.
  4. In words: when both functions are heading to 0, what matters is how fast each one is heading there, which is exactly what their derivatives measure.

How do you use L'Hôpital's rule, step by step?

  1. Check the form by substituting: it must be 00 or ∞∞.
  2. Differentiate the top and the bottom separately.
  3. Find the new limit, usually by substituting.
  4. If the new limit is still 00 or ∞∞, check again and repeat.
Worked example: Exponential over trig

Find limx→0e2x−1sin⁡x.

  1. Check: e0−1sin⁡0= 1−10= 00. ✓
  2. Derivatives: top ddx(e2x−1)= 2e2x (chain rule); bottom ddxsin⁡x= cos⁡x.
  3. New limit: limx→02e2xcos⁡x= 2⋅11= 2.

Answer: 2

Worked example: Infinity over infinity

Find limx→∞ln⁡xx.

  1. Check: as x→∞, both ln⁡x and x grow without bound: ∞∞. ✓
  2. Derivatives: top 1x; bottom 1.
  3. New limit: limx→∞1/x1= limx→∞1x= 0.

Answer: 0: x grows much faster than ln⁡x.

Worked example: Using the rule twice

Find limx→01−cos⁡xx2.

  1. Check: 1−10= 00. ✓
  2. Derivatives: top sin⁡x; bottom 2x. New limit limx→0sin⁡x2x, which is again 00.
  3. Apply the rule again: top cos⁡x; bottom 2.
  4. New limit: cos⁡02= 12.

Answer: 12

Common mistake

Using the quotient rule. L'Hôpital's rule differentiates the top and the bottom separately: f′g′, not (fg)′. Using the quotient rule gives a completely different (and wrong) expression.

Why do you have to check the form first?

Because the rule is only true for 00 and ∞∞. Used anywhere else, it gives wrong answers.

Worked example: When not to use it

Find limx→0x+1x+2.

  1. Substitute: 0+10+2= 12. That's an ordinary number, so the limit is 12.
  2. Wrongly applying L'Hôpital's rule would give 11=1, which is incorrect, because the form wasn't 00.

Answer: 12

Which grows fastest: powers, exponentials or logarithms?

L'Hôpital's rule settles the long-run race between functions. Applying it to x2ex twice gives 2xex and then 2ex→0: the exponential wins. The same happens for any power, and logarithms lose to every positive power. As x→∞:

ln⁡x ≪ xp ≪ ex

for any power p>0, where ≪ means "grows much more slowly than", so the slower one divided by the faster one goes to 0.

2468100.20.40.6peak at x = 2then falls toward 0
The ratio y=x2ex rises briefly, peaks at x=2, then falls toward 0: ex eventually outgrows x2 completely.

How do you handle other indeterminate forms?

Other undecided forms, such as 0⋅∞, ∞−∞, 1∞, 00 and ∞0, can't use the rule directly. Rewrite them as a fraction first:

FormRewriteExample
0⋅∞move one factor to the bottom: fg=f1/gxln⁡x= ln⁡x1/x
∞−∞combine into one fraction (common bottom or conjugate)1x−1sin⁡x= sin⁡x−xxsin⁡x
1∞, 00, ∞0take ln: the exponent comes down as a productln⁡((1+1x)x)= xln⁡(1+1x)
Worked example: Zero times infinity

Find limx→0+xln⁡x.

  1. As x→0+, x→0 and ln⁡x→−∞: the form 0⋅∞.
  2. Rewrite as a fraction: xln⁡x= ln⁡x1/x, which has the form −∞∞.
  3. Derivatives: top 1x; bottom −1x2.
  4. Simplify: 1/x−1/x2= 1x⋅(−x2)= −x, and −x→0.

Answer: 0

Tip

L'Hôpital's rule isn't always the quickest route. For x2−9x−3, factoring is faster; for 3x2+15x2−x as x→∞, comparing degrees (limits at infinity) gives 35 at a glance.

Learn it step by step

The full lessons in the course explain this from the ground up, with graphs, worked examples, and practice problems that each have a complete worked solution.

Open the lesson

Frequently asked questions

When can you use L'Hôpital's rule?

Only when substituting gives 00 or ±∞±∞. Other undecided forms must be rewritten as one of these first.

Is L'Hôpital's rule the same as the quotient rule?

No. L'Hôpital's rule takes the derivative of the top and the derivative of the bottom separately, then divides. The quotient rule finds the derivative of the whole fraction.

Can you use L'Hôpital's rule more than once?

Yes, as long as each new limit is still 00 or ∞∞. Check the form before every application.

What if L'Hôpital's rule keeps going in circles?

Some limits, like x2+1x as x→∞, flip back and forth forever. Then use algebra instead, such as dividing by the highest power.

Can I use L'Hôpital's rule on limits like sin(x)/x?

It gives the right answer, 1, but many courses don't allow it there, because the derivative of sin⁡x is itself proved using that limit. Check what your class expects.