Achievable logoAchievable logo
AP Calculus AB
Sign in
Sign up
Purchase
Textbook
Practice exams
Support
How it works
Exam catalog
Mountain with a flag at the peak
Textbook
Introduction
1. Limits
2. Derivative basics
3. Advanced differentiation
4. Contextual uses
4.1 Derivatives in context
4.2 Straight-line motion
4.3 Related rates
4.4 Linear approximations
4.5 L'Hopital's rule
5. Analytical uses
6. Integration
7. Differential equations
8. Applications of integrals
Wrapping up
Achievable logoAchievable logo
4.5 L'Hopital's rule
Achievable AP Calculus AB
4. Contextual uses
Our AP Calculus AB course is now in "early access" - get 50% off for a limited time.

L'Hopital's rule

8 min read
Font
Discuss
Share
Feedback

What you’ll learn

  • How to apply L’Hopital’s rule on limits with indeterminate form 00​ or ∞∞​
  • How to handle other indeterminate forms by rewriting or using logarithms

Another application of derivatives is evaluating limits that produce the indeterminate forms 00​ or ∞∞​.

In these cases, L’Hopital’s rule lets you replace the original quotient with a new one formed by differentiating the numerator and denominator separately, then trying direct substitution again. This process can be repeated until direct substitution no longer gives 00​ or ∞∞​.

L’Hopital’s rule:

If

x→alim​f(x)=x→alim​g(x)=0orx→alim​f(x)=x→alim​g(x)=∞

then

x→alim​g(x)f(x)​=x→alim​g′(x)f′(x)​

Sidenote
Not the quotient rule

Don’t use the quotient rule. With L’Hopital’s rule, differentiate the numerator and denominator separately to form the new quotient and re-check the limit.

1. Form 0/0

Example 1. Use L’Hopital’s rule to evaluate

x→1lim​xsin(x)​

(spoiler)

Recall the special trig limit x→0lim​xsin(x)​=1.

Confirm this using L’Hopital’s rule:

  • The derivative of the numerator, sin(x), is cos(x).
  • The derivative of the denominator, x, is 1.

Therefore,

x→0lim​xsin(x)​=x→0lim​1cos(x)​

Now direct substitution works, and the limit is 1.

Example 2. Evaluate

x→0lim​xex−1​

(spoiler)

Applying L’Hopital’s rule,

x→0lim​1ex​=e0=1

Example 3. Evaluate

x→0lim​x1+x​−1​

(spoiler)

Applying L’Hopital’s rule,

x→0lim​121​(1+x)−1/2​=x→0lim​21+x​1​=21​

2. Form ∞/∞

L’Hopital’s rule can also be applied when direct substitution results in the indeterminate form ∞∞​.

Example 1. Evaluate

x→∞lim​exx3+5​

(spoiler)

=x→∞lim​ex3x2​

Direct substitution still gives ∞∞​, so apply L’Hopital’s rule again.

=x→∞lim​ex6x​

Applying it again,

=x→∞lim​ex6​

Now the denominator grows without bound, so the limit is 0​.

Example 2. Find

x→∞lim​xln(ex+x)​

(spoiler)

Applying L’Hopital’s rule,

=x→∞lim​1ex+x1​⋅(ex+1)​

=x→∞lim​ex+xex+1​

Applying L’Hopital’s rule again until it’s no longer needed,

=x→∞lim​ex+1ex​

=x→∞lim​exex​

Since the ex terms cancel, the limit is 1.

3. Form 0×∞

L’Hopital’s rule applies only to quotients. If you have an indeterminate product f(x)×g(x), rewrite it as a fraction, either as

1/g(x)f(x)​or1/f(x)g(x)​

Choose the version whose denominator is easier to differentiate or leads to a useful form.

Determine

x→0+lim​xcot(x)

(spoiler)

This can be rewritten as either

x→0+lim​1/xcot(x)​

or

x→0+lim​1/cot(x)x​

