# 7.5 L’Hôpital’s Rule

This section is concerned with a technique for evaluating certain limits that will be useful in later chapters.

Our treatment of limits exposed us to “0/0”, an indeterminate form. If both $\displaystyle\lim_{x\to c}f(x)$ and $\displaystyle\lim_{x\to c}g(x)$ are zero, we do not conclude that $\displaystyle\lim_{x\to c}f(x)/g(x)$ is $0/0$; rather, we use $0/0$ as notation to describe the fact that both the numerator and denominator approach 0. The expression 0/0 has no numeric value; other work must be done to evaluate the limit.

Other indeterminate forms exist; they are: $\infty/\infty$, $0\cdot\infty$, $\infty-\infty$, $0^{0}$, $1^{\infty}$ and $\infty^{0}$. Just as “0/0” does not mean “divide 0 by 0,” the expression “$\infty/\infty$” does not mean “divide infinity by infinity.” Instead, it means “a quantity is growing without bound and is being divided by another quantity that is growing without bound.” We cannot determine from such a statement what value, if any, results in the limit. Likewise, “$0\cdot\infty$” does not mean “multiply zero by infinity.” Instead, it means “one quantity is shrinking to zero, and is being multiplied by a quantity that is growing without bound.” We cannot determine from such a description what the result of such a limit will be.

This section introduces L’Hôpital’s Rule, a method of resolving limits that produce the indeterminate forms 0/0 and $\infty/\infty$. We’ll also show how algebraic manipulation can be used to convert other indeterminate expressions into one of these two forms so that our new rule can be applied.

###### Theorem 7.5.1 L’Hôpital’s Rule, Part 1

Let $f$ and $g$ be differentiable functions on an open interval $I$ containing $a$.

1. (a)

If $\displaystyle\lim_{x\to a}f(x)=0$, $\displaystyle\lim_{x\to a}g(x)=0$, and $g\mkern 1.35mu ^{\prime}(x)\neq 0$ except possibly at $x=a$, then

 $\lim_{x\to a}\frac{f(x)}{g(x)}=\lim_{x\to a}\frac{f\,^{\prime}(x)}{g\mkern 1.3% 5mu ^{\prime}(x)},$

assuming that the limit on the right exists.

2. (b)

If $\displaystyle\lim_{x\to a}f(x)=\pm\infty$ and $\displaystyle\lim_{x\to a}g(x)=\pm\infty$, then

 $\lim_{x\to a}\frac{f(x)}{g(x)}=\lim_{x\to a}\frac{f\,^{\prime}(x)}{g\mkern 1.3% 5mu ^{\prime}(x)},$

assuming that the limit on the right exists.

A similar statement holds if we just look at the one sided limits $\displaystyle\lim_{x\to a^{-}}$ and $\displaystyle\lim_{x\to a^{+}}$.

###### Theorem 7.5.2 L’Hôpital’s Rule, Part 2

Let $f$ and $g$ be differentiable functions on the open interval $(c,\infty)$ for some value $c$ and $g\mkern 1.35mu ^{\prime}(x)\neq 0$ on $(c,\infty)$.

1. (a)

If $\displaystyle\lim_{x\to\infty}f(x)=0$ and $\displaystyle\lim_{x\to\infty}g(x)=0$, then

 $\lim_{x\to\infty}\frac{f(x)}{g(x)}=\lim_{x\to\infty}\frac{f\,^{\prime}(x)}{g% \mkern 1.35mu ^{\prime}(x)},$

assuming that the limit on the right exists.

2. (b)

If $\displaystyle\lim_{x\to\infty}f(x)=\pm\infty$ and $\displaystyle\lim_{x\to\infty}g(x)=\pm\infty$, then

 $\lim_{x\to\infty}\frac{f(x)}{g(x)}=\lim_{x\to\infty}\frac{f\,^{\prime}(x)}{g% \mkern 1.35mu ^{\prime}(x)},$

assuming that the limit on the right exists.

Similar statements can be made where $x$ approaches $-\infty$.

