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
9. Testing details tag
Wrapping up
Achievable logoAchievable logo
4.5 L'Hopital's rule
Achievable AP Calculus AB
4. Contextual uses
Our AP Calculus AB course is currently in development and is a work-in-progress.

L'Hopital's rule

7 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. You can repeat this process until direct substitution no longer gives 00​ or ∞∞​.

L’Hopital’s rule

If x→alim​f(x)=x→alim​g(x)=0 or x→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, you differentiate the numerator and denominator separately, then form the new quotient and re-check the limit.

1. Form: 0/0

Recall the special trig limit x→0lim​xsin(x)​=1. You can prove this limit using other tools (like the squeeze theorem), but here we’ll evaluate it using L’Hopital’s rule.

Since direct substitution gives 00​, apply 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, so the limit is 1​.

Here are a few more examples where direct substitution results in 00​.

x→0lim​xex−1​

Solution

(spoiler)

Applying L’Hopital’s rule,

=x→0lim​1ex​

=e0=1​

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

Solution

(spoiler)

=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 ∞∞​.

x→∞lim​exx3+5​

Solution

(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​.

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

Solution

(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:

  • g(x)1​f(x)​, or
  • f(x)1​g(x)​

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

x→0+lim​xcot(x)

can be written either as

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

or

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

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

The first option has the form ∞∞​, while the second has the form 00​. 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. So switch 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.

Find

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

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 limit is ∞. Similarly, −∞−∞ becomes −∞.

5. Form: 1∞,00,∞0

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

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

Let

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

Direct substitution here gives ∞×0. Rewrite it as a quotient:

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​

(using either dominant term analysis or applying L’Hopital’s rule again).

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

ln(L)=1

L=e

Therefore

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

AP tip:

Remember this limit definition of e.

Examples

n→0lim​(1+n)1/n

Solution

(spoiler)

Let L=n→0lim​(1+n)1/n.

Then taking the natural log of both sides,

ln(L)=ln(n→0lim​(1+n)1/n)

=n→0lim​n1​ln(1+n)

=n→0lim​nln(1+n)​

As n→0, direct substitution gives 00​, so apply L’Hopital’s rule.

n→0lim​11+n1​​

=n→0lim​1+n1​

=1

Since ln(L)=1, we have L=e. Therefore

n→0lim​(1+n)1/n=e​

Alternatively, make the substitution u=n1​. As n→0, u→∞, and n=u1​.

Then the limit in terms of u is

u→∞lim​(1+u1​)u

This matches the limit definition of e from the previous problem.

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

Solution

(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∞. The limit does not exist​.

x→0+lim​xx

Solution

(spoiler)

Direct substitution gives 00. Let

L=x→0+lim​xx

Then

ln(L)=x→0+lim​ln(xx)

=x→0+lim​xln(x)

=x→0+lim​x1​ln(x)​

=x→0+lim​−1/x21/x​

=x→0+lim​(−x)

=0

Since ln(L)=0,

L=1​

  • Use L’Hopital’s rule only on quotients, when the indeterminate form is 00​ or ±∞∞​.
  • For the other indeterminate forms, 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 9 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. You can repeat this process until direct substitution no longer gives 00​ or ∞∞​.

L’Hopital’s rule

If x→alim​f(x)=x→alim​g(x)=0 or x→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, you differentiate the numerator and denominator separately, then form the new quotient and re-check the limit.

1. Form: 0/0

Recall the special trig limit x→0lim​xsin(x)​=1. You can prove this limit using other tools (like the squeeze theorem), but here we’ll evaluate it using L’Hopital’s rule.

Since direct substitution gives 00​, apply 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, so the limit is 1​.

Here are a few more examples where direct substitution results in 00​.

x→0lim​xex−1​

Solution

(spoiler)

Applying L’Hopital’s rule,

=x→0lim​1ex​

=e0=1​

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

Solution

(spoiler)

=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 ∞∞​.

x→∞lim​exx3+5​

Solution

(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​.

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

Solution

(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:

  • g(x)1​f(x)​, or
  • f(x)1​g(x)​

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

x→0+lim​xcot(x)

can be written either as

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

or

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

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

The first option has the form ∞∞​, while the second has the form 00​. 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. So switch 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.

Find

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

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 limit is ∞. Similarly, −∞−∞ becomes −∞.

5. Form: 1∞,00,∞0

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

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

Let

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

Direct substitution here gives ∞×0. Rewrite it as a quotient:

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​

(using either dominant term analysis or applying L’Hopital’s rule again).

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

ln(L)=1

L=e

Therefore

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

AP tip:

Remember this limit definition of e.

Examples

n→0lim​(1+n)1/n

Solution

(spoiler)

Let L=n→0lim​(1+n)1/n.

Then taking the natural log of both sides,

ln(L)=ln(n→0lim​(1+n)1/n)

=n→0lim​n1​ln(1+n)

=n→0lim​nln(1+n)​

As n→0, direct substitution gives 00​, so apply L’Hopital’s rule.

n→0lim​11+n1​​

=n→0lim​1+n1​

=1

Since ln(L)=1, we have L=e. Therefore

n→0lim​(1+n)1/n=e​

Alternatively, make the substitution u=n1​. As n→0, u→∞, and n=u1​.

Then the limit in terms of u is

u→∞lim​(1+u1​)u

This matches the limit definition of e from the previous problem.

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

Solution

(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∞. The limit does not exist​.

x→0+lim​xx

Solution

(spoiler)

Direct substitution gives 00. Let

L=x→0+lim​xx

Then

ln(L)=x→0+lim​ln(xx)

=x→0+lim​xln(x)

=x→0+lim​x1​ln(x)​

=x→0+lim​−1/x21/x​

=x→0+lim​(−x)

=0

Since ln(L)=0,

L=1​

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