=x→0+lim​tan(x)x​

Try applying L’Hopital’s rule to the first one:

x→0+lim​1/xcot(x)​

x→0+lim​−1/x2−csc2(x)​

This approach doesn’t simplify the indeterminate behavior in a helpful way, because differentiating 1/x keeps producing powers of x in the denominator.

Applying L’Hopital’s rule to the second option:

x→0+lim​tan(x)x​

=x→0+lim​sec2(x)1​

=1

4. Form ∞−∞

∞−∞ is an indeterminate form because the limit is not necessarily 0. In this case, rewrite the expression as a single fraction or product. Common strategies include:

  • Combining with a common denominator
  • Rationalizing radicals with conjugates
  • Using properties of logarithms

Find

x→1+lim​x−1x​−ln(x)1​

(spoiler)

Combine into one rational expression.

x→1+lim​x−1x​⋅ln(x)ln(x)​−ln(x)1​⋅x−1x−1​

=x→1+lim​(x−1)ln(x)xln(x)−(x−1)​

Direct substitution gives 00​, so apply L’Hopital’s rule.

=x→1+lim​(x−1)(1/x)+ln(x)x(1/x)+ln(x)−1​

=x→1+lim​1−(1/x)+ln(x)ln(x)​

Direct substitution still gives 00​, so apply L’Hopital’s rule again:

=x→1+lim​(1/x2)+(1/x)(1/x)​=21​

Sidenote
Infinity + infinity

∞+∞ is not an indeterminate form - the result is ∞.

Similarly, −∞−∞ becomes −∞.

5. Forms 1∞,00,∞0

When direct substitution produces one of these indeterminate exponential forms, rewrite the expression using logarithms and the power property.

Example 1. Determine

x→∞lim​(1+x1​)x

Direct substitution gives 1∞. Let

Lln(L)​=x→∞lim​(1+x1​)x=ln[x→∞lim​(1+x1​)x]=x→∞lim​ln(1+x1​)x=x→∞lim​x⋅ln(1+x1​)​

Direct substitution here now gives ∞×0, so rewrite as a quotient:

(spoiler)

x→∞lim​x1​ln(1+x1​)​

Now direct substitution gives 00​, so apply L’Hopital’s rule.

x→∞lim​−x21​x+1x​⋅(−x21​)​

After canceling −x21​, the limit becomes

x→∞lim​xx+1​=1

Remember that this value is for ln(L), and the goal is to find the limit L.

ln(L)L​=1=e​

Therefore

x→∞lim​(1+x1​)x=e

AP tip:

Remember this limit definition of e.

Example 2. Determine

x→0+lim​xln(x)1​

(spoiler)

Direct substitution results in 00.

Let

L=x→0+lim​xln(x)1​

Taking the natural log of both sides,

ln(L)​=ln(x→0+lim​xln(x)1​)=x→0+lim​ln(xln(x)1​)=x→0+lim​ln(x)1​⋅ln(x)=1​

In this case, L’Hopital’s rule was not needed.

Since ln(L)=1, then L=e, so

x→0+lim​xln(x)1​=e

Example 3. Evaluate

x→∞lim​x1/x

(spoiler)

Direct substitution gives ∞0. Let

L=x→∞lim​x1/x

Then

ln(L)​=ln(x→∞lim​x1/x)=x→∞lim​x1​⋅ln(x)=x→∞lim​xln(x)​​

Direct substitution now gives ∞∞​. We can either apply L’Hopital’s rule or use dominant term analysis from section 1.5 to conclude that

x→∞lim​xln(x)​=0

Since ln(L)=0, then L=1, so

x→0+lim​xx=1

In the following example, direct substitution does not lead to an indeterminate form.

x→∞lim​(1−x1​)cos(x)

(spoiler)