We demonstrate the use of L’Hôpital’s Rule in the following examples; we will often use “LHR” as an abbreviation of “L’Hôpital’s Rule.”

###### Example 7.5.1 Using L’Hôpital’s Rule

Evaluate the following limits, using L’Hôpital’s Rule as needed.
(a) $\displaystyle\lim_{x\to 0}\frac{\sin x}{x}$ (b) $\displaystyle\lim_{x\to 1}\frac{\sqrt{x+3}-2}{1-x}$ (c) $\displaystyle\lim_{x\to 0}\frac{x^{2}}{1-\cos x}$ (d) $\displaystyle\lim_{x\to-3}\frac{x^{3}+27}{x^{2}+9}$ (e) $\displaystyle\lim_{x\to\infty}\frac{3x^{2}-100x+2}{4x^{2}+5x-1000}$ (f) $\displaystyle\lim_{x\to\infty}\frac{e^{x}}{x^{3}}$

Solution

1. (a)

This has the indeterminate form $0/0$. We proved this limit is 1 in Example 1.3.4 using the Squeeze Theorem. Here we use L’Hôpital’s Rule to show its power.

 $\lim_{x\to 0}\frac{\sin x}{x}\mathrel{\overset{\text{by LHR}}{=}}\lim_{x\to 0}% \frac{\cos x}{1}=1.$

While this seems easier than using the Squeeze Theorem to find this limit, we note that applying L’Hôpital’s Rule here requires us to know the derivative of $\sin x$. We originally encountered this limit when we were trying to find that derivative.

2. (b)

This has the indeterminate form $0/0$.

 $\lim_{x\to 1}\frac{\sqrt{x+3}-2}{1-x}\mathrel{\overset{\text{by LHR}}{=}}\lim_% {x\to 1}\frac{\frac{1}{2}(x+3)^{-1/2}}{-1}=-\frac{1}{4}.$
3. (c)

This has the indeterminate form $0/0$.

 $\lim_{x\to 0}\frac{x^{2}}{1-\cos x}\mathrel{\overset{\text{by LHR}}{=}}\lim_{x% \to 0}\frac{2x}{\sin x}.$

This latter limit also evaluates to the $0/0$ indeterminate form. To evaluate it, we apply L’Hôpital’s Rule again.

 $\lim_{x\to 0}\frac{2x}{\sin x}\mathrel{\overset{\text{by LHR}}{=}}\frac{2}{% \cos x}=2.$

Thus $\displaystyle\lim_{x\to 0}\frac{x^{2}}{1-\cos x}=2.$

4. (d)

$\displaystyle\lim_{x\to-3}\frac{x^{3}+27}{x^{2}+9}=\frac{0}{18}=0$
We cannot use L’Hôpital’s Rule in this case because the original limit does not return an indeterminate form, so L’Hôpital’s Rule does not apply. In fact, the inappropriate use of L’Hôpital’s Rule here would result in the incorrect limit $-\frac{9}{2}$.

5. (e)

We can evaluate this limit already using Key Idea 1.5.2; the answer is 3/4. We apply L’Hôpital’s Rule to demonstrate its applicability.

 $\lim_{x\to\infty}\frac{3x^{2}-100x+2}{4x^{2}+5x-1000}\mathrel{\overset{\text{% by LHR}}{=}}\lim_{x\to\infty}\frac{6x-100}{8x+5}\mathrel{\overset{\text{by LHR% }}{=}}\lim_{x\to\infty}\frac{6}{8}=\frac{3}{4}.$
6. (f)

$\displaystyle\lim_{x\to\infty}\frac{e^{x}}{x^{3}}\mathrel{\overset{\text{by % LHR}}{=}}\lim_{x\to\infty}\frac{e^{x}}{3x^{2}}\mathrel{\overset{\text{by LHR}}% {=}}\lim_{x\to\infty}\frac{e^{x}}{6x}\mathrel{\overset{\text{by LHR}}{=}}\lim_% {x\to\infty}\frac{e^{x}}{6}=\infty.$

