Skip to ContentGo to accessibility pageKeyboard shortcuts menu
OpenStax Logo
Calculus Volume 1

4.8 L’Hôpital’s Rule

Calculus Volume 14.8 L’Hôpital’s Rule

Learning Objectives

  • 4.8.1 Recognize when to apply L’Hôpital’s rule.
  • 4.8.2 Identify indeterminate forms produced by quotients, products, subtractions, and powers, and apply L’Hôpital’s rule in each case.
  • 4.8.3 Describe the relative growth rates of functions.

In this section, we examine a powerful tool for evaluating limits. This tool, known as L’Hôpital’s rule, uses derivatives to calculate limits. With this rule, we will be able to evaluate many limits we have not yet been able to determine. Instead of relying on numerical evidence to conjecture that a limit exists, we will be able to show definitively that a limit exists and to determine its exact value.

Applying L’Hôpital’s Rule

L’Hôpital’s rule can be used to evaluate limits involving the quotient of two functions. Consider

limxaf(x)g(x).limxaf(x)g(x).

If limxaf(x)=L1andlimxag(x)=L20,limxaf(x)=L1andlimxag(x)=L20, then

limxaf(x)g(x)=L1L2.limxaf(x)g(x)=L1L2.

However, what happens if limxaf(x)=0limxaf(x)=0 and limxag(x)=0?limxag(x)=0? We call this one of the indeterminate forms, of type 00.00. This is considered an indeterminate form because we cannot determine the exact behavior of f(x)g(x)f(x)g(x) as xaxa without further analysis. We have seen examples of this earlier in the text. For example, consider

limx2x24x2andlimx0sinxx.limx2x24x2andlimx0sinxx.

For the first of these examples, we can evaluate the limit by factoring the numerator and writing

limx2x24x2=limx2(x+2)(x2)x2=limx2(x+2)=2+2=4.limx2x24x2=limx2(x+2)(x2)x2=limx2(x+2)=2+2=4.

For limx0sinxxlimx0sinxx we were able to show, using a geometric argument, that

limx0sinxx=1.limx0sinxx=1.

Here we use a different technique for evaluating limits such as these. Not only does this technique provide an easier way to evaluate these limits, but also, and more important, it provides us with a way to evaluate many other limits that we could not calculate previously.

The idea behind L’Hôpital’s rule can be explained using local linear approximations. Consider two differentiable functions ff and gg such that limxaf(x)=0=limxag(x)limxaf(x)=0=limxag(x) and such that g(a)0g(a)0 For xx near a,a, we can write

f(x)f(a)+f(a)(xa)f(x)f(a)+f(a)(xa)

and

g(x)g(a)+g(a)(xa).g(x)g(a)+g(a)(xa).

Therefore,

f(x)g(x)f(a)+f(a)(xa)g(a)+g(a)(xa).f(x)g(x)f(a)+f(a)(xa)g(a)+g(a)(xa).
Two functions y = f(x) and y = g(x) are drawn such that they cross at a point above x = a. The linear approximations of these two functions y = f(a) + f’(a)(x – a) and y = g(a) + g’(a)(x – a) are also drawn.
Figure 4.71 If limxaf(x)=limxag(x),limxaf(x)=limxag(x), then the ratio f(x)/g(x)f(x)/g(x) is approximately equal to the ratio of their linear approximations near a.a.

Since ff is differentiable at a,a, then ff is continuous at a,a, and therefore f(a)=limxaf(x)=0.f(a)=limxaf(x)=0. Similarly, g(a)=limxag(x)=0.g(a)=limxag(x)=0. If we also assume that ff and gg are continuous at x=a,x=a, then f(a)=limxaf(x)f(a)=limxaf(x) and g(a)=limxag(x).g(a)=limxag(x). Using these ideas, we conclude that

limxaf(x)g(x)=limxaf(x)(xa)g(x)(xa)=limxaf(x)g(x).limxaf(x)g(x)=limxaf(x)(xa)g(x)(xa)=limxaf(x)g(x).

Note that the assumption that ff and gg are continuous at aa and g(a)0g(a)0 can be loosened. We state L’Hôpital’s rule formally for the indeterminate form 00.00. Also note that the notation 0000 does not mean we are actually dividing zero by zero. Rather, we are using the notation 0000 to represent a quotient of limits, each of which is zero.

