Home›Courses›Calculus I›§A.3 L'Hôpital's Rule
Pre-CalculusCalculus ILinear Algebra I
Calculus I  ·  Appendix  ·  Section A.3

L'Hôpital's Rule

Evaluating Limits of Indeterminate Forms

When direct substitution gives $\frac{0}{0}$ or $\frac{\infty}{\infty}$, a single elegant theorem — proved by a student, published by his teacher — unlocks the limit.

The Story Behind the Rule

A Theorem Named After
the Wrong Person

In 1696, Guillaume de l'Hôpital published the first calculus textbook in history — Analyse des Infiniment Petits. In it appeared a beautiful rule for evaluating limits of the form $\frac{0}{0}$. It became one of the most famous results in all of calculus.

The catch? L'Hôpital didn't prove it. His student, Johann Bernoulli, did — and sold the result to l'Hôpital for a monthly salary. The rule bears the teacher's name, but the credit belongs to the student.

The mathematical lesson is more enduring than the historical gossip: when you're stuck at $\frac{0}{0}$, don't give up. There is a systematic way out.

Why you need this: You've computed dozens of limits already. Most were resolved by factoring, simplifying, or direct substitution. But what about $\lim_{x\to 0}\frac{e^x - 1}{x}$ or $\lim_{x\to\infty}\frac{\ln x}{x}$? These resist all elementary techniques. L'Hôpital's rule handles them in one step.
§ 1 — Understanding the Problem

Indeterminate Forms:
When Limits Refuse to Behave

When you evaluate $\lim_{x\to a}\frac{f(x)}{g(x)}$ by direct substitution and get $\frac{0}{0}$ or $\frac{\infty}{\infty}$, the limit is called indeterminate. This does NOT mean the limit doesn't exist — it means the form carries no information about what the limit actually is.

Why $\frac{0}{0}$ is indeterminate

Consider these three limits — all give $\frac{0}{0}$ at $x=0$ — yet each has a different answer:

$\lim_{x\to 0}\dfrac{x}{x}$
$= 1$
$\lim_{x\to 0}\dfrac{x^2}{x}$
$= 0$
$\lim_{x\to 0}\dfrac{x}{x^3}$
$= \infty$

The form $\frac{0}{0}$ tells you nothing on its own. The actual limit depends on how fast numerator and denominator approach zero relative to each other.

Decision Flow: When to Apply L'Hôpital

Evaluate lim f(x)/g(x)Step 1: Substitute x = ainto f(x) and g(x) separatelyResult is0/0 or ∞/∞?YESApply L'Hôpital: lim f'(x)/g'(x)NODirect answeror factor/simplify
§ 2 — The Theorem

L'Hôpital's Rule

L'Hôpital's Rule

Suppose $f$ and $g$ are differentiable and $g'(x) \neq 0$ near $x=a$ (except possibly at $a$ itself). If

$$\lim_{x\to a}\frac{f(x)}{g(x)} \text{ is of the form } \frac{0}{0} \text{ or } \frac{\infty}{\infty}$$

then

$$\lim_{x\to a}\frac{f(x)}{g(x)} = \lim_{x\to a}\frac{f'(x)}{g'(x)}$$

provided the limit on the right exists (or is $\pm\infty$). The rule also applies as $x\to\infty$ or $x\to -\infty$.

Critical point: You differentiate the numerator and denominator separately — NOT using the quotient rule. $\frac{d}{dx}\left[\frac{f}{g}\right] \neq \frac{f'}{g'}$. You are replacing the original limit with the limit of the ratio of derivatives.
§ 3 — Interactive Explorer

See It Work Step by Step

Select any limit below and reveal the solution one step at a time.

⚡ L'Hôpital's Rule — Step-by-Step Explorer
Evaluate this limit
$$\lim_{x\to 1} \frac{x^2-1}{x-1}$$
Form: 0/0 — L'Hôpital applies ✓
Rounds needed: 1
Final Answer
$2$
Step-by-step (0/3 revealed)
§ 4 — Worked Examples