Recall that this means that the limit does not exist; as $x$ approaches $\infty$, the expression $e^{x}/x^{3}$ grows without bound. We can infer from this that $e^{x}$ grows “faster” than $x^{3}$; as $x$ gets large, $e^{x}$ is far larger than $x^{3}$. (This has important implications in computing when considering efficiency of algorithms.)

## Indeterminate Forms $0\cdot\infty$ and $\infty-\infty$

L’Hôpital’s Rule can only be applied to ratios of functions. When faced with an indeterminate form such as $0\cdot\infty$ or $\infty-\infty$, we can sometimes apply algebra to rewrite the limit so that L’Hôpital’s Rule can be applied. We demonstrate the general idea in the next example.

###### Example 7.5.2 Applying L’Hôpital’s Rule to other indeterminate forms

Evaluate the following limits.
(a) $\displaystyle\lim_{x\to 0^{+}}x\cdot e^{1/x}$ (b) $\displaystyle\lim_{x\to 0^{-}}x\cdot e^{1/x}$ (c) $\displaystyle\lim_{x\to\infty}\left(\ln(x+1)-\ln x\right)$ (d) $\displaystyle\lim_{x\to\infty}\left(x^{2}-e^{x}\right)$

Solution

1. (a)

As $x\to 0^{+}$, note that $x\to 0$ and $e^{1/x}\to\infty$. Thus we have the indeterminate form $0\cdot\infty$. We rewrite the expression $x\cdot e^{1/x}$ as $\displaystyle\frac{e^{1/x}}{1/x}$; now, as $x\to 0^{+}$, we get the indeterminate form $\infty/\infty$ to which L’Hôpital’s Rule can be applied.

 $\lim_{x\to 0^{+}}x\cdot e^{1/x}=\lim_{x\to 0^{+}}\frac{e^{1/x}}{1/x}\mathrel{% \overset{\text{by LHR}}{=}}\lim_{x\to 0^{+}}\frac{(-1/x^{2})e^{1/x}}{-1/x^{2}}% =\lim_{x\to 0^{+}}e^{1/x}=\infty.$

Interpretation: $e^{1/x}$ grows “faster” than $x$ shrinks to zero, meaning their product grows without bound.

2. (b)

As $x\to 0^{-}$, note that $x\to 0$ and $e^{1/x}\to e^{-\infty}\to 0$. The the limit evaluates to $0\cdot 0$ which is not an indeterminate form. We conclude then that

 $\lim_{x\to 0^{-}}x\cdot e^{1/x}=0.$
3. (c)

This limit initially evaluates to the indeterminate form $\infty-\infty$. By applying a logarithmic rule, we can rewrite the limit as

 $\lim_{x\to\infty}\left(\ln(x+1)-\ln x\right)=\lim_{x\to\infty}\ln\left(\frac{x% +1}{x}\right).$

As $x\to\infty$, the argument of the natural logarithm approaches $\infty/\infty$, to which we can apply L’Hôpital’s Rule.

 $\lim_{x\to\infty}\frac{x+1}{x}\mathrel{\overset{\text{by LHR}}{=}}\lim_{x\to% \infty}\frac{1}{1}=1.$

Since $x\to\infty$ implies $\displaystyle\frac{x+1}{x}\to 1$, it follows that

 $x\to\infty\quad\text{ implies }\quad\ln\left(\frac{x+1}{x}\right)\to\ln 1=0.$

Thus

 $\lim_{x\to\infty}\left(\ln(x+1)-\ln x\right)=\lim_{x\to\infty}\ln\left(\frac{x% +1}{x}\right)=0.$

Interpretation: since this limit evaluates to 0, it means that for large $x$, there is essentially no difference between $\ln(x+1)$ and $\ln x$; their difference is essentially 0.

4. (d)