Theorem 4.12

L’Hôpital’s Rule (0/0 Case)

Suppose ff and gg are differentiable functions over an open interval containing a,a, except possibly at a.a. If limxaf(x)=0limxaf(x)=0 and limxag(x)=0,limxag(x)=0, then

limxaf(x)g(x)=limxaf(x)g(x),limxaf(x)g(x)=limxaf(x)g(x),

assuming the limit on the right exists or is or .. This result also holds if we are considering one-sided limits, or if a=and.a=and.

Proof

We provide a proof of this theorem in the special case when f,g,f,f,g,f, and gg are all continuous over an open interval containing a.a. In that case, since limxaf(x)=0=limxag(x)limxaf(x)=0=limxag(x) and ff and gg are continuous at a,a, it follows that f(a)=0=g(a).f(a)=0=g(a). Therefore,

limxaf(x)g(x)=limxaf(x)f(a)g(x)g(a)sincef(a)=0=g(a)=limxaf(x)f(a)xag(x)g(a)xaalgebra=limxaf(x)f(a)xalimxag(x)g(a)xalimit of a quotient=f(a)g(a)definition of the derivative=limxaf(x)limxag(x)continuity offandg=limxaf(x)g(x).limit of a quotientlimxaf(x)g(x)=limxaf(x)f(a)g(x)g(a)sincef(a)=0=g(a)=limxaf(x)f(a)xag(x)g(a)xaalgebra=limxaf(x)f(a)xalimxag(x)g(a)xalimit of a quotient=f(a)g(a)definition of the derivative=limxaf(x)limxag(x)continuity offandg=limxaf(x)g(x).limit of a quotient

Note that L’Hôpital’s rule states we can calculate the limit of a quotient fgfg by considering the limit of the quotient of the derivatives fg.fg. It is important to realize that we are not calculating the derivative of the quotient fg.fg.

Example 4.38

Applying L’Hôpital’s Rule (0/0 Case)

Evaluate each of the following limits by applying L’Hôpital’s rule.

  1. limx01cosxxlimx01cosxx
  2. limx1sin(πx)lnxlimx1sin(πx)lnx
  3. limxe1/x11/xlimxe1/x11/x
  4. limx0sinxxx2limx0sinxxx2

Checkpoint 4.37

Evaluate limx0xtanx.limx0xtanx.

We can also use L’Hôpital’s rule to evaluate limits of quotients f(x)g(x)f(x)g(x) in which f(x)±f(x)± and g(x)±.g(x)±. Limits of this form are classified as indeterminate forms of type /./. Again, note that we are not actually dividing by .. Since is not a real number, that is impossible; rather, /./. is used to represent a quotient of limits, each of which is or ..

Theorem 4.13

L’Hôpital’s Rule (/(/ Case)

Suppose ff and gg are differentiable functions over an open interval containing a,a, except possibly at a.a. Suppose limxaf(x)=limxaf(x)= (or )) and limxag(x)=limxag(x)= (or ).). Then,

limxaf(x)g(x)=limxaf(x)g(x),limxaf(x)g(x)=limxaf(x)g(x),

assuming the limit on the right exists or is or .. This result also holds if the limit is infinite, if a=a= or ,, or the limit is one-sided.

Example 4.39

