# Contemporary Calculus 3.7 L'Hopital's Rule

```3.7
3.7
L'Hopital's Rule
Contemporary Calculus
1
^ PITAL'S RULE
L'HO
When we began taking limits of slopes of secant lines, msec =
f(x+h) – f(x)
h
as h &quot; 0 , we frequently
encountered one difficulty: both the numerator and the denominator approached 0. And since the
denominator approached 0, we could not apply the Main Limit Theorem. In each case, however, we
!
managed to get past this &quot;0/0&quot; difficulty by using algebra or geometry or trigonometry, but there was no
common approach or pattern. The algebraic steps we used to evaluate
lim
h &quot;0
sin(2 + h) # sin(2)
(2 + h) 2 # 4
seem quite different from the trigonometric steps needed for lim
.
h &quot;0
h
h
^ pital's Rule (pronounced Low–Pee–Tall), which
In this section we consider a single technique, called l'Ho
!
enables us to quickly and easily evaluate limits of the form &quot;0/0&quot; as well
! as several other difficult forms.
A Linear Example
Two linear functions are given in Fig. 1, and we need to find
lim
x &quot;5
f (x)
. Unfortunately, lim f(x) = 0 and lim g(x) = 0 so
x &quot;5
x &quot;5
g(x)
we cannot apply the Main Limit Theorem. However, we know f
!
! can calculate their
! slopes from Fig. 1, and we
and g are linear, we
know that they both go through the point (5,0) so we can find
their equations:
f(x) = –2(x – 5) and g(x) = 3(x – 5).
Now the limit is easier:
lim
x &quot;5
f (x)
#2(x # 5)
–2
= lim
= 3
x
&quot;5
g(x)
3(x # 5)
slope of f
= slope of g .
In fact, this pattern works for any two linear functions:
! g are linear!
If f and
functions with slopes m and n ≠ 0 and a common root at x = a,
( f(x) – f(a) = m(x – a) and g(x) – g(a) = n(x – a) so f(x) = m(x – a) and g(x) = n(x – a) )
then
lim
x &quot;a
f (x)
m(x # a)
m
slope of f
= lim
= n = slope of g .
x
&quot;a
g(x)
n(x # a)
^ pital who
The really powerful result, discovered by John Bernoulli and named for the Marquis de l'Ho
published
book, is that the same pattern is true for differentiable functions even if they are
! it in his calculus
!
not linear.
3.7
L'Hopital's Rule
Contemporary Calculus
2
L'H^
o pital's Rule ( &quot;0/0&quot; form )
If
f and g are differentiable at x = a ,
and f(a) = 0, g(a) = 0, and g '(a) ≠ 0 ,
then
lim
x &quot;a
f (x)
f '(a)
slope of f at a
= g '(a) = slope of g at a .
g(x)
Idea for a proof: Even though f and g may not be linear functions, they are differentiable so at the point
! are &quot;almost linear&quot; in the sense that they are well approximated by their tangent lines at
x = a they
that point (Fig. 2): since f(a) = g(a) = 0
f(x) ≈ f(a) + f '(a)(x–a) = f '(a)(x–a) and g(x) ≈ g(a) + g '(a)(x–a) = g '(a)(x–a).
Then
lim
x &quot;a
f (x)
f '(a)(x # a)
f '(a)
≈ lim
= g '(a) .
x &quot;a g'(a)(x # a)
g(x)
(Unfortunately, we have ignored a couple subtle difficulties such as g(x) or
! g '(x) possibly
! being 0 when x is close to a. A proof of l'Ho^ pital's
Rule is difficult and is not included.)
Example 1:
^ pital's Rule to determine
Use l'Ho
lim
x &quot;0
ln(x)
x 2 + sin(5x)
and lim x
x &quot;1 e # e
3x
^ pital's Rule but let's use it. We can match the
Solution: (a) We could evaluate this limit without l'Ho
^ pital's Rule by letting a = 0, f(x) = x2 + sin( 5x ) and g(x) = 3x. Then f(0) = 0, g(0)
pattern of l'Ho
!
!
= 0, and f and g are differentiable with f '(x) = 2x + 5cos( 5x ) and g '(x) = 3 so
lim
x &quot;0
x 2 + sin(5x)
f '(0)
2.0 + 5cos( 5.0 )
5
= g '(0) =
= 3 .
3
3x
x
(b) Let a = 1, f(x) = ln(x) and g(x) = e – e. Then f(1) = 0, g(1) = 0, f and g are differentiable for x
x
near 1 (x ≠ 0), and f '(x) = 1/x and g '(x) = e . Then
!
ln(x)
f '(1)
1/1
1
= g '(1) = 1 = e .
x &quot;1 e x # e
e
1# cos(5x)
^ pital's Rule to find lim
Practice 1:
Use l'Ho
and
x &quot;0
3x
lim
lim
x &quot;2
x2 + x # 6
.
x 2 + 2x # 8
!
Strong Version of L'H^
o pital's Rule
!
!
^ pital's Rule can be strengthened to include the case when g '(a) = 0 and the indeterminate form &quot;∞/∞&quot;,
L'Ho
the case when both f and g increase without any bound.
3.7
L'Hopital's Rule
Contemporary Calculus
3
L'H^
o pital's Rule (Strong &quot; 0/0 &quot; and &quot; ∞/∞ &quot; forms)
If
f and g are differentiable on an open interval I which contains the point a,
g '(x) ≠ 0 on I except possibly at a, and
lim
f (x) &quot; 0 &quot;
&quot;∞ &quot;
= 0
or ∞
g(x)
lim
f (x)
f '(x)
= lim
provided the limit on the right exists.
x &quot;a g'(x)
g(x)
x &quot;a
then
x &quot;a
!
( &quot;a&quot; can represent a finite number or &quot;∞.&quot; )
!
!
Example 2:
lim
Evaluate
x &quot;#
e 7x
.
5x
7x
&quot; ∞&quot;, both f(x) = e and g(x) = 5x increase without bound so we have an &quot;∞/∞&quot;
^ pital's Rule:
indeterminate
form and can use the Strong Version l'Ho
!
Solution: As &quot;x
!
lim
x &quot;#
e 7x
7e 7x
= lim
=∞.
x &quot;#
5x
5
^ pital's Rule to the ratio
The limit of f '/g ' may also be an indeterminate form, and then we can apply l'Ho
!f '/g '. We can
! continue using l'Ho^ pital's Rule at each stage as long as we have an indeterminate quotient.
Example 3:
Solution: As x
lim
x &quot;0
x3
x # sin(x)
3
&quot; 0, f(x) = x &quot; 0 and g(x) = x – sin(x) &quot; 0 so
!
x3
lim
x&quot;0 x # sin(x)
!
!
!
lim
=
6x
&quot;0 &quot;
lim !
&quot; 0
x &quot;0 sin(x)
=
6
6
lim!
= 1 = 6.
x &quot;0 cos(x)
!
!
Practice 2:
3x 2
&quot;0 &quot;
&quot; 0
1# cos(x) !
=
x &quot;0
^ pital's Rule to find
Use l'Ho
!
!
lim
x &quot;#
^ pital's Rule again
so we can use l'Ho
and again
x 2 + ex
.
x 3 + 8x
3.7
L'Hopital's Rule
Contemporary Calculus
4
Which Function Grows Faster?
Sometimes we want to compare the asymptotic behavior of two systems or functions for large values of x,
^ pital's Rule can be a useful tool. For example, if we have two different algorithms for sorting
and l'Ho
names, and each algorithm takes longer and longer to sort larger collections of names, we may want to know
which algorithm will accomplish the task more efficiently for really large collections of names.
Example 4:
1.5
Algorithm A requires n.ln(n) steps to sort n names and algorithm B requires n steps .
Which algorithm will be better for sorting very large collections of names?
Solution: We can compare the ratio of the number of steps each algorithm requires,
take the limit of this ratio as n grows arbitrarily large:
say that n.ln(n) &quot;grows faster&quot; than n
n.ln(n). Since n.ln(n) and n
1.5
1.5
lim
n &quot;#
n.ln(n)
1.5 , and then
n
n \$ ln(n)
. If this limit is infinite, we
n1.5
1.5
. If the limit is 0, we say that n
grows faster than
both grow arbitrarily large when n is large, we can algebraically
!
simplify the ratio to
ln(n)
0.5
n
and then use L'Hopital's Rule:
lim
n &quot;#
n
1.5
2
ln(n)
1/n
= lim
= lim
=0.
0.5
\$0.5
n &quot;#
n &quot;# 0.5n
n
n
grows faster than n .ln(n) so algorithm A requires fewer steps for really large sorts.
Practice 3:
!
!n
!
Algorithm A requires e operations to find the shortest path connecting n towns, algorithm
5
B requires 100.ln(n) operations for the same task, and algorithm C requires n operations. Which
algorithm is best for finding the shortest path connecting a very large number of towns? Worst?
Other &quot;Indeterminate Forms&quot;
&quot;0/0&quot; is called an indeterminate form because knowing that f approaches 0 and g approaches 0 is not
enough to determine the limit of f/g, even if it has a limit. The ratio of a &quot;small&quot; number divided by a
&quot;small&quot; number can be almost anything as the three simple &quot;0/0&quot; examples show:
lim 3x/x = 3 ,
x &quot;0
lim x2/x = 0 , and
lim 5x/x3 = ∞ .
x &quot;0
x &quot;0
Similarly, &quot;∞/∞&quot; is an indeterminate form because knowing that f and g both grow arbitrarily large is
! not enough to determine
! the value limit of f/g or if the
! limit exists:
lim 3x/x = 3 ,
x &quot;#
!
!
lim x2/x = ∞ , and
x &quot;#
!
lim 5x/x3 = 0 .
x &quot;#
3.7
L'Hopital's Rule
Contemporary Calculus
5
Besides the indeterminate quotient forms &quot;0/0&quot; and &quot;∞/∞&quot; there are several other &quot;indeterminate forms.&quot; In
each case, the resulting limit depends not only on each function's limit but also on how quickly each function
approaches its limit.
If f approaches 0, and g grows arbitrarily large, the product f . g has the indeterminant form &quot;0 . ∞.&quot;
g
0
Exponent: If f and g both approach 0, the function f has the indeterminant form &quot;0 .&quot;
g
∞
If f approaches 1, and g grows arbitrarily large, the function f has the indeterminant form &quot;1 . &quot;
g
0
If f grows arbitrarily large, and g approaches 0, the function f has the indeterminant form &quot;∞ . &quot;
Product:
Difference: If f and g both grow arbitrarily large, the function f – g has the indeterminant form &quot;∞ – ∞.&quot;
^ pital's Rule can only be used directly with an indeterminate quotient (&quot;0/0&quot; or &quot;∞/∞'),
Unfortunately, l'Ho
^ pital's Rule can be
but these other forms can be algebraically manipulated into quotients, and then l'Ho
applied to the resulting quotient.
Example 5:
Evaluate
lim x.ln(x)
x &quot;0 +
( &quot; 0.(–∞) &quot; form )
^ pital's
Solution: This limit involves an indeterminate product, and we need a quotient in order to apply l'Ho
ln(x)
.
Rule. We can
! rewrite the product x ln(x) as the quotient 1/x , and then
lim+ x ln(x)
=
x &quot;0
x &quot;0
=
!
lim+
!
∞
ln(x)
&quot; ∞
1/ x
^ pital's Rule
so apply l'Ho
1/ x
= lim+ –x = 0 .
lim+
2
!
x &quot;0 #1/ x
x &quot;0
f
g
A product f.g with the indeterminant form &quot;0.∞&quot; can be rewritten as a quotient, 1/g or 1/f ,
! can be used.
! l'Ho^ pital's Rule
and then
Example 6:
Evaluate
lim xx
0
( &quot; 0 &quot; form)
x &quot;0 +
Solution: An indeterminate exponent can be converted to a product by recalling a property of exponential
and
ln( a )
g
ln( f g )
g ln( f )
!
logarithm functions:
for any positive number a, a = e
so f = e
= e
.
x
.
lim+ xx = lim+ eln( x ) = lim+ ex ln( x ) and this last limit involves an indeterminate
x &quot;0
x &quot;0
product x.ln(x)
!
x &quot;0
&quot; 0.(–∞) which we converted to a quotient and evaluated to be 0 in Example 5.
0
Our final answer is then e = 1 :
!
!
!
x
.
lim+ xx = lim+ eln( x ) = lim+ ex ln( x ) =
x &quot;0
!
!
x &quot;0
x &quot;0
!
0
e =1.
3.7
L'Hopital's Rule
Contemporary Calculus
6
0
∞
0
with the form &quot;0 ,&quot; &quot;1 ,&quot; or &quot;∞ , &quot; can be
g
g.ln(f)
converted to an indeterminate product by recognizing that f = e
and then determining
.
(limit of g ln(f) )
the limit of g.ln(f). The final result is e
.
An indeterminate form involving exponents, f
\$ a 'x
Evaluate lim &amp;1+ )
x &quot;# %
x(
Example 7:
(&quot;1
g
∞ &quot; form)
\$ a 'x
a
x.ln( 1 + a/x )
Solution: lim &amp;1+ ) = lim e
so we need lim x.ln( 1 + x ) .
x &quot;#
x &quot;#
x &quot;# %
x(
!
a
lim x.ln( 1 + x ) &quot; &quot;∞.0&quot; an indeterminate product so rewrite it as a quotient
x &quot;#
!
\$ a'
ln&amp;1+ )
% x(
= lim !
x &quot;#
1/ x
!
!
!
!
0
&quot; &quot;0 &quot;
%
(
' \$a / x 2 *
'! a *
' 1+ *
&amp;
x ) = lim a
= lim
a
x &quot;# % 1 (
x &quot;#
1+
'\$ 2 *
x
&amp; x )
\$
Finally, lim &amp;1+
! x &quot;# %
PROBLEMS
a'
)
x(
x
=! lim e
x &quot;#
^ pital's Rule
an indeterminate quotient so use l'Ho
a
&quot; 1 =a.
x!.ln( 1 + a/x )
a
= e .
!
!
Determine
the limits in problems 1 – 15.
1.
4.
!
7.
x 3 #1
x &quot;1 x 2 #1
ex
lim 3
x &quot;# x
lim
lim
x &quot;#
!
!
13.
!
!
lim
x &quot;0
lim
x &quot;a
5.
!
ln(x)
x
3x
10.
2.
e #e
4x
8.
!
2x
x m # am
x n # an
!
!
ln(1+ 3x)
5x
cos(a + x) # cos(a)
6. lim
x &quot;0
x
lim
x &quot;#
ln(x)
x
lim
x &quot;0
2 x #1
x
3.
lim
9.
lim
ln(x)
xp
12.
lim
1# cos(2x)
x
15.
lim
1# cos(x)
x \$ cos(x)
!
!
1# cos(3x)
11. lim
x &quot;0
x2
!
14.
!
x 4 #16
x &quot;2 x 5 # 32
x # ex
lim
x &quot;0 1\$ e x
lim
!
!
x &quot;0
x &quot;#
x &quot;0
x &quot;0
(p is any positive number)
3.7
L'Hopital's Rule
Contemporary Calculus
16. Find a value for p so
lim
3x
= 2.
px + 7
17. Find a value for p so
lim
e px #1
= 5.
3x
!
18.
x &quot;#
x &quot;0
7
3x + 5
^ pital's Rule work with this
has the indeterminate form &quot;∞/∞&quot; . Why doesn't l'Ho
2x \$1
!
^ pital's Rule twice and see what happens.) Evaluate the limit without using
limit? (Hint: Apply l'Ho
^ pital's Rule.
l'Ho
lim
x &quot;#
!
lim
19. (a) Evaluate
x &quot;#
ex
ex
ex
, lim 2 , lim 5 .
x x &quot;# x x &quot;# x
bn
(b) An algorithm is &quot;exponential&quot; if it requires a.e
steps (a and b are positive constants). An
d
algorithm is &quot;polynomial&quot; if it requires c.n steps (c and d are positive constants). Show that
!
polynomial!algorithms!require fewer steps than exponential algorithms for large problems.
x2
20. The problem lim
appeared on a test.
x &quot;0 3x 2 + x
^ pital's Rule to get:
One student determined the limit was an indeterminate &quot;0/0&quot; form, and applied l'Ho
!
&quot; lim
x &quot;0
2x
2
x2
1
= lim
= lim
= 3 .&quot;
2
x &quot;0 6x + 1
x &quot;0 6
3x + x
Another student also determined the limit was an indeterminate &quot;0/0&quot; form and wrote,
2
0
! x
! 2x
= lim
= 0 + 1 = 0 .&quot;
2
x &quot;0 6x + 1
x &quot;0 3x + x
!
&quot; lim
Which student is correct? Why?
! the limits in!
Determine
problems 21 – 29.
21.
lim+ sin(x).ln(x)
22.
lim x3.e–x
23.
lim xsin(x)
25.
lim (1\$ 3/ x 2 ) x
26.
lim (1\$ cos(3x)) x
29.
\$ x + 5 '1/ x
lim &amp;
)
x &quot;# %
x (
x &quot;0
24.
x &quot;0 +
x &quot;#
!
!
!
x &quot;#
\$1
1 '
27. lim &amp; #
)
x &quot;0 % x
sin(x) (
!
28.
!
lim (x \$ ln(x))
x &quot;#
!
30. lim (1 + 3 / x) 2 / x
x &quot;#
!
!
!
!
lim
x &quot;0 +
x # ln(x)
x &quot;#
3.7
L'Hopital's Rule
Contemporary Calculus
Section 3.7
8
Practice 1:
lim
(a)
x &quot;0
1# cos(5x)
. The numerator and denominator are both differentiable and both
3x
^ pital's Rule:
equal 0 when x = 0, so we can apply l'Ho
lim
!
x &quot;0
1# cos(5x)
5 # sin(5x)
0
= lim
&quot; 3 =0.
x &quot;0
3x
3
2
lim
(b)
x &quot;2
x + x #6
.
x 2 + 2x # 8
The numerator and denominator are both differentiable functions
!
and they both equal
! 0 when x = 0, so!we can apply l'Ho^ pital's Rule:
!
lim
x &quot;2
2x + 1 5
x2 + x # 6
= lim
= 6 .
2
x &quot;2 2x + 2
x + 2x # 8
x 2 + ex
. The numerator and denominator are both differentiable
x &quot;# x 3 + 8x
!
!
^ pital's Rule:
and both become arbitrarily large as x becomes large, so we can apply l'Ho
lim
Practice 2:
2
x
x
&quot;
! lim x3 + e = lim 2x 2+ e &quot; &quot; ∞
^ pital's Rule again:
∞ . Using l'Ho
x &quot;# x + 8x
x &quot;# 3x + 8
2x + e x
2 + ex
∞
= lim
lim
&quot; &quot; ∞ &quot; and again:
x &quot;# 3x 2 + 8 ! x &quot;#
6x
!
!
lim
!
Practice 3:
!
x &quot;#
2 + ex
ex
= lim
&quot; ∞ .
6x ! x &quot;# 6
n
Comparing A with e operations to B with 100.ln(n) operations.
!
en
∞
lim !
! &quot; ∞ &quot; so use L'Hopital's Rule:
&quot;
n &quot;# 100 \$ ln(n)
en
en
n \$ en
lim
= lim
= lim
= ∞ so B requires fewer operations than A.
n &quot;# 100 \$ ln(n)
n &quot;# 100 /n
n &quot;# 100
!
!
5
Comparing B with 100.ln(n) operations to C with n operations.
100 \$ ln(n)
! lim 100 \$ ln(n) ! ∞ . lim !
= lim
&quot; ∞
5
5
n
n &quot;#
n &quot;#
n
n &quot;#
100 /n
100
= lim
=0
4
n &quot;# 5n 5
5n
so B requires fewer operations than C. B requires the fewest operations of the three algorithms.
!
!
n
5
Comparing A with e !
operations to C with n! operations. Using
! l'Ho^ pital's Rule several times:
n
lim
n &quot;#
n
n
e
e
e
en
en
en
=
=
=
=
=
= ∞
lim
lim
lim
lim
lim
n &quot;# 5n 4
n &quot;# 20n 3
n &quot;# 60n 2
n &quot;# 120n
n &quot;# 120
n5
so A requires more operations than C. A requires the most operations of the three algorithms.
!
!
!
!
!
!
```