The limit $\displaystyle\lim_{x\to\infty}\left(x^{2}-e^{x}\right)$ initially returns the indeterminate form $\infty-\infty$. We can rewrite the expression by factoring out $x^{2}$; $\displaystyle x^{2}-e^{x}=x^{2}\left(1-\frac{e^{x}}{x^{2}}\right).$ We need to evaluate how $e^{x}/x^{2}$ behaves as $x\to\infty$:

 $\lim_{x\to\infty}\frac{e^{x}}{x^{2}}\mathrel{\overset{\text{by LHR}}{=}}\lim_{% x\to\infty}\frac{e^{x}}{2x}\mathrel{\overset{\text{by LHR}}{=}}\lim_{x\to% \infty}\frac{e^{x}}{2}=\infty.$

Thus $\lim_{x\to\infty}x^{2}(1-e^{x}/x^{2})$ evaluates to $\infty\cdot(-\infty)$, which is not an indeterminate form; rather, $\infty\cdot(-\infty)$ evaluates to $-\infty$. We conclude that $\displaystyle\lim_{x\to\infty}\left(x^{2}-e^{x}\right)=-\infty.$

Interpretation: as $x$ gets large, the difference between $x^{2}$ and $e^{x}$ grows very large.

## Indeterminate Forms  $0^{0}$, $1^{\infty}$, and $\infty^{0}$

When faced with a limit that returns one of the indeterminate forms $0^{0}$, $1^{\infty}$, or $\infty^{0}$, it is often useful to use the natural logarithm to convert to an indeterminate form we already know how to find the limit of, then use the natural exponential function find the original limit. This is possible because the natural logarithm and natural exponential functions are inverses and because they are both continuous. The following Key Idea expresses the concept, which is followed by an example that demonstrates its use.

###### Key Idea 7.5.1 Evaluating Limits Involving Indeterminate Forms $0^{0}$, $1^{\infty}$ and $\infty^{0}$

If $\displaystyle\lim_{x\to c}\ln\bigl{(}f(x)\bigr{)}=L$, then $\displaystyle\lim_{x\to c}f(x)=\lim_{x\to c}e^{\ln(f(x))}=e\,^{L}.$

###### Example 7.5.3 Using L’Hôpital’s Rule with indeterminate forms involving exponents

Evaluate the following limits.

 $\text{1.}\quad\lim_{x\to\infty}\left(1+\frac{1}{x}\right)^{x}\qquad\qquad\text% {2.}\quad\lim_{x\to 0^{+}}x^{x}.$

Solution

1. (a)

This is equivalent to a special limit given in Theorem 1.3.6; these limits have important applications in mathematics and finance. Note that the exponent approaches $\infty$ while the base approaches 1, leading to the indeterminate form $1^{\infty}$. Let $f(x)=(1+1/x)^{x}$; the problem asks to evaluate $\displaystyle\lim_{x\to\infty}f(x)$. Let’s first evaluate $\displaystyle\lim_{x\to\infty}\ln\bigl{(}f(x)\bigr{)}$.

 $\displaystyle\lim_{x\to\infty}\ln\bigl{(}f(x)\bigr{)}$ $\displaystyle=\lim_{x\to\infty}\ln\left(1+\frac{1}{x}\right)^{x}$ $\displaystyle=\lim_{x\to\infty}x\ln\left(1+\frac{1}{x}\right)$ $\displaystyle=\lim_{x\to\infty}\frac{\ln\left(1+\frac{1}{x}\right)}{1/x}$ This produces the indeterminate form 0/0, so we apply L’Hôpital’s Rule. $\displaystyle=\lim_{x\to\infty}\frac{\frac{1}{1+1/x}\cdot(-1/x^{2})}{(-1/x^{2})}$ $\displaystyle=\lim_{x\to\infty}\frac{1}{1+1/x}$ $\displaystyle=1.$

Thus $\displaystyle\lim_{x\to\infty}\ln\bigl{(}f(x)\bigr{)}=1.$ We return to the original limit and apply Key Idea 7.5.1.

 $\lim_{x\to\infty}\left(1+\frac{1}{x}\right)^{x}=\lim_{x\to\infty}f(x)=\lim_{x% \to\infty}e^{\ln(f(x))}=e^{1}=e.$

This is another way to determine the value of the number $e$.

2. (b)