Because cos(x) oscillates and does not approach a single value as x→∞, this expression does not approach a single exponential form like 1∞. Therefore this limit does not exist.

  • Use L’Hopital’s rule only on quotients, when the indeterminate form is 00​ or ±∞∞​.
  • For the other indeterminate forms, here is a summary for what to do:
Form What to do
0⋅∞ Rewrite as fraction
∞−∞ Combine
00,∞0,1∞ Use logarithms

Sign up for free to take 13 quiz questions on this topic

All rights reserved ©2016 - 2026 Achievable, Inc.

L'Hopital's rule

What you’ll learn

  • How to apply L’Hopital’s rule on limits with indeterminate form 00​ or ∞∞​
  • How to handle other indeterminate forms by rewriting or using logarithms

Another application of derivatives is evaluating limits that produce the indeterminate forms 00​ or ∞∞​.

In these cases, L’Hopital’s rule lets you replace the original quotient with a new one formed by differentiating the numerator and denominator separately, then trying direct substitution again. This process can be repeated until direct substitution no longer gives 00​ or ∞∞​.

L’Hopital’s rule:

If

x→alim​f(x)=x→alim​g(x)=0orx→alim​f(x)=x→alim​g(x)=∞

then

x→alim​g(x)f(x)​=x→alim​g′(x)f′(x)​

Sidenote
Not the quotient rule

Don’t use the quotient rule. With L’Hopital’s rule, differentiate the numerator and denominator separately to form the new quotient and re-check the limit.

1. Form 0/0

Example 1. Use L’Hopital’s rule to evaluate

x→1lim​xsin(x)​

(spoiler)

Recall the special trig limit x→0lim​xsin(x)​=1.

Confirm this using L’Hopital’s rule:

  • The derivative of the numerator, sin(x), is cos(x).
  • The derivative of the denominator, x, is 1.

Therefore,

x→0lim​xsin(x)​=x→0lim​1cos(x)​

Now direct substitution works, and the limit is 1.

Example 2. Evaluate

x→0lim​xex−1​

(spoiler)

Applying L’Hopital’s rule,

x→0lim​1ex​=e0=1

Example 3. Evaluate

x→0lim​x1+x​−1​

(spoiler)

Applying L’Hopital’s rule,

x→0lim​121​(1+x)−1/2​=x→0lim​21+x​1​=21​

2. Form ∞/∞

L’Hopital’s rule can also be applied when direct substitution results in the indeterminate form ∞∞​.

Example 1. Evaluate

x→∞lim​exx3+5​

(spoiler)

=x→∞lim​ex3x2​

Direct substitution still gives ∞∞​, so apply L’Hopital’s rule again.

=x→∞lim​ex6x​

Applying it again,

=x→∞lim​ex6​

Now the denominator grows without bound, so the limit is 0​.

Example 2. Find

x→∞lim​xln(ex+x)​

(spoiler)

Applying L’Hopital’s rule,

=x→∞lim​1ex+x1​⋅(ex+1)​

=x→∞lim​ex+xex+1​

Applying L’Hopital’s rule again until it’s no longer needed,

=x→∞lim​ex+1ex​

=x→∞lim​exex​

Since the ex terms cancel, the limit is 1.

3. Form 0×∞

L’Hopital’s rule applies only to quotients. If you have an indeterminate product f(x)×g(x), rewrite it as a fraction, either as

1/g(x)f(x)​or1/f(x)g(x)​

Choose the version whose denominator is easier to differentiate or leads to a useful form.

Determine

x→0+lim​xcot(x)

(spoiler)

This can be rewritten as either

x→0+lim​1/xcot(x)​

or

x→0+lim​1/cot(x)x​

=x→0+lim​tan(x)x​

Try applying L’Hopital’s rule to the first one:

x→0+lim​1/xcot(x)​

x→0+lim​−1/x2−csc2(x)​

This approach doesn’t simplify the indeterminate behavior in a helpful way, because differentiating 1/x keeps producing powers of x in the denominator.

Applying L’Hopital’s rule to the second option:

