Some limits resist algebra: lim x → 0 e x − 1 x \displaystyle\lim_{x \to 0} \frac{e^x - 1}{x} x → 0 lim x e x − 1 is
0 0 \tfrac{0}{0} 0 0 , and nothing factors. Derivatives settle it.
L'Hôpital's rule
Suppose f f f and g g g are differentiable near a a a (except possibly at a a a ), with
g ′ ( x ) ≠ 0 g'(x) \ne 0 g ′ ( x ) = 0 there, and f ( x ) g ( x ) \tfrac{f(x)}{g(x)} g ( x ) f ( x ) has the form 0 0 \tfrac{0}{0} 0 0 or
± ∞ ± ∞ \tfrac{\pm\infty}{\pm\infty} ± ∞ ± ∞ as x → a x \to a x → a . Then
lim x → a f ( x ) g ( x ) = lim x → a f ′ ( x ) g ′ ( x ) \lim_{x \to a} \frac{f(x)}{g(x)} = \lim_{x \to a} \frac{f'(x)}{g'(x)} x → a lim g ( x ) f ( x ) = x → a lim g ′ ( x ) f ′ ( x ) provided the limit on the right exists or is ± ∞ \pm\infty ± ∞ . The same holds for
one-sided limits and for x → ± ∞ x \to \pm\infty x → ± ∞ .
So lim x → 0 e x − 1 x = lim x → 0 e x 1 = 1 \displaystyle\lim_{x \to 0} \frac{e^x - 1}{x} = \lim_{x \to 0} \frac{e^x}{1} = 1 x → 0 lim x e x − 1 = x → 0 lim 1 e x = 1 ,
confirming the estimate from the first lesson.
Take the simplest case: f ( a ) = g ( a ) = 0 f(a) = g(a) = 0 f ( a ) = g ( a ) = 0 , and both are differentiable at a a a
with g ′ ( a ) ≠ 0 g'(a) \ne 0 g ′ ( a ) = 0 . Near a a a , each function is close to its tangent line, and
both tangent lines pass through ( a , 0 ) (a, 0) ( a , 0 ) :
f ( x ) ≈ f ′ ( a ) ( x − a ) , g ( x ) ≈ g ′ ( a ) ( x − a ) f(x) \approx f'(a)(x - a), \qquad g(x) \approx g'(a)(x - a) f ( x ) ≈ f ′ ( a ) ( x − a ) , g ( x ) ≈ g ′ ( a ) ( x − a )
The factor x − a x - a x − a cancels in the ratio, leaving f ′ ( a ) g ′ ( a ) \tfrac{f'(a)}{g'(a)} g ′ ( a ) f ′ ( a ) . Exactly,
f ( x ) g ( x ) = f ( x ) − f ( a ) g ( x ) − g ( a ) = f ( x ) − f ( a ) x − a g ( x ) − g ( a ) x − a ⟶ f ′ ( a ) g ′ ( a ) \frac{f(x)}{g(x)} = \frac{f(x) - f(a)}{g(x) - g(a)} = \frac{\tfrac{f(x) - f(a)}{x - a}}{\tfrac{g(x) - g(a)}{x - a}} \;\longrightarrow\; \frac{f'(a)}{g'(a)} g ( x ) f ( x ) = g ( x ) − g ( a ) f ( x ) − f ( a ) = x − a g ( x ) − g ( a ) x − a f ( x ) − f ( a ) ⟶ g ′ ( a ) f ′ ( a )
When both functions vanish at the same point, their ratio is decided by how
fast each one leaves zero — their derivatives. The general statement, for
∞ ∞ \tfrac{\infty}{\infty} ∞ ∞ and when f ′ ( a ) f'(a) f ′ ( a ) does not exist, is proved with Cauchy’s
mean value theorem.
Example 1 — Applying the rule twice
Find lim x → ∞ x 2 e x \displaystyle\lim_{x \to \infty} \frac{x^2}{e^x} x → ∞ lim e x x 2 .
The form is ∞ ∞ \tfrac{\infty}{\infty} ∞ ∞ . Apply the rule: 2 x e x \tfrac{2x}{e^x} e x 2 x , still
∞ ∞ \tfrac{\infty}{\infty} ∞ ∞ . Apply it again: 2 e x → 0 \tfrac{2}{e^x} \to 0 e x 2 → 0 .
So e x e^x e x outgrows x 2 x^2 x 2 . The same argument, repeated n n n times, shows that e x e^x e x
outgrows every power x n x^n x n .
The rule handles only quotients. The remaining indeterminate forms are rewritten
into one first:
Form Rewrite 0 ⋅ ∞ 0 \cdot \infty 0 ⋅ ∞ f g = f 1 / g f g = \tfrac{f}{1/g} f g = 1/ g f , a 0 0 \tfrac{0}{0} 0 0 or ∞ ∞ \tfrac{\infty}{\infty} ∞ ∞ form∞ − ∞ \infty - \infty ∞ − ∞ combine over a common denominator, or factor 1 ∞ 1^\infty 1 ∞ , 0 0 0^0 0 0 , ∞ 0 \infty^0 ∞ 0 take ln \ln ln : ln ( f g ) = g ln f \ln(f^g) = g \ln f ln ( f g ) = g ln f , a 0 ⋅ ∞ 0 \cdot \infty 0 ⋅ ∞ form
For the power forms, find the limit L L L of ln y \ln y ln y , and then the original limit
is e L e^L e L .
Example 2 — A product 0 · ∞
Find lim x → 0 + x ln x \displaystyle\lim_{x \to 0^+} x \ln x x → 0 + lim x ln x .
The form is 0 ⋅ ( − ∞ ) 0 \cdot (-\infty) 0 ⋅ ( − ∞ ) . Rewrite as ln x 1 / x \tfrac{\ln x}{1/x} 1/ x l n x , a
− ∞ ∞ \tfrac{-\infty}{\infty} ∞ − ∞ form, and apply the rule:
lim x → 0 + 1 / x − 1 / x 2 = lim x → 0 + ( − x ) = 0 \lim_{x \to 0^+} \frac{1/x}{-1/x^2} = \lim_{x \to 0^+} (-x) = 0 x → 0 + lim − 1/ x 2 1/ x = x → 0 + lim ( − x ) = 0
Example 3 — The limit that defines e
Find lim x → ∞ ( 1 + 1 x ) x \displaystyle\lim_{x \to \infty} \left(1 + \frac{1}{x}\right)^x x → ∞ lim ( 1 + x 1 ) x .
The form is 1 ∞ 1^\infty 1 ∞ . Let y = ( 1 + 1 x ) x y = \left(1 + \tfrac{1}{x}\right)^x y = ( 1 + x 1 ) x , so
ln y = x ln ( 1 + 1 x ) = ln ( 1 + 1 x ) 1 / x \ln y = x \ln\!\left(1 + \frac{1}{x}\right) = \frac{\ln\left(1 + \frac{1}{x}\right)}{1/x} ln y = x ln ( 1 + x 1 ) = 1/ x ln ( 1 + x 1 ) a 0 0 \tfrac{0}{0} 0 0 form. Apply the rule, simplifying the chain-rule factor
− 1 x 2 -\tfrac{1}{x^2} − x 2 1 that appears on top and bottom:
lim x → ∞ − 1 / x 2 1 + 1 / x − 1 / x 2 = lim x → ∞ 1 1 + 1 / x = 1 \lim_{x \to \infty} \frac{\frac{-1/x^2}{1 + 1/x}}{-1/x^2} = \lim_{x \to \infty} \frac{1}{1 + 1/x} = 1 x → ∞ lim − 1/ x 2 1 + 1/ x − 1/ x 2 = x → ∞ lim 1 + 1/ x 1 = 1 So ln y → 1 \ln y \to 1 ln y → 1 and y → e 1 = e y \to e^1 = e y → e 1 = e .
Common mistake
Using the rule on a form that is not indeterminate.
lim x → 0 x + 1 x + 2 = 1 2 \lim_{x \to 0} \tfrac{x + 1}{x + 2} = \tfrac{1}{2} lim x → 0 x + 2 x + 1 = 2 1 by substitution. Applying
L’Hôpital’s rule anyway gives 1 1 = 1 \tfrac{1}{1} = 1 1 1 = 1 , which is wrong. Always check the
form first.
Common mistake
Differentiating the quotient. The rule takes f ′ g ′ \tfrac{f'}{g'} g ′ f ′ — top and
bottom differentiated separately. Using the quotient rule on f g \tfrac{f}{g} g f
computes something else entirely.
Find lim x → 0 sin 4 x x \lim_{x \to 0} \tfrac{\sin 4x}{x} lim x → 0 x s i n 4 x .
Answer
4 4 4
Full solution
Form 0 0 \tfrac{0}{0} 0 0 . The rule gives 4 cos 4 x 1 → 4 \tfrac{4\cos 4x}{1} \to 4 1 4 c o s 4 x → 4 .
Find lim x → 2 x 3 − 8 x − 2 \lim_{x \to 2} \tfrac{x^3 - 8}{x - 2} lim x → 2 x − 2 x 3 − 8 .
Answer
12 12 12
Full solution
Form 0 0 \tfrac{0}{0} 0 0 . The rule gives 3 x 2 1 → 12 \tfrac{3x^2}{1} \to 12 1 3 x 2 → 12 . (Factoring gives x 2 + 2 x + 4 → 12 x^2 + 2x + 4 \to 12 x 2 + 2 x + 4 → 12 too.)
Find lim x → ∞ ln x x \lim_{x \to \infty} \tfrac{\ln x}{\sqrt{x}} lim x → ∞ x l n x .
Answer
0 0 0
Full solution
Form ∞ ∞ \tfrac{\infty}{\infty} ∞ ∞ . The rule gives 1 / x 1 / ( 2 x ) = 2 x x = 2 x → 0 \tfrac{1/x}{1/(2\sqrt{x})} = \tfrac{2\sqrt{x}}{x} = \tfrac{2}{\sqrt{x}} \to 0 1/ ( 2 x ) 1/ x = x 2 x = x 2 → 0 .
Find lim x → 0 1 − cos x x 2 \lim_{x \to 0} \tfrac{1 - \cos x}{x^2} lim x → 0 x 2 1 − c o s x .
Answer
1 2 \tfrac{1}{2} 2 1
Full solution
Form 0 0 \tfrac{0}{0} 0 0 . Once: sin x 2 x \tfrac{\sin x}{2x} 2 x s i n x , still 0 0 \tfrac{0}{0} 0 0 . Twice: cos x 2 → 1 2 \tfrac{\cos x}{2} \to \tfrac{1}{2} 2 c o s x → 2 1 .
Find lim x → ∞ x e − x \lim_{x \to \infty} x e^{-x} lim x → ∞ x e − x .
Answer
0 0 0
Full solution
Form ∞ ⋅ 0 \infty \cdot 0 ∞ ⋅ 0 . Rewrite as x e x \tfrac{x}{e^x} e x x , form ∞ ∞ \tfrac{\infty}{\infty} ∞ ∞ . The rule gives 1 e x → 0 \tfrac{1}{e^x} \to 0 e x 1 → 0 .
Find lim x → 0 + x x \lim_{x \to 0^+} x^x lim x → 0 + x x .
Answer
1 1 1
Full solution
Form 0 0 0^0 0 0 . ln ( x x ) = x ln x → 0 \ln(x^x) = x\ln x \to 0 ln ( x x ) = x ln x → 0 (Example 2). So x x → e 0 = 1 x^x \to e^0 = 1 x x → e 0 = 1 .
Find lim x → 0 ( 1 x − 1 sin x ) \lim_{x \to 0} \left(\tfrac{1}{x} - \tfrac{1}{\sin x}\right) lim x → 0 ( x 1 − s i n x 1 ) .
Answer
0 0 0
Full solution
Form ∞ − ∞ \infty - \infty ∞ − ∞ . Combine: sin x − x x sin x \tfrac{\sin x - x}{x \sin x} x s i n x s i n x − x , form 0 0 \tfrac{0}{0} 0 0 .
Once: cos x − 1 sin x + x cos x \tfrac{\cos x - 1}{\sin x + x\cos x} s i n x + x c o s x c o s x − 1 , still 0 0 \tfrac{0}{0} 0 0 . Twice: − sin x 2 cos x − x sin x → 0 2 = 0 \tfrac{-\sin x}{2\cos x - x\sin x} \to \tfrac{0}{2} = 0 2 c o s x − x s i n x − s i n x → 2 0 = 0 .
Find lim x → ∞ ( 1 + 3 x ) x \lim_{x \to \infty} \left(1 + \tfrac{3}{x}\right)^x lim x → ∞ ( 1 + x 3 ) x .
Answer
e 3 e^3 e 3
Full solution
ln y = x ln ( 1 + 3 x ) = ln ( 1 + 3 / x ) 1 / x \ln y = x\ln\!\left(1 + \tfrac{3}{x}\right) = \tfrac{\ln(1 + 3/x)}{1/x} ln y = x ln ( 1 + x 3 ) = 1/ x l n ( 1 + 3/ x ) , form 0 0 \tfrac{0}{0} 0 0 . The rule gives 3 1 + 3 / x → 3 \tfrac{3}{1 + 3/x} \to 3 1 + 3/ x 3 → 3 , so y → e 3 y \to e^3 y → e 3 .
Find lim x → ∞ 3 x 2 + x 5 x 2 − 2 \lim_{x \to \infty} \tfrac{3x^2 + x}{5x^2 - 2} lim x → ∞ 5 x 2 − 2 3 x 2 + x with L’Hôpital’s rule, and check it against the leading-coefficient method.
Answer
3 5 \tfrac{3}{5} 5 3
Full solution
Once: 6 x + 1 10 x \tfrac{6x + 1}{10x} 10 x 6 x + 1 , still ∞ ∞ \tfrac{\infty}{\infty} ∞ ∞ . Twice: 6 10 = 3 5 \tfrac{6}{10} = \tfrac{3}{5} 10 6 = 5 3 . The ratio of leading coefficients is also 3 5 \tfrac{3}{5} 5 3 .
A student computes lim x → 0 cos x x + 1 \lim_{x \to 0} \tfrac{\cos x}{x + 1} lim x → 0 x + 1 c o s x with L’Hôpital’s rule and gets − sin 0 1 = 0 \tfrac{-\sin 0}{1} = 0 1 − s i n 0 = 0 . What went wrong?
Hint
What form does the limit have?
Answer
The form is 1 1 \tfrac{1}{1} 1 1 , not indeterminate. The limit is 1 1 1 .
Full solution
Substitution gives cos 0 0 + 1 = 1 \tfrac{\cos 0}{0 + 1} = 1 0 + 1 c o s 0 = 1 , a determinate value.
The rule applies only to 0 0 \tfrac{0}{0} 0 0 and ∞ ∞ \tfrac{\infty}{\infty} ∞ ∞ ; used here it produces a wrong answer.