Applying L’Hôpital’s Rule (/(/ Case)

Evaluate each of the following limits by applying L’Hôpital’s rule.

  1. limx3x+52x+1limx3x+52x+1
  2. limx0+lnxcotxlimx0+lnxcotx

Checkpoint 4.38

Evaluate limxlnx5x.limxlnx5x.

As mentioned, L’Hôpital’s rule is an extremely useful tool for evaluating limits. It is important to remember, however, that to apply L’Hôpital’s rule to a quotient f(x)g(x),f(x)g(x), it is essential that the limit of f(x)g(x)f(x)g(x) be of the form 0000 or /./. Consider the following example.

Example 4.40

When L’Hôpital’s Rule Does Not Apply

Consider limx1x2+53x+4.limx1x2+53x+4. Show that the limit cannot be evaluated by applying L’Hôpital’s rule.

Checkpoint 4.39

Explain why we cannot apply L’Hôpital’s rule to evaluate limx0+cosxx.limx0+cosxx. Evaluate limx0+cosxxlimx0+cosxx by other means.

Other Indeterminate Forms

L’Hôpital’s rule is very useful for evaluating limits involving the indeterminate forms 0000 and /./. However, we can also use L’Hôpital’s rule to help evaluate limits involving other indeterminate forms that arise when evaluating limits. The expressions 0·,0·, ,, 1,1, 0,0, and 0000 are all considered indeterminate forms. These expressions are not real numbers. Rather, they represent forms that arise when trying to evaluate certain limits. Next we realize why these are indeterminate forms and then understand how to use L’Hôpital’s rule in these cases. The key idea is that we must rewrite the indeterminate forms in such a way that we arrive at the indeterminate form 0000 or /./.

Indeterminate Form of Type 0·0·

Suppose we want to evaluate limxa(f(x)·g(x)),limxa(f(x)·g(x)), where f(x)0f(x)0 and g(x)g(x) (or )) as xa.xa. Since one term in the product is approaching zero but the other term is becoming arbitrarily large (in magnitude), anything can happen to the product. We use the notation 0·0· to denote the form that arises in this situation. The expression 0·0· is considered indeterminate because we cannot determine without further analysis the exact behavior of the product f(x)g(x)f(x)g(x) as xa.xa. For example, let nn be a positive integer and consider

f(x)=1(xn+1)andg(x)=3x2.f(x)=1(xn+1)andg(x)=3x2.

As x,x, f(x)0f(x)0 and g(x).g(x). However, the limit as xx of f(x)g(x)=3x2(xn+1)f(x)g(x)=3x2(xn+1) varies, depending on n.n. If n=2,n=2, then limxf(x)g(x)=3.limxf(x)g(x)=3. If n=1,n=1, then limxf(x)g(x)=.limxf(x)g(x)=. If n=3,n=3, then limxf(x)g(x)=0.limxf(x)g(x)=0. Here we consider another limit involving the indeterminate form 0·0· and show how to rewrite the function as a quotient to use L’Hôpital’s rule.

Example 4.41

Indeterminate Form of Type 0·0·

Evaluate limx0+xlnx.limx0+xlnx.

Checkpoint 4.40

Evaluate limx0xcotx.limx0xcotx.

Indeterminate Form of Type

Another type of indeterminate form is .. Consider the following example. Let nn be a positive integer and let f(x)=3xnf(x)=3xn and g(x)=3x2+5.g(x)=3x2+5. As x,x, f(x)f(x) and g(x).g(x). We are interested in limx(f(x)g(x)).limx(f(x)g(x)). Depending on whether f(x)f(x) grows faster, g(x)g(x) grows faster, or they grow at the same rate, as we see next, anything can happen in this limit. Since f(x)f(x) and g(x),g(x), we write to denote the form of this limit. As with our other indeterminate forms, has no meaning on its own and we must do more analysis to determine the value of the limit. For example, suppose the exponent nn in the function f(x)=3xnf(x)=3xn is n=3,n=3, then

limx(f(x)g(x))=limx(3x33x25)=.limx(f(x)g(x))=limx(3x33x25)=.

On the other hand, if n=2,n=2, then

limx(f(x)g(x))=limx(3x23x25)=−5.limx(f(x)g(x))=limx(3x23x25)=−5.

However, if n=1,n=1, then

limx(f(x)g(x))=limx(3x3x25)=.limx(f(x)g(x))=limx(3x3x25)=.

Therefore, the limit cannot be determined by considering only .. Next we see how to rewrite an expression involving the indeterminate form as a fraction to apply L’Hôpital’s rule.

Example 4.42

Indeterminate Form of Type

Evaluate limx0+(1x21tanx).limx0+(1x21tanx).

Checkpoint 4.41

Evaluate limx0+(1x1sinx).limx0+(1x1sinx).

