Skip to main content

Section 8.4 L'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.

Consider the case where \(f(x) \to 0\) and \(g(x) \to 0\) and \(g(x) \ne 0\) as \(x \to a\text{.}\) If \(f\) or \(g\) is not continuous at \(x=a\text{,}\) consider the continuous extensions so that \(f(a)=0\) and \(g(a)=0\text{.}\) Similar to the proof of the Mean Value Theorem, define \(h(z) = f(z)-\frac{f(x)}{g(x)} \cdot g(z)\text{,}\) treating \(x\) as constant. Note that \(h(z)\) is differentiable and therefore continuous because \(f'(x)\) and \(g'(x)\) must both exist for the limit of the quotient to exist. In addition, \(h(a) = 0\) and \(h(x)=0\text{.}\)

Rolle's theorem implies that \(h'(z) = 0\) for some \(z\) between \(a\) and \(x\text{,}\)

\begin{equation*} h'(z) = f'(z) - \frac{f(x)}{g(x)} g'(z) = 0, \end{equation*}

so that

\begin{equation*} \frac{f'(z)}{g'(z)} = \frac{f(x)}{g(x)}. \end{equation*}

Because \(z\) is between \(a\) and \(x\text{,}\) as \(x \to a\) we must have \(z \to a\text{.}\)

\begin{equation*} \lim_{x \to a} \frac{f(x)}{g(x)} = \lim_{z \to a} \frac{f'(z)}{g'(z)}. \end{equation*}

It is essential that you verify that the hypotheses of L'Hôpital's rule apply before replacing the expressions with their derivatives. 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.

Example 8.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.


If 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.

Example 8.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.


Limits 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.

Example 8.4.4

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


The 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.

Example 8.4.5

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


When \(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*}
Example 8.4.6

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


We 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 4.5.22.

Example 8.4.7

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


The 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*}