##
Section8.4L'Hôpital's Rule

¶Limits involving combinations of continuous functions are generally computed by evaluating the values of the functions. Arithmetic involving infinity will follow elementary rules. Suppose \(L \gt 0\) is a positive number. Then when performing arithmetic, the following rules will hold.

\begin{gather*}
\infty \pm L = \infty \\
\infty + \infty = \infty \\
-\infty + -\infty = -\infty \\
L \cdot \infty = \infty \\
-L \cdot \infty = -\infty \\
\infty \cdot \infty = \infty \\
\infty \cdot -\infty = -\infty \\
-\infty \cdot -\infty = \infty
\end{gather*}
However, when calculations would result that attempt to cancel away an infinite quantity (or zero), the limit has an indeterminate form. That is, calculations involving any of the following arithmetic are in an indeterminate form,

\begin{equation*}
\frac{\infty}{\infty} \qquad \infty - \infty \qquad \frac{0}{0} \qquad 0 \cdot \infty.
\end{equation*}
The general strategy for evaluating indeterminate limits involves rewriting the limit in a different form, or finding another limit that is known to be equivalent.

L'Hôpital's rule is a theorem that allows us to rewrite a limit which has an indeterminate form \(\frac{0}{0}\) or \(\frac{\infty}{\infty}\) using derivatives.

######
Theorem8.4.1L'Hôpital's Rule

Suppose \(f(x)\) and \(g(x)\) are functions so that

\begin{equation*}
\lim_{x \to a} \frac{f(x)}{g(x)} \to \frac{0}{0} \quad \hbox{or} \quad \lim_{x \to a} \frac{f(x)}{g(x)} \to \frac{\infty}{\infty}.
\end{equation*}
If \(\displaystyle \lim_{x \to a} \frac{f'(x)}{g'(x)}\) exists, then

\begin{equation*}
\lim_{x \to a} \frac{f(x)}{g(x)} = \lim_{x \to a} \frac{f'(x)}{g'(x)}.
\end{equation*}
Consider the case where \(f(x) \to 0\) and \(g(x) \to 0\) as \(x \to a\) but \(f'(x) \to L\) and \(g'(x) \to M \ne 0\) as \(x \to 0\text{.}\) If the functions \(f\) and \(g\) are continuous, then we must have \(f(a)=0\) and \(g(a)=0\text{.}\) If not, the discontinuity is removable and we can modify \(f\) and \(g\) so that this is true without changing the limit. Since \(f'(x)\) and \(g'(x)\) both have limits, \(f\) and \(g\) must both be differentiable (and continuous) in a neighborhood of \(x=a\text{.}\)

The Mean Value Theorem implies that for each \(x\text{,}\) \(f(x) = f(x)-f(a) = f'(\xi)\cdot(x-a)\) for some value \(\xi\) between \(x\) and \(a\text{.}\) Similarly, \(g(x)=g(x)-g(a)=g'(\zeta)\cdot(x-a)\) for some \(\zeta\) between \(x\) and \(a\text{.}\) Then, the ratio becomes

\begin{equation*}
\frac{f(x)}{g(x)} = \frac{f'(\xi) \cdot (x-a)}{g'(\zeta)\cdot(x-a)} = \frac{f'(\xi)}{g'(\zeta)}.
\end{equation*}
Using the limits of \(f'(x) \to L\) and \(g'(x) \to M\text{,}\) we obtain

\begin{equation*}
\lim_{x \to a} \frac{f(x)}{g(x)} = \lim_{x \to a} \frac{f'(\xi)}{g'(\zeta)} = \frac{L}{M} = \lim_{x \to a} \frac{f'(x)}{g'(x)}
\end{equation*}
since \(M \ne 0\text{.}\)

A more general proof requires a more general statement of the mean value theorem. The problem with the current proof is that \(\xi\) and \(\zeta\) are unrelated. The more general mean value theorem, called Cauchy's Mean Value Theorem, allows us to choose a single point \(\xi\) between \(x\) and \(a\) where

\begin{equation*}
\frac{f(x)-f(a)}{g(x)-g(a)} = \frac{f'(\xi)}{g'(\xi)}.
\end{equation*}
Then the limit follows.

It is essential that you verify that the hypotheses of L'Hôpital's rule apply before replacing the derivative. Limits and derivatives are not the same. Computing a limit does not always mean we are computing a derivative.

In addition, make note that changing the limit using L'Hôpital's rule is not computing the derivative of a quotient. It is replacing the limit of a quotient with the limit of a new quotient involving two derivatives.

Our first few examples will illustrate that L'Hôpital's rule gives the same result as methods we learned earlier involving factoring.

######
Example8.4.2

Evaluate the limit \(\displaystyle \lim_{x \to 2} \frac{x^2-3x+2}{x^2+x-6}\) using factoring and using L'Hôpital's rule.

SolutionIf we try to use the value directly, we find an indeterminate form,