Another type of indeterminate form that arises when evaluating limits involves exponents. The expressions 00,00, 0,0, and 11 are all indeterminate forms. On their own, these expressions are meaningless because we cannot actually evaluate these expressions as we would evaluate an expression involving real numbers. Rather, these expressions represent forms that arise when finding limits. Now we examine how L’Hôpital’s rule can be used to evaluate limits involving these indeterminate forms.

Since L’Hôpital’s rule applies to quotients, we use the natural logarithm function and its properties to reduce a problem evaluating a limit involving exponents to a related problem involving a limit of a quotient. For example, suppose we want to evaluate limxaf(x)g(x)limxaf(x)g(x) and we arrive at the indeterminate form 0.0. (The indeterminate forms 0000 and 11 can be handled similarly.) We proceed as follows. Let

y=f(x)g(x).y=f(x)g(x).

Then,

lny=ln(f(x)g(x))=g(x)ln(f(x)).lny=ln(f(x)g(x))=g(x)ln(f(x)).

Therefore,

limxa[ln(y)]=limxa[g(x)ln(f(x))].limxa[ln(y)]=limxa[g(x)ln(f(x))].

Since limxaf(x)=,limxaf(x)=, we know that limxaln(f(x))=.limxaln(f(x))=. Therefore, limxag(x)ln(f(x))limxag(x)ln(f(x)) is of the indeterminate form 0·,0·, and we can use the techniques discussed earlier to rewrite the expression g(x)ln(f(x))g(x)ln(f(x)) in a form so that we can apply L’Hôpital’s rule. Suppose limxag(x)ln(f(x))=L,limxag(x)ln(f(x))=L, where LL may be or .. Then

limxa[ln(y)]=L.limxa[ln(y)]=L.

Since the natural logarithm function is continuous, we conclude that

ln(limxay)=L,ln(limxay)=L,

which gives us

limxay=limxaf(x)g(x)=eL.limxay=limxaf(x)g(x)=eL.

Example 4.43

Indeterminate Form of Type 00

Evaluate limxx1/x.limxx1/x.

Checkpoint 4.42

Evaluate limxx1/ln(x).limxx1/ln(x).

Example 4.44

Indeterminate Form of Type 0000

Evaluate limx0+xsinx.limx0+xsinx.

Checkpoint 4.43

Evaluate limx0+xx.limx0+xx.

Growth Rates of Functions

Suppose the functions ff and gg both approach infinity as x.x. Although the values of both functions become arbitrarily large as the values of xx become sufficiently large, sometimes one function is growing more quickly than the other. For example, f(x)=x2f(x)=x2 and g(x)=x3g(x)=x3 both approach infinity as x.x. However, as shown in the following table, the values of x3x3 are growing much faster than the values of x2.x2.

xx 1010 100100 10001000 10,00010,000
f(x)=x2f(x)=x2 100100 10,00010,000 1,000,0001,000,000 100,000,000100,000,000
g(x)=x3g(x)=x3 10001000 1,000,0001,000,000 1,000,000,0001,000,000,000 1,000,000,000,0001,000,000,000,000
Table 4.7 Comparing the Growth Rates of x 2 x 2 and x 3 x 3

In fact,

limxx3x2=limxx=.or, equivalently,limxx2x3=limx1x=0.limxx3x2=limxx=.or, equivalently,limxx2x3=limx1x=0.

As a result, we say x3x3 is growing more rapidly than x2x2 as x.x. On the other hand, for f(x)=x2f(x)=x2 and g(x)=3x2+4x+1,g(x)=3x2+4x+1, although the values of g(x)g(x) are always greater than the values of f(x)f(x) for x>0,x>0, each value of g(x)g(x) is roughly three times the corresponding value of f(x)f(x) as x,x, as shown in the following table. In fact,

limxx23x2+4x+1=13.limxx23x2+4x+1=13.
xx 1010 100100 10001000 10,00010,000
f(x)=x2f(x)=x2 100100 10,00010,000 1,000,0001,000,000 100,000,000100,000,000
g(x)=3x2+4x+1g(x)=3x2+4x+1 341341 30,40130,401 3,004,0013,004,001 300,040,001300,040,001
Table 4.8 Comparing the Growth Rates of x 2 x 2 and 3 x 2 + 4 x + 1 3 x 2 + 4 x + 1