This limit leads to the indeterminate form $0^{0}$. Let $f(x)=x^{x}$ and consider first $\displaystyle\lim_{x\to 0^{+}}\ln\bigl{(}f(x)\bigr{)}$. margin: Figure 7.5.1: A graph of $f(x)=x^{x}$ supporting the fact that as $x\to 0^{+}$, $f(x)\to 1$. Λ

 $\displaystyle\lim_{x\to 0^{+}}\ln\bigl{(}f(x)\bigr{)}$ $\displaystyle=\lim_{x\to 0^{+}}\ln\left(x^{x}\right)$ $\displaystyle=\lim_{x\to 0^{+}}x\ln x$ This produces the indeterminate form $0(-\infty)$, so we rewrite it in order to apply L’Hôpital’s Rule. $\displaystyle=\lim_{x\to 0^{+}}\frac{\ln x}{1/x}.$ This produces the indeterminate form $-\infty/\infty$ so we apply L’Hôpital’s Rule. $\displaystyle=\lim_{x\to 0^{+}}\frac{1/x}{-1/x^{2}}$ $\displaystyle=\lim_{x\to 0^{+}}-x$ $\displaystyle=0.$

Thus $\displaystyle\lim_{x\to 0^{+}}\ln\bigl{(}f(x)\bigr{)}=0$. We return to the original limit and apply Key Idea 7.5.1.

 $\lim_{x\to 0^{+}}x^{x}=\lim_{x\to 0^{+}}f(x)=\lim_{x\to 0^{+}}e^{\ln(f(x))}=e^% {0}=1.$

This result is supported by the graph of $f(x)=x^{x}$ given in Figure 7.5.1.

## Exercises 7.5

### Terms and Concepts

1. 1.

List the different indeterminate forms described in this section.

2. 2.

T/F: L’Hôpital’s Rule provides a faster method of computing derivatives.

3. 3.

T/F: L’Hôpital’s Rule states that $\displaystyle\frac{\operatorname{d}\!}{\operatorname{d}\!x}\left[\frac{f(x)}{g% (x)}\right]=\frac{f\,^{\prime}(x)}{g^{\prime}(x)}.$

4. 4.

Explain what the indeterminate form “$1^{\infty}$” means.

5. 5.

Fill in the blanks: The Quotient Rule is applied to $\displaystyle\frac{f(x)}{g(x)}$ when taking             ; L’Hôpital’s Rule is applied when taking certain             .

6. 6.

Create (but do not evaluate!) a limit that returns “$\infty^{0}$”.

7. 7.

Create a function $f(x)$ such that $\displaystyle\lim_{x\to 1}f(x)$ returns “$0^{0}$”.

8. 8.

Create a function $f(x)$ such that $\displaystyle\lim_{x\to\infty}f(x)$ returns “$0\cdot\infty$”.

### Problems

In Exercises 9–54., evaluate the given limit.

1. 9.

$\displaystyle\lim_{x\to 1}\frac{x^{2}+x-2}{x-1}$

2. 10.

$\displaystyle\lim_{x\to 2}\frac{x^{2}+x-6}{x^{2}-7x+10}$

3. 11.

$\displaystyle\lim_{x\to\pi}\frac{\sin x}{x-\pi}$

4. 12.

$\displaystyle\lim_{x\to\pi/4}\frac{\sin x-\cos x}{\cos(2x)}$

5. 13.

$\displaystyle\lim_{x\to 0}\frac{\sin(5x)}{x}$

6. 14.

$\displaystyle\lim_{x\to 0}\frac{\sin(2x)}{x+2}$

7. 15.

$\displaystyle\lim_{x\to 0}\frac{\sin(ax)}{\sin(bx)}$

8. 16.

$\displaystyle\lim_{x\to 0^{+}}\frac{e^{x}-1}{x^{2}}$

9. 17.

$\displaystyle\lim_{x\to 0^{+}}\frac{e^{x}-x-1}{x^{2}}$

10. 18.

$\displaystyle\lim_{x\to 0^{+}}\frac{x-\sin x}{x^{3}-x^{2}}$

11. 19.