x→0+lim​tan(x)x​

=x→0+lim​sec2(x)1​

=1

4. Form ∞−∞

∞−∞ is an indeterminate form because the limit is not necessarily 0. In this case, rewrite the expression as a single fraction or product. Common strategies include:

  • Combining with a common denominator
  • Rationalizing radicals with conjugates
  • Using properties of logarithms

Find

x→1+lim​x−1x​−ln(x)1​

(spoiler)

Combine into one rational expression.

x→1+lim​x−1x​⋅ln(x)ln(x)​−ln(x)1​⋅x−1x−1​

=x→1+lim​(x−1)ln(x)xln(x)−(x−1)​

Direct substitution gives 00​, so apply L’Hopital’s rule.

=x→1+lim​(x−1)(1/x)+ln(x)x(1/x)+ln(x)−1​

=x→1+lim​1−(1/x)+ln(x)ln(x)​

Direct substitution still gives 00​, so apply L’Hopital’s rule again:

=x→1+lim​(1/x2)+(1/x)(1/x)​=21​

Sidenote
Infinity + infinity

∞+∞ is not an indeterminate form - the result is ∞.

Similarly, −∞−∞ becomes −∞.

5. Forms 1∞,00,∞0

When direct substitution produces one of these indeterminate exponential forms, rewrite the expression using logarithms and the power property.

Example 1. Determine

x→∞lim​(1+x1​)x

Direct substitution gives 1∞. Let

Lln(L)​=x→∞lim​(1+x1​)x=ln[x→∞lim​(1+x1​)x]=x→∞lim​ln(1+x1​)x=x→∞lim​x⋅ln(1+x1​)​

Direct substitution here now gives ∞×0, so rewrite as a quotient:

(spoiler)

x→∞lim​x1​ln(1+x1​)​

Now direct substitution gives 00​, so apply L’Hopital’s rule.

x→∞lim​−x21​x+1x​⋅(−x21​)​

After canceling −x21​, the limit becomes

x→∞lim​xx+1​=1

Remember that this value is for ln(L), and the goal is to find the limit L.

ln(L)L​=1=e​

Therefore

x→∞lim​(1+x1​)x=e

AP tip:

Remember this limit definition of e.

Example 2. Determine

x→0+lim​xln(x)1​

(spoiler)

Direct substitution results in 00.

Let

L=x→0+lim​xln(x)1​

Taking the natural log of both sides,

ln(L)​=ln(x→0+lim​xln(x)1​)=x→0+lim​ln(xln(x)1​)=x→0+lim​ln(x)1​⋅ln(x)=1​

In this case, L’Hopital’s rule was not needed.

Since ln(L)=1, then L=e, so

x→0+lim​xln(x)1​=e

Example 3. Evaluate

x→∞lim​x1/x

(spoiler)

Direct substitution gives ∞0. Let

L=x→∞lim​x1/x

Then

ln(L)​=ln(x→∞lim​x1/x)=x→∞lim​x1​⋅ln(x)=x→∞lim​xln(x)​​

Direct substitution now gives ∞∞​. We can either apply L’Hopital’s rule or use dominant term analysis from section 1.5 to conclude that

x→∞lim​xln(x)​=0

Since ln(L)=0, then L=1, so

x→0+lim​xx=1

In the following example, direct substitution does not lead to an indeterminate form.

x→∞lim​(1−x1​)cos(x)

(spoiler)

Because cos(x) oscillates and does not approach a single value as x→∞, this expression does not approach a single exponential form like 1∞. Therefore this limit does not exist.

Key points
  • Use L’Hopital’s rule only on quotients, when the indeterminate form is 00​ or ±∞∞​.
  • For the other indeterminate forms, here is a summary for what to do:
Form What to do
0⋅∞ Rewrite as fraction
∞−∞ Combine
00,∞0,1∞ Use logarithms

More from Contextual uses

  • Derivatives in context
  • Related rates
  • Linear approximations