In this case, we say that x2x2 and 3x2+4x+13x2+4x+1 are growing at the same rate as x.x.

More generally, suppose ff and gg are two functions that approach infinity as x.x. We say gg grows more rapidly than ff as xx if

limxg(x)f(x)=;or, equivalently,limxf(x)g(x)=0.limxg(x)f(x)=;or, equivalently,limxf(x)g(x)=0.

On the other hand, if there exists a constant M0M0 such that

limxf(x)g(x)=M,limxf(x)g(x)=M,

we say ff and gg grow at the same rate as x.x.

Next we see how to use L’Hôpital’s rule to compare the growth rates of power, exponential, and logarithmic functions.

Example 4.45

Comparing the Growth Rates of ln(x),ln(x), x2,x2, and exex

For each of the following pairs of functions, use L’Hôpital’s rule to evaluate limx(f(x)g(x)).limx(f(x)g(x)).

  1. f(x)=x2andg(x)=exf(x)=x2andg(x)=ex
  2. f(x)=ln(x)andg(x)=x2f(x)=ln(x)andg(x)=x2

Checkpoint 4.44

Compare the growth rates of x100x100 and 2x.2x.

Using the same ideas as in Example 4.45a. it is not difficult to show that exex grows more rapidly than xpxp for any p>0.p>0. In Figure 4.75 and Table 4.11, we compare exex with x3x3 and x4x4 as x.x.

This figure has two figures marked a and b. In figure a, the functions y = ex and y = x3 are graphed. It is obvious that ex increases more quickly than x3. In figure b, the functions y = ex and y = x4 are graphed. It is obvious that ex increases much more quickly than x4, but the point at which that happens is further to the right than it was for x3.
Figure 4.75 The exponential function exex grows faster than xpxp for any p>0.p>0. (a) A comparison of exex with x3.x3. (b) A comparison of exex with x4.x4.
xx 55 1010 1515 2020
x3x3 125125 10001000 33753375 80008000
x4x4 625625 10,00010,000 50,62550,625 160,000160,000
exex 148148 22,02622,026 3,269,0173,269,017 485,165,195485,165,195
Table 4.11 An exponential function grows at a faster rate than any power function

Similarly, it is not difficult to show that xpxp grows more rapidly than lnxlnx for any p>0.p>0. In Figure 4.76 and Table 4.12, we compare lnxlnx with x3x3 and x.x.

This figure shows y = the square root of x, y = the cube root of x, and y = ln(x). It is apparent that y = ln(x) grows more slowly than either of these functions.
Figure 4.76 The function y=ln(x)y=ln(x) grows more slowly than xpxp for any p>0p>0 as x.x.
xx 1010 100100 10001000 10,00010,000
ln(x)ln(x) 2.3032.303 4.6054.605 6.9086.908 9.2109.210
x3x3 2.1542.154 4.6424.642 1010 21.54421.544
xx 3.1623.162 1010 31.62331.623 100100
Table 4.12 A logarithmic function grows at a slower rate than any root function

Section 4.8 Exercises

For the following exercises, evaluate the limit.

356.

Evaluate the limit limxexx.limxexx.

357.

Evaluate the limit limxexxk.limxexxk.

358.

Evaluate the limit limxlnxxk.limxlnxxk.

359.

Evaluate the limit limxaxax2a2,a0limxaxax2a2,a0.

360.

Evaluate the limit limxaxax3a3,a0limxaxax3a3,a0.

361.

Evaluate the limit limxaxaxnan,a0limxaxaxnan,a0.

For the following exercises, determine whether you can apply L’Hôpital’s rule directly. Explain why or why not. Then, indicate if there is some way you can alter the limit so you can apply L’Hôpital’s rule.

362.

lim x 0 + x 2 ln x lim x 0 + x 2 ln x

363.

lim x x 1 / x lim x x 1 / x

364.

lim x 0 x 2 / x lim x 0 x 2 / x

365.

lim x 0 x 2 1 / x lim x 0 x 2 1 / x

366.

lim x e x x lim x e x x

For the following exercises, evaluate the limits with either L’Hôpital’s rule or previously learned methods.

367.

lim x 3 x 2 9 x 3 lim x 3 x 2 9 x 3

368.