Single Application
of L'Hôpital's Rule

Example 1 — $\displaystyle\lim_{x\to 0}\dfrac{e^x - 1}{x}$

This is the fundamental limit connecting exponentials and derivatives.

Step 1 — Check form: $f(0) = e^0-1 = 0$, $g(0)=0$. Form is $\frac{0}{0}$ ✓

Step 2 — Differentiate separately: $f'(x)=e^x$, $g'(x)=1$

Step 3 — Apply rule:

$$\lim_{x\to 0}\frac{e^x-1}{x} = \lim_{x\to 0}\frac{e^x}{1} = e^0 = \boxed{1}$$

Example 2 — $\displaystyle\lim_{x\to 1}\dfrac{x^3 - 1}{x^2 - 1}$

Could be factored, but L'Hôpital works cleanly here too.

Check: $f(1)=0$, $g(1)=0$ → form $\frac{0}{0}$ ✓

Differentiate: $f'(x)=3x^2$, $g'(x)=2x$

$$\lim_{x\to 1}\frac{x^3-1}{x^2-1} = \lim_{x\to 1}\frac{3x^2}{2x} = \frac{3}{2} = \boxed{\frac{3}{2}}$$

Verify by factoring: $\frac{(x-1)(x^2+x+1)}{(x-1)(x+1)} = \frac{x^2+x+1}{x+1}\to\frac{3}{2}$ ✓

Example 3 — $\displaystyle\lim_{x\to\infty}\dfrac{\ln x}{x}$

Does logarithm grow faster than a linear function? L'Hôpital gives the definitive answer.

Check: $\ln x \to \infty$ and $x\to\infty$ → form $\frac{\infty}{\infty}$ ✓

Differentiate: $f'(x)=\frac{1}{x}$, $g'(x)=1$

$$\lim_{x\to\infty}\frac{\ln x}{x} = \lim_{x\to\infty}\frac{1/x}{1} = \lim_{x\to\infty}\frac{1}{x} = \boxed{0}$$

Conclusion: $x$ grows faster than $\ln x$ — the linear function dominates.

Example 4 — $\displaystyle\lim_{x\to 0}\dfrac{x - \ln(1+x)}{x^2}$

Check: $f(0) = 0 - \ln 1 = 0$, $g(0)=0$ → $\frac{0}{0}$ ✓

Differentiate: $f'(x) = 1 - \frac{1}{1+x}$, $g'(x)=2x$

$$\lim_{x\to 0}\frac{1-\frac{1}{1+x}}{2x} = \lim_{x\to 0}\frac{\frac{x}{1+x}}{2x} = \lim_{x\to 0}\frac{1}{2(1+x)} = \boxed{\frac{1}{2}}$$

§ 5 — Applying the Rule Multiple Times

When One Round
Is Not Enough