\begin{equation*}
\lim_{x \to 2} \frac{x^2-3x+2}{x^2+x-6} \to \frac{2^2-3(2)+2}{2^2+2-6} = \frac{0}{0}.
\end{equation*}
We must find alternative representations of this limit to determine its value.

Using factoring, we rewrite the limit by canceling common factors.

\begin{align*}
\lim_{x \to 2} \frac{x^2-3x+2}{x^2+x-6} &= \lim_{x \to 2} \frac{(x-2)(x-1)}{(x+3)(x-2)} \\
&= \lim_{x \to 2} \frac{x-1}{x+3} = \frac{2-1}{2+3} = \frac{1}{5}
\end{align*}
Because the original limit had indeterminate form \(\frac{0}{0}\text{,}\) L'Hôpital's rule will apply with \(f(x)=x^2-3x+2\) and \(g(x)=x^2+x-6\text{.}\) We replace the limit of \(f(x)/g(x)\) with the limit of \(f'(x)/g'(x)\text{,}\) assuming that limit exists.

\begin{equation*}
\lim_{x \to 2} \frac{x^2-3x+2}{x^2+x-6} = \lim_{x \to 2} \frac{2x-3}{2x+1} = \frac{2(2)-3}{2(2)+1} = \frac{1}{5}
\end{equation*}
We see that both approaches give the same limit, exactly as predicted by L'Hôpital's rule.

Sometimes, we need to apply L'Hôpital's rule more than once when the modified limit is still in indeterminate form.

######
Example8.4.3

Evaluate the limit \(\displaystyle \lim_{x \to \infty} \frac{2x^2+x-3}{x^2-x-5}\) using factoring and using L'Hôpital's rule.

SolutionLimits at infinity generally require factoring out the fastest growing terms.

\begin{equation*}
\lim_{x \to \infty} \frac{2x^2+x-3}{x^2-x-5} = \lim_{x \to \infty} \frac{x^2(2+\frac{1}{x}-\frac{3}{x^2})}{x^2(1-\frac{1}{x}-\frac{5}{x^2})}
\end{equation*}
In this form, we see that the limit has form \(\frac{\infty}{\infty}\text{.}\) By canceling the common factor \(x^2\text{,}\) we find

\begin{equation*}
\lim_{x \to \infty} \frac{2x^2+x-3}{x^2-x-5} = \lim_{x \to \infty} \frac{2+\frac{1}{x}-\frac{3}{x^2}}{1-\frac{1}{x}-\frac{5}{x^2}} = \frac{2+0-0}{1-0-0} = 2.
\end{equation*}
Because the limit had form \(\frac{\infty}{\infty}\text{,}\) we can use L'Hôpital's rule to rewrite the limit in a new form,

\begin{equation*}
\lim_{x \to \infty} \frac{2x^2+x-3}{x^2-x-5} = \lim_{x \to \infty} \frac{4x+1}{2x-1}.
\end{equation*}
This limit is still of form \(\frac{\infty}{\infty}\text{,}\) so we can use L'Hôpital's rule again to get yet another equivalent form,

\begin{equation*}
\lim_{x \to \infty} \frac{2x^2+x-3}{x^2-x-5} = \lim_{x \to \infty} \frac{4}{2} = 2.
\end{equation*}
Again, either approach will give the same value.

One of the advantages of L'Hôpital's rule is that it allows us to evaluate limits where factoring does not help.

######
Example8.4.4

Compute \(\displaystyle \lim_{x \to 3} \frac{2^x-8}{x^2+x-12}\text{.}\)

SolutionThe first step is always to try evaluating directly.

\begin{equation*}
\lim_{x \to 3} \frac{2^x-8}{x^2+x-12} \to \frac{2^3-8}{3^2+3-12} = \frac{0}{0}
\end{equation*}
The limit has indeterminate form \(\frac{0}{0}\) so that we can use L'Hôpital's rule. In this case, note that the numerator \(2^x-8\) does not factor. L'Hôpital's rule is the preferred approach.

A typical solution would be written as follows.