$\displaystyle\lim_{x\to\infty}\frac{x^{4}}{e^{x}}$

12. 20.

$\displaystyle\lim_{x\to\infty}\frac{\sqrt{x}}{e^{x}}$

13. 21.

$\displaystyle\lim_{x\to\infty}\frac{e^{x}}{\sqrt{x}}$

14. 22.

$\displaystyle\lim_{x\to\infty}\frac{e^{x}}{2^{x}}$

15. 23.

$\displaystyle\lim_{x\to\infty}\frac{e^{x}}{3^{x}}$

16. 24.

$\displaystyle\lim_{x\to 3}\frac{x^{3}-5x^{2}+3x+9}{x^{3}-7x^{2}+15x-9}$

17. 25.

$\displaystyle\lim_{x\to-2}\frac{x^{3}+4x^{2}+4x}{x^{3}+7x^{2}+16x+12}$

18. 26.

$\displaystyle\lim_{x\to\infty}\frac{\ln x}{x}$

19. 27.

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

20. 28.

$\displaystyle\lim_{x\to\infty}\frac{\Big{(}\ln x\Big{)}^{2}}{x}$

21. 29.

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

22. 30.

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

23. 31.

$\displaystyle\lim_{x\to 0^{+}}xe^{1/x}$

24. 32.

$\displaystyle\lim_{x\to\infty}\left(x^{3}-x^{2}\right)$

25. 33.

$\displaystyle\lim_{x\to\infty}\left(\sqrt{x}-\ln x\right)$

26. 34.

$\displaystyle\lim_{x\to-\infty}xe^{x}$

27. 35.

$\displaystyle\lim_{x\to 0^{+}}\frac{1}{x^{2}}e^{-1/x}$

28. 36.

$\displaystyle\lim_{x\to 0^{+}}(1+x)^{1/x}$

29. 37.

$\displaystyle\lim_{x\to 0^{+}}(2x)^{x}$

30. 38.

$\displaystyle\lim_{x\to 0^{+}}(2/x)^{x}$

31. 39.

$\displaystyle\lim_{x\to 0^{+}}(\sin x)^{x}$

32. 40.

$\displaystyle\lim_{x\to 1^{-}}(1-x)^{1-x}$

33. 41.

$\displaystyle\lim_{x\to\infty}(x)^{1/x}$

34. 42.

$\displaystyle\lim_{x\to\infty}(1/x)^{x}$

35. 43.

$\displaystyle\lim_{x\to 1^{+}}(\ln x)^{1-x}$

36. 44.

$\displaystyle\lim_{x\to\infty}(1+x)^{1/x}$

37. 45.

$\displaystyle\lim_{x\to\infty}(1+x^{2})^{1/x}$

38. 46.

$\displaystyle\lim_{x\to\pi/2}\tan x\cos x$

39. 47.

$\displaystyle\lim_{x\to\pi/2}\tan x\sin(2x)$

40. 48.

$\displaystyle\lim_{x\to 1^{+}}\left(\frac{1}{\ln x}-\frac{1}{x-1}\right)$

41. 49.

$\displaystyle\lim_{x\to 3^{+}}\left(\frac{5}{x^{2}-9}-\frac{x}{x-3}\right)$

42. 50.

$\displaystyle\lim_{x\to\infty}x\tan(1/x)$

43. 51.

$\displaystyle\lim_{x\to\infty}\frac{(\ln x)^{3}}{x}$

44. 52.

$\displaystyle\lim_{x\to 1}\frac{x^{2}+x-2}{\ln x}$

45. 53.

$\displaystyle\lim_{x\to 0^{+}}\left(\frac{2+5^{x}}{3}\right)^{1/x}$

46. 54.

$\displaystyle\lim_{x\to\infty}\left(\frac{1+7^{1/x}}{2}\right)^{x}$

1. 55.

Following the guidelines in Section 3.5, and using L’Hôpital’s rule where appropriate, neatly sketch the graph of $f(x)=\frac{\ln(x)}{\ln(2x)}$. Check your answer using a graphing utility (and be careful near 0).