After applying L'Hôpital once, if the new limit $\lim\frac{f'}{g'}$ is still $\frac{0}{0}$ or $\frac{\infty}{\infty}$, apply the rule again. Repeat until the form is no longer indeterminate.

Example 5 — $\displaystyle\lim_{x\to\infty}\dfrac{x^2}{e^x}$ (Apply Twice)

Round 1: Form $\frac{\infty}{\infty}$. $f'=2x$, $g'=e^x$.

$$\lim_{x\to\infty}\frac{2x}{e^x} \quad\text{still }\frac{\infty}{\infty}$$

Round 2: $f''=2$, $g''=e^x$.

$$\lim_{x\to\infty}\frac{2}{e^x} = 0 \Rightarrow \boxed{\lim_{x\to\infty}\frac{x^2}{e^x} = 0}$$

Exponential growth always dominates polynomial growth — no matter how high the power.

Example 6 — $\displaystyle\lim_{x\to\infty}\dfrac{x^3}{e^x}$ (Apply Three Times)

Round 1: $\frac{x^3}{e^x} \xrightarrow{L'H} \frac{3x^2}{e^x}$ — still $\frac{\infty}{\infty}$

Round 2: $\frac{3x^2}{e^x} \xrightarrow{L'H} \frac{6x}{e^x}$ — still $\frac{\infty}{\infty}$

Round 3: $\frac{6x}{e^x} \xrightarrow{L'H} \frac{6}{e^x} \to 0$

$$\boxed{\lim_{x\to\infty}\frac{x^3}{e^x} = 0}$$

Example 7 — $\displaystyle\lim_{x\to 0}\dfrac{e^x - 1 - x}{x^2}$ (Apply Twice)

Round 1: $f(0)=0$, $g(0)=0$. $f'=e^x-1$, $g'=2x$.

$$\lim_{x\to 0}\frac{e^x-1}{2x} \quad\text{still }\frac{0}{0}$$

Round 2: $f''=e^x$, $g''=2$.

$$\lim_{x\to 0}\frac{e^x}{2} = \frac{1}{2} \Rightarrow \boxed{\frac{1}{2}}$$

§ 6 — Common Mistakes

How Students Misuse
L'Hôpital's Rule

Mistake 1

Using the quotient rule instead of differentiating separately

✗ Wrong
$\frac{d}{dx}\left[\frac{f}{g}\right] = \frac{f'g - fg'}{g^2}$
✓ Correct
$\text{Apply L'Hôpital: replace }\frac{f}{g}\text{ with }\frac{f'}{g'}$

L'Hôpital does NOT say take the derivative of the whole fraction using the quotient rule. You differentiate numerator and denominator independently.

Mistake 2

Applying to non-indeterminate forms like 0/∞ or ∞/0

✗ Wrong
$\lim_{x\to 0^+}\frac{x}{\ln x}\text{ is } \frac{0}{-\infty}\text{ — applying L'Hôpital here is WRONG}$
✓ Correct
$\frac{0}{-\infty}\text{ is NOT indeterminate — the limit is simply }0$

0/∞ = 0 directly. The rule only applies to 0/0 and ∞/∞. A finite number divided by something infinite is 0 by inspection.

Mistake 3

Applying L'Hôpital when the form is NOT indeterminate

✗ Wrong
$\lim_{x\to 0}\frac{x^2+1}{x}\xrightarrow{\text{student applies L'H}}\lim_{x\to 0}\frac{2x}{1}=0 \quad\text{(wrong answer!)}$
✓ Correct
$\text{Numerator} \to 1,\text{ denominator} \to 0 \Rightarrow \text{form is }\frac{1}{0},\text{ NOT }\frac{0}{0}.\text{ Limit is }\infty.$

The denominator x → 0 looks alarming, so the student jumps straight to L'Hôpital. But the numerator x²+1 → 1, not 0. The form is 1/0 — not indeterminate at all. The limit is simply ∞. L'Hôpital gave the wrong answer 0 here, which is a serious error. Always check BOTH numerator and denominator separately before applying the rule.

Mistake 4

Stopping too early — not re-checking after each application

✗ Wrong
$\lim_{x\to\infty}\frac{x^2}{e^x}\xrightarrow{L'H}\lim\frac{2x}{e^x}\xrightarrow{\text{stop?}}\text{ still }\frac{\infty}{\infty}!$
✓ Correct
$\text{After each application, check the form again. Apply again if still indeterminate.}$

After one application, re-evaluate. If the result is still 0/0 or ∞/∞, apply again. Only stop when the form is determinate.

⚠ Don't Apply L'Hôpital Blindly

Consider $\lim_{x\to 0}\frac{x^2\sin(1/x)}{x}$. Direct simplification gives $\lim_{x\to 0} x\sin(1/x) = 0$ by the squeeze theorem (since $|\sin(1/x)|\leq 1$). If you blindly applied L'Hôpital to $\frac{x^2\sin(1/x)}{x}$, the derivative of the numerator involves $\cos(1/x)\cdot(-1/x^2)$ which oscillates and has no limit. L'Hôpital would fail here — but the limit exists and equals 0. Always look for simpler approaches first.

§ 7 Beyond 0/0 and ∞/∞

Other Indeterminate Forms:
Algebra First, Then L'Hôpital

L'Hôpital's rule directly handles only $\frac{0}{0}$ and $\frac{\infty}{\infty}$. But other indeterminate forms, $0\cdot\infty$, $\infty - \infty$, $0^0$, $1^\infty$, $\infty^0$, can often be transformed algebraically into one of these two cases first.

Example 8: $0\cdot\infty$ form: $\displaystyle\lim_{x\to\infty} e^{-x}\ln x$

As $x\to\infty$: $e^{-x}\to 0$ and $\ln x\to\infty$ — this is a $0\cdot\infty$ form. L'Hôpital doesn't apply directly.

Algebraic trick: Rewrite as a fraction.

$$e^{-x}\ln x = \frac{\ln x}{e^x}$$

Now it's $\frac{\infty}{\infty}$ ✓. Apply L'Hôpital:

$$\lim_{x\to\infty}\frac{\ln x}{e^x} = \lim_{x\to\infty}\frac{1/x}{e^x} = \lim_{x\to\infty}\frac{1}{xe^x} = \boxed{0}$$

Exponential decay beats logarithmic growth — the limit is 0.

Example 9: $1^\infty$ form: $\displaystyle\lim_{x\to\infty}\left(1+\dfrac{1}{x}\right)^x = e$

One of the most famous limits in mathematics. The form is $1^\infty$ — indeterminate.

Strategy: Take the natural log to bring the exponent down.

Let $L = \lim_{x\to\infty}\left(1+\frac{1}{x}\right)^x$. Then $\ln L = \lim_{x\to\infty} x\ln\left(1+\frac{1}{x}\right)$. This is $\infty\cdot 0$ — rewrite:

$$\ln L = \lim_{x\to\infty}\frac{\ln(1+1/x)}{1/x}$$

Now $\frac{0}{0}$ form. Let $u=1/x\to 0$:

$$= \lim_{u\to 0}\frac{\ln(1+u)}{u} \xrightarrow{L'H} \lim_{u\to 0}\frac{1/(1+u)}{1} = 1$$

$$\ln L = 1 \Rightarrow \boxed{L = e}$$

This is the definition of the number $e$ — and L'Hôpital proves it rigorously.

Example 10: $0^0$ form: $\displaystyle\lim_{x\to 0^+} x^x$

$0^0$ is indeterminate. Take log: $\ln(x^x) = x\ln x$. This is $0\cdot(-\infty)$ — rewrite:

$$\lim_{x\to 0^+} x\ln x = \lim_{x\to 0^+}\frac{\ln x}{1/x} \xrightarrow{L'H} \lim_{x\to 0^+}\frac{1/x}{-1/x^2} = \lim_{x\to 0^+}(-x) = 0$$

$$\ln L = 0 \Rightarrow \boxed{L = e^0 = 1}$$

Example 11: $\infty - \infty$ form: $\displaystyle\lim_{x\to 1^+}\left(\dfrac{1}{\ln x} - \dfrac{1}{x-1}\right)$

As $x\to 1^+$: both $\frac{1}{\ln x}\to\infty$ and $\frac{1}{x-1}\to\infty$ — this is $\infty - \infty$, indeterminate. L'Hôpital does not apply directly.

Algebraic trick: Combine into a single fraction over a common denominator.

$$\frac{1}{\ln x} - \frac{1}{x-1} = \frac{(x-1) - \ln x}{(x-1)\ln x}$$

Now check the form as $x\to 1^+$: numerator $(x-1)-\ln x \to 0-0=0$, denominator $(x-1)\ln x \to 0\cdot 0=0$. Form is $\frac{0}{0}$ ✓. Apply L'Hôpital:

Differentiate numerator: $\dfrac{d}{dx}[(x-1)-\ln x] = 1 - \dfrac{1}{x}$

Differentiate denominator (product rule): $\dfrac{d}{dx}[(x-1)\ln x] = \ln x + \dfrac{x-1}{x}$

$$\lim_{x\to 1^+}\frac{1-\frac{1}{x}}{\ln x + \frac{x-1}{x}} \quad\text{still }\frac{0}{0}\text{ — apply again}$$

Round 2 — differentiate again:

Numerator: $\dfrac{d}{dx}\left[1-\dfrac{1}{x}\right] = \dfrac{1}{x^2}$

Denominator: $\dfrac{d}{dx}\left[\ln x + \dfrac{x-1}{x}\right] = \dfrac{1}{x} + \dfrac{1}{x^2}$

$$\lim_{x\to 1^+}\frac{1/x^2}{1/x + 1/x^2} = \frac{1}{1+1} = \boxed{\frac{1}{2}}$$

The strategy for $\infty-\infty$: always combine into a single fraction first, then re-check the form.

Example 12: $\infty^0$ form: $\displaystyle\lim_{x\to\infty} x^{1/x}$

As $x\to\infty$: $x\to\infty$ and $\frac{1}{x}\to 0$ — this is $\infty^0$, indeterminate. The same logarithm strategy used for $1^\infty$ and $0^0$ works here.

Strategy: Let $L = \lim_{x\to\infty} x^{1/x}$. Take the natural log:

$$\ln L = \lim_{x\to\infty}\frac{1}{x}\ln x = \lim_{x\to\infty}\frac{\ln x}{x}$$

This is $\frac{\infty}{\infty}$ ✓. Apply L'Hôpital:

$$\lim_{x\to\infty}\frac{\ln x}{x} \xrightarrow{L'H} \lim_{x\to\infty}\frac{1/x}{1} = \lim_{x\to\infty}\frac{1}{x} = 0$$

$$\ln L = 0 \Rightarrow \boxed{L = e^0 = 1}$$

Despite $x$ growing without bound, the exponent $\frac{1}{x}$ shrinks fast enough to pull the whole expression to 1.

§ 8 — Practice Problems

Consolidation:
Mixed Practice

P1

Evaluate $\displaystyle\lim_{x\to 0}\dfrac{\ln(1+x)}{x}$

Hint: Form 0/0. One application.

$f'=\frac{1}{1+x}$, $g'=1$. Limit $= \frac{1}{1} = \boxed{1}$

P2

Evaluate $\displaystyle\lim_{x\to\infty}\dfrac{x^2+3x}{e^{2x}}$

Hint: Form ∞/∞. Apply twice.

Round 1: $\frac{2x+3}{2e^{2x}}$ still $\frac{\infty}{\infty}$. Round 2: $\frac{2}{4e^{2x}}\to \boxed{0}$

P3

Evaluate $\displaystyle\lim_{x\to 1}\dfrac{x^4-1}{x^3-1}$

Hint: Form 0/0. One application.

$f'=4x^3$, $g'=3x^2$. Limit $=\frac{4}{3} = \boxed{\frac{4}{3}}$

P4

Evaluate $\displaystyle\lim_{x\to 0^+}x^2\ln x$

Hint: Form 0·(−∞). Rewrite as fraction first.

Rewrite: $\frac{\ln x}{1/x^2}$. Form $\frac{-\infty}{\infty}$. L'H: $\frac{1/x}{-2/x^3}=\frac{-x^2}{2}\to \boxed{0}$

P5

Evaluate $\displaystyle\lim_{x\to\infty}\dfrac{(\ln x)^2}{x}$

Hint: Form ∞/∞. May need two applications.

Round 1: $\frac{2\ln x / x}{1}=\frac{2\ln x}{x}$ still $\frac{\infty}{\infty}$. Round 2: $\frac{2/x}{1}\to \boxed{0}$

Key takeaways from this section: L'Hôpital's rule applies only to $\frac{0}{0}$ and $\frac{\infty}{\infty}$ forms. Always check the form first. Differentiate numerator and denominator separately — never use the quotient rule. Other indeterminate forms require algebraic manipulation to reduce them to one of these two cases before L'Hôpital applies.