\begin{align*}
\lim_{x \to 3} &\frac{2^x-8}{x^2+x-12} \to \frac{2^3-8}{3^2+3-12} = \frac{0}{0} \\
&\overset{\hbox{L'H}}{=} \lim_{x \to 3} \frac{2^x \ln(2)}{2x+1} = \frac{2^3 \ln(2)}{2(3)+1} = \frac{8 \ln(2)}{7}
\end{align*}
The first line shows that the original limit is an indeterminate form. Writing “L'H” over the equal sign shows that we are using L'Hôpital's rule to replace the original limit with the modified limit involving derivatives. Also, we used the derivative of an exponential, \(\frac{d}{dx}[b^x] = b^x \ln(b)\text{.}\)

Indeterminate limits that are not fractions of the form \(\frac{0}{0}\) or \(\frac{\infty}{\infty}\) do not directly apply L'Hôpital's rule. You must first use algebra to rewrite them in a way that they do have the appropriate form.

######
Example8.4.5

Evaluate \(\displaystyle \lim_{x \to 0^+} x \ln(x)\text{.}\)

SolutionWhen \(x \to 0^+\text{,}\) we have \(ln(x) \to -\infty\text{.}\) As written, the limit has the indeterminate form \(\displaystyle \lim_{x \to 0^+} x \ln(x) \to 0 \cdot -\infty\text{.}\) This is indeterminate because multiplying \(\infty\) by zero would be a form of trying to cancel the infinite. Instead, we need to rewrite the formula so that it is a fraction.

There are two approaches:

\begin{equation*}
x \ln(x) = \frac{\ln(x)}{x^{-1}} = \frac{x}{(\ln(x))^{-1}}.
\end{equation*}
When choosing which approach will be better, you should ask yourself which formula will lead to simpler derivatives. For this problem, we use the first expression, knowing that \(x^{-1} \to +\infty\) as \(x \to 0^+\text{.}\)

\begin{align*}
\lim_{x \to 0^+} x \ln(x) &= \lim_{x \to 0^+} \frac{\ln(x)}{x^{-1}} \to \frac{-\infty}{\infty} \\
& \overset{\hbox{L'H}}{=} \lim_{x \to 0^+} \frac{x^{-1}}{-1x^{-2}} = \lim_{x \to 0^+} \frac{x^{-1} x^2}{-x^{-2}x^2}\\
&= \lim_{x \to 0^+} -x = 0.
\end{align*}
######
Example8.4.6

Evaluate \(\displaystyle \lim_{x \to \infty} x^2e^{-3x}\text{.}\)

SolutionWe know limit values for the exponential: \(e^{\infty} = \infty\) and \(e^{-\infty}=0\text{.}\) The given limit will be an indeterminate form \(\infty \cdot 0\text{.}\) So we rewrite it in quotient form and then use L'Hôpital's rule.

\begin{align*}
\lim_{x \to \infty} x^2e^{-3x} &= \lim_{x \to \infty} \frac{x^2}{e^{3x}} \to \frac{\infty}{\infty} \\
& \overset{\hbox{L'H}}{=} \lim_{x \to \infty} \frac{2x}{3e^{3x}} \to \frac{\infty}{\infty} \\
& \overset{\hbox{L'H}}{=} \lim_{x \to \infty} \frac{2}{9e^{3x}} \to \frac{2}{\infty} = 0
\end{align*}
Notice that we used L'Hôpital's rule twice when the first time resulted in another indeterminate form.

We end with an example involving powers. When both the base and the exponent are variable, we must interpret a power in terms of composition with the exponential function,

\begin{equation*}
u^v = \exp( \ln(u^v)) = \exp(v \ln(u)) = e^{v \ln(u)}.
\end{equation*}
Because the natural exponential function is continuous, we only need to evaluate the limit of \(v \ln(u)\) and then evaluate the exponential function at the corresponding limit. This is a consequence of Theorem Theorem 5.3.21.

######
Example8.4.7

Evaluate \(\displaystyle \lim_{x \to \infty} (1 + \frac{r}{x})^{xt}\text{,}\) where \(r\) and \(t\) are constant values.

SolutionThe function for which we compute a limit can be rewritten as a composition with the natural exponential function:

\begin{align*}
f(x) &= (1+\frac{r}{x})^{xt} \\
&= \exp\big(\ln\big( ({\textstyle 1+rx^{-1}})^{xt} \big)\big) \\
&= \exp\big(xt \ln(1+rx^{-1})\big).
\end{align*}
So we start by evaluating the limit of the expression inside the exponential.

\begin{equation*}
\lim_{x \to \infty} xt \ln(1+rx^{-1}) \to \infty \cdot \ln(1+0) = \infty \cdot 0
\end{equation*}
This limit has an indeterminate form.

We rewrite the indeterminate limit as a fraction so that we can use L'Hôpital's rule. From our earlier experience, we will leave the logarithm in the numerator.

\begin{align*}
\lim_{x \to \infty} xt \ln(1+rx^{-1}) &= \lim_{x \to \infty} \frac{t \ln({\textstyle 1+rx^{-1}})}{x^{-1}} \to \frac{t \cdot \ln(1)}{0} = \frac{0}{0} \\
&\overset{\hbox{L'H}}{=} \lim_{x \to \infty} \frac{t \cdot \frac{1}{1+rx^{-1}} \cdot \frac{d}{dx}[1+rx^{-1}]}{-x^{-2}} \\
&= \lim_{x \to \infty} \frac{t \cdot \frac{1}{1+rx^{-1}} \cdot (-rx^{-2})}{-x^{-2}} \\
&= \lim_{x \to \infty} t \cdot \frac{1}{1+rx^{-1}} \cdot (r) \to t \cdot \frac{1}{1+0} \cdot r = rt
\end{align*}
Using the Limit of a Continuous Composition, we conclude

\begin{align*}
\lim_{x \to \infty} \exp\big(xt \ln(1+rx^{-1})\big) &= \exp\big( \lim_{x \to \infty} xt \ln(1+rx^{-1})\big) \\
&= \exp(rt) = e^{rt}.
\end{align*}