lim x 3 x 2 9 x + 3 lim x 3 x 2 9 x + 3

369.

lim x 0 ( 1 + x ) −2 1 x lim x 0 ( 1 + x ) −2 1 x

370.

lim x π / 2 cos x π 2 x lim x π / 2 cos x π 2 x

371.

lim x π x π sin x lim x π x π sin x

372.

lim x 1 x 1 sin x lim x 1 x 1 sin x

373.

lim x 0 ( 1 + x ) n 1 x lim x 0 ( 1 + x ) n 1 x

374.

lim x 0 ( 1 + x ) n 1 n x x 2 lim x 0 ( 1 + x ) n 1 n x x 2

375.

lim x 0 sin x tan x x 3 lim x 0 sin x tan x x 3

376.

lim x 0 1 + x 1 x x lim x 0 1 + x 1 x x

377.

lim x 0 e x x 1 x 2 lim x 0 e x x 1 x 2

378.

lim x 0 + tan x x lim x 0 + tan x x

379.

lim x 1 x 1 ln x lim x 1 x 1 ln x

380.

lim x 0 ( x + 1 ) 1 / x lim x 0 ( x + 1 ) 1 / x

381.

lim x 1 x x 3 x 1 lim x 1 x x 3 x 1

382.

lim x 0 + x 2 x lim x 0 + x 2 x

383.

lim x x sin ( 1 x ) lim x x sin ( 1 x )

384.

lim x 0 sin x x x 2 lim x 0 sin x x x 2

385.

lim x 0 + x ln ( x 4 ) lim x 0 + x ln ( x 4 )

386.

lim x ( x e x ) lim x ( x e x )

387.

lim x x 2 e x lim x x 2 e x

388.

lim x 0 3 x 2 x x lim x 0 3 x 2 x x

389.

lim x 0 1 + 1 / x 1 1 / x lim x 0 1 + 1 / x 1 1 / x

390.

lim x π / 4 ( 1 tan x ) cot x lim x π / 4 ( 1 tan x ) cot x

391.

lim x x e 1 / x lim x x e 1 / x

392.

lim x 0 + x 1 / cos x lim x 0 + x 1 / cos x

393.

lim x 0 + x 1 / x lim x 0 + x 1 / x

394.

lim x 0 - ( 1 1 x ) x lim x 0 - ( 1 1 x ) x

395.

lim x ( 1 1 x ) x lim x ( 1 1 x ) x

For the following exercises, use a calculator to graph the function and estimate the value of the limit, then use L’Hôpital’s rule to find the limit directly.

396.

[T] limx0ex1xlimx0ex1x

397.

[T] limx0xsin(1x)limx0xsin(1x)

398.

[T] limx1x11cos(πx)limx1x11cos(πx)

399.

[T] limx1e(x1)1x1limx1e(x1)1x1

400.

[T] limx1(x1)2lnxlimx1(x1)2lnx

401.

[T] limxπ1+cosxsinxlimxπ1+cosxsinx

402.

[T] limx0(cscx1x)limx0(cscx1x)

403.

[T] limx0+tan(xx)limx0+tan(xx)

404.

[T] limx0+lnxsinxlimx0+lnxsinx

405.

[T] limx0exexxlimx0exexx

Citation/Attribution

This book may not be used in the training of large language models or otherwise be ingested into large language models or generative AI offerings without OpenStax's permission.

Want to cite, share, or modify this book? This book uses the Creative Commons Attribution-NonCommercial-ShareAlike License and you must attribute OpenStax.

Attribution information
  • If you are redistributing all or part of this book in a print format, then you must include on every physical page the following attribution:
    Access for free at https://openstax.org/books/calculus-volume-1/pages/1-introduction
  • If you are redistributing all or part of this book in a digital format, then you must include on every digital page view the following attribution:
    Access for free at https://openstax.org/books/calculus-volume-1/pages/1-introduction
Citation information

© Jul 25, 2024 OpenStax. Textbook content produced by OpenStax is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike License . The OpenStax name, OpenStax logo, OpenStax book covers, OpenStax CNX name, and OpenStax CNX logo are not subject to the Creative Commons license and may not be reproduced without the prior and express written consent of Rice University.