Skip to main content
Logo image

APEX Calculus

Section 6.7 L’Hospital’s Rule

While this chapter is devoted to learning techniques of integration, this section is not about integration. Rather, it is concerned with a technique of evaluating certain limits that will be useful in the following section, where integration is once more discussed.
Our treatment of limits exposed us to the notion of “0/0”, an indeterminate form. If \(\lim\limits_{x\to c}f(x)=0\) and \(\lim\limits_{x\to c} g(x) =0\text{,}\) we do not conclude that \(\lim\limits_{x\to c} f(x)/g(x)\) is \(0/0\text{;}\) 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\text{,}\) \(0\cdot\infty\text{,}\) \(\infty-\infty\text{,}\) \(0^0\text{,}\) \(1^\infty\) and \(\infty^0\text{.}\) 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.
Figure 6.7.1. Video introduction to Section 6.7
This section introduces l’Hospital’s Rule, a method of resolving limits that produce the indeterminate forms 0/0 and \(\infty/\infty\text{.}\) 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.

Subsection 6.7.1 L’Hospital’s Rule with indeterminate forms \(0/0\) and \(\infty/\infty\)

We demonstrate the use of l’Hospital’s Rule in the following examples; we will often use “LHR” as an abbreviation of “l’Hospital’s Rule.”

Example 6.7.3. Using l’Hospital’s Rule.

Evaluate the following limits, using l’Hospital’s Rule as needed.
  1. \(\displaystyle \lim\limits_{x\to0}\frac{\sin(x) }x\)
  2. \(\displaystyle \lim\limits_{x\to 1}\frac{\sqrt{x+3}-2}{1-x}\)
  3. \(\displaystyle \lim\limits_{x\to0}\frac{x^2}{1-\cos(x) }\)
  4. \(\displaystyle \lim\limits_{x\to 2}\frac{x^2+x-6}{x^2-3x+2}\)
Solution 1. Video solution
Solution 2.
  1. We proved this limit is 1 in Example 1.3.13 using the Squeeze Theorem. Here we use l’Hospital’s Rule to show its power.
    \begin{equation*} \lim_{x\to0}\frac{\sin(x) }x \stackrel{\,\text{ by LHR } \,}{=} \lim_{x\to0} \frac{\cos(x) }{1}=1\text{.} \end{equation*}
  2. \begin{equation*} \lim\limits_{x\to 1}\frac{\sqrt{x+3}-2}{1-x} \stackrel{\,\text{ by LHR } \,}{=} \lim_{x \to 1} \frac{\frac12(x+3)^{-1/2}}{-1} =-\frac 14\text{.} \end{equation*}
  3. \begin{equation*} \lim\limits_{x\to 0}\frac{x^2}{1-\cos(x) } \stackrel{\,\text{ by LHR } \,}{=} \lim_{x\to 0} \frac{2x}{\sin(x) }\text{.} \end{equation*}
    This latter limit also evaluates to the 0/0 indeterminate form. To evaluate it, we apply l’Hospital’s Rule again.
    \begin{equation*} \lim\limits_{x\to 0} \frac{2x}{\sin(x) } \stackrel{\,\text{ by LHR } \,}{=} \frac{2}{\cos(x) } = 2\text{.} \end{equation*}
    Thus \(\lim\limits_{x\to0}\frac{x^2}{1-\cos(x) }=2\text{.}\)
  4. We already know how to evaluate this limit; first factor the numerator and denominator. We then have:
    \begin{equation*} \lim_{x\to 2}\frac{x^2+x-6}{x^2-3x+2} = \lim_{x\to 2}\frac{(x-2)(x+3)}{(x-2)(x-1)} = \lim_{x\to 2}\frac{x+3}{x-1} = 5\text{.} \end{equation*}
    We now show how to solve this using l’Hospital’s Rule.
    \begin{equation*} \lim_{x\to 2}\frac{x^2+x-6}{x^2-3x+2}\stackrel{\,\text{ by LHR } \,}{=} \lim_{x\to 2}\frac{2x+1}{2x-3} = 5\text{.} \end{equation*}
Note that at each step where l’Hospital’s Rule was applied, it was needed: the initial limit returned the indeterminate form of “\(0/0\text{.}\)” If the initial limit returns, for example, 1/2, then l’Hospital’s Rule does not apply.
The following theorem extends our initial version of l’Hospital’s Rule in two ways. It allows the technique to be applied to the indeterminate form \(\infty/\infty\) and to limits where \(x\) approaches \(\pm\infty\text{.}\)

Example 6.7.5. Using l’Hospital’s Rule with limits involving \(\infty\).

Evaluate the following limits.
\(\ds 1.\,\lim_{x\to\infty} \frac{3x^2-100x+2}{4x^2+5x-1000} \qquad\qquad 2. \,\lim_{x\to \infty}\frac{e^x}{x^3}\text{.}\)
Solution 1. Video solution
Solution 2.
  1. We can evaluate this limit already using Theorem 1.6.21; the answer is 3/4. We apply l’Hospital’s Rule to demonstrate its applicability.
    \begin{equation*} \lim_{x\to\infty} \frac{3x^2-100x+2}{4x^2+5x-1000}\stackrel{\,\text{ by LHR } \,}{=} \lim_{x\to\infty} \frac{6x-100}{8x+5} \stackrel{\,\text{ by LHR } \,}{=} \lim_{x\to\infty} \frac68 = \frac34\text{.} \end{equation*}
  2. \begin{equation*} \lim\limits_{x\to \infty}\frac{e^x}{x^3} \stackrel{\,\text{ by LHR } \,}{=} \lim_{x\to\infty} \frac{e^x}{3x^2} \stackrel{\,\text{ by LHR } \,}{=} \lim_{x\to\infty} \frac{e^x}{6x} \stackrel{\,\text{ by LHR } \,}{=} \lim_{x\to\infty} \frac{e^x}{6} = \infty\text{.} \end{equation*}
    Recall that this means that the limit does not exist; as \(x\) approaches \(\infty\text{,}\) the expression \(e^x/x^3\) grows without bound. We can infer from this that \(e^x\) grows “faster” than \(x^3\text{;}\) as \(x\) gets large, \(e^x\) is far larger than \(x^3\text{.}\) (This has important implications in computing when considering efficiency of algorithms.)

Subsection 6.7.2 Indeterminate Forms \(0\cdot\infty\) and \(\infty-\infty\)

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

Example 6.7.6. Applying l’Hospital’s Rule to other indeterminate forms.

Evaluate the following limits.
  1. \(\displaystyle \lim\limits_{x\to0^+} x\cdot e^{1/x}\)
  2. \(\displaystyle \lim\limits_{x\to0^-} x\cdot e^{1/x}\)
  3. \(\displaystyle \lim\limits_{x\to\infty} \ln(x+1)-\ln(x)\)
  4. \(\displaystyle \lim\limits_{x\to\infty} x^2-e^x\)
Solution 1. Video solution
Solution 2.
  1. As \(x\rightarrow 0^+\text{,}\) \(x\rightarrow 0\) and \(e^{1/x}\rightarrow \infty\text{.}\) Thus we have the indeterminate form \(0\cdot\infty\text{.}\) We rewrite the expression \(x\cdot e^{1/x}\) as \(\ds\frac{e^{1/x}}{1/x}\text{;}\) now, as \(x\rightarrow 0^+\text{,}\) we get the indeterminate form \(\infty/\infty\) to which l’Hospital’s Rule can be applied.
    \begin{equation*} \lim_{x\to0^+} x\cdot e^{1/x} = \lim_{x\to 0^+} \frac{e^{1/x}}{1/x} \stackrel{\,\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\text{.} \end{equation*}
    Interpretation: \(e^{1/x}\) grows “faster” than \(x\) shrinks to zero, meaning their product grows without bound.
  2. As \(x\rightarrow 0^-\text{,}\) \(x\rightarrow 0\) and \(e^{1/x}\rightarrow e^{-\infty}\rightarrow 0\text{.}\) The the limit evaluates to \(0\cdot 0\) which is not an indeterminate form. We conclude then that
    \begin{equation*} \lim_{x\to 0^-}x\cdot e^{1/x} = 0\text{.} \end{equation*}
  3. This limit initially evaluates to the indeterminate form \(\infty-\infty\text{.}\) By applying a logarithmic rule, we can rewrite the limit as
    \begin{equation*} \lim_{x\to\infty} \ln(x+1)-\ln(x) = \lim_{x\to \infty} \ln\left(\frac{x+1}x\right)\text{.} \end{equation*}
    As \(x\rightarrow \infty\text{,}\) the argument of the \(\ln\) term approaches \(\infty/\infty\text{,}\) to which we can apply l’Hospital’s Rule.
    \begin{equation*} \lim_{x\to\infty} \frac{x+1}x \stackrel{\,\text{ by LHR } \,}{=} \frac11=1\text{.} \end{equation*}
    Since \(x\rightarrow \infty\) implies \(\ds\frac{x+1}x\rightarrow 1\text{,}\) it follows that
    \begin{equation*} x\rightarrow \infty \text{ implies } \ln\left(\frac{x+1}x\right)\rightarrow \ln(1) =0\text{.} \end{equation*}
    \begin{equation*} \lim_{x\to\infty} \ln(x+1)-\ln(x) = \lim_{x\to \infty} \ln\left(\frac{x+1}x\right)=0\text{.} \end{equation*}
    Interpretation: since this limit evaluates to 0, it means that for large \(x\text{,}\) there is essentially no difference between \(\ln(x+1)\) and \(\ln(x)\text{;}\) their difference is essentially 0.
  4. The limit \(\lim\limits_{x\to\infty} x^2-e^x\) initially returns the indeterminate form \(\infty-\infty\text{.}\) We can rewrite the expression by factoring out \(x^2\text{;}\) \(\ds x^2-e^x = x^2\left(1-\frac{e^x}{x^2}\right)\text{.}\) We need to evaluate how \(e^x/x^2\) behaves as \(x\rightarrow \infty\text{:}\)
    \begin{equation*} \lim_{x\to\infty}\frac{e^x}{x^2} \stackrel{\,\text{ by LHR } \,}{=} \lim_{x\to\infty} \frac{e^x}{2x} \stackrel{\,\text{ by LHR } \,}{=} \lim_{x\to\infty} \frac{e^x}{2} = \infty\text{.} \end{equation*}
    Thus \(\lim_{x\to\infty}x^2(1-e^x/x^2)\) evaluates to \(\infty\cdot(-\infty)\text{,}\) which is not an indeterminate form; rather, \(\infty\cdot(-\infty)\) evaluates to \(-\infty\text{.}\) We conclude that \(\lim\limits_{x\to\infty} x^2-e^x = -\infty\text{.}\) Interpretation: as \(x\) gets large, the difference between \(x^2\) and \(e^x\) grows very large.

Subsection 6.7.3 Indeterminate Forms  \(0^0\text{,}\) \(1^\infty\) and \(\infty^0\)

When faced with an indeterminate form that involves a power, it often helps to employ the natural logarithmic function. The following Key Idea expresses the concept, which is followed by an example that demonstrates its use.

Key Idea 6.7.7. Evaluating Limits Involving Indeterminate Forms \(0^0\text{,}\) \(1^\infty\) and \(\infty^0\).

If \(\lim\limits_{x\to c} \ln\big(f(x)\big) = L\text{,}\) then
\begin{equation*} \lim\limits_{x\to c} f(x) = \lim_{x\to c} e^{\ln(f(x))} = e^L\text{.} \end{equation*}

Example 6.7.8. Using l’Hospital’s Rule with indeterminate forms involving exponents.

Evaluate the following limits.
  1. \(\displaystyle \lim_{x\to\infty} \left(1+\frac1x\right)^x\)
  2. \(\displaystyle \lim_{x\to0^+} x^x\)
Solution 1. Video solution
Solution 2.
  1. This is equivalent to a special limit given in Theorem 1.3.17; these limits have important applications within mathematics and finance. Note that the exponent approaches \(\infty\) while the base approaches 1, leading to the indeterminate form \(1^\infty\text{.}\) Let \(f(x) = (1+1/x)^x\text{;}\) the problem asks to evaluate \(\lim\limits_{x\to\infty}f(x)\text{.}\) Let’s first evaluate \(\lim\limits_{x\to\infty}\ln\big(f(x)\big)\text{.}\)
    \begin{align*} \lim_{x\to\infty}\ln\big(f(x)\big) \amp = \lim_{x\to\infty} \ln\left(1+\frac1x\right)^x\\ \amp = \lim_{x\to\infty} x\ln\left(1+\frac1x\right)\\ \amp = \lim_{x\to\infty} \frac{\ln\left(1+\frac1x\right)}{1/x}\\ \end{align*}

    This produces the indeterminate form 0/0, so we apply l’Hospital’s Rule.

    \begin{align*} \amp = \lim_{x\to\infty} \frac{\frac{1}{1+1/x}\cdot(-1/x^2)}{(-1/x^2)}\\ \amp = \lim_{x\to\infty}\frac{1}{1+1/x}\\ \amp = 1\text{.} \end{align*}
    Thus \(\lim\limits_{x\to\infty} \ln\big(f(x)\big) = 1\text{.}\) We return to the original limit and apply Key Idea 6.7.7.
    \begin{equation*} \lim_{x\to\infty}\left(1+\frac1x\right)^x = \lim_{x\to\infty} f(x) = \lim_{x\to\infty}e^{\ln(f(x))} = e^1 = e\text{.} \end{equation*}
  2. This limit leads to the indeterminate form \(0^0\text{.}\) Let \(f(x) = x^x\) and consider first \(\lim\limits_{x\to0^+} \ln\big(f(x)\big)\text{.}\)
    \begin{align*} \lim_{x\to0^+} \ln\big(f(x)\big) \amp = \lim_{x\to0^+} \ln\left(x^x\right)\\ \amp = \lim_{x\to0^+} x\ln(x)\\ \amp = \lim_{x\to0^+} \frac{\ln(x) }{1/x}.\\ \end{align*}

    This produces the indeterminate form \(-\infty/\infty\) so we apply l’Hospital’s Rule.

    \begin{align*} \amp = \lim_{x\to0^+} \frac{1/x}{-1/x^2}\\ \amp = \lim_{x\to0^+} -x\\ \amp = 0\text{.} \end{align*}
    Thus \(\lim\limits_{x\to0^+} \ln\big(f(x)\big) =0\text{.}\) We return to the original limit and apply Key Idea 6.7.7.
    \begin{equation*} \lim_{x\to0^+} x^x = \lim_{x\to0^+} f(x) = \lim_{x\to0^+} e^{\ln(f(x))} = e^0 = 1\text{.} \end{equation*}
    This result is supported by the graph of \(f(x)=x^x\) given in Figure 6.7.9.
    Graph of function x^x, used in this the example.
    The \(y\) axis is drawn from \(0\) to \(4\) and the \(x\) axis is drawn from \(0\) to \(2\text{.}\) The function \(f(x) = x^x\) is drawn as a curve opening towards the positive \(y\) axis with arrows towards the ends. The function is drawn from point \((0,1)\) from where it dips gently then rises up slowly.
    Figure 6.7.9. A graph of \(f(x)=x^x\) supporting the fact that as \(x\to 0^+\text{,}\) \(f(x)\to 1\)
Our brief revisit of limits will be rewarded in the next section where we consider improper integration. So far, we have only considered definite integrals where the bounds are finite numbers, such as \(\ds \int_0^1 f(x)\, dx\text{.}\) Improper integration considers integrals where one, or both, of the bounds are “infinity.” Such integrals have many uses and applications, in addition to generating ideas that are enlightening.

Exercises 6.7.4 Exercises

Terms and Concepts

List the different indeterminate forms described in this section.
T/F: l’Hospital’s Rule provides a faster method of computing derivatives.
  • True
  • False
l’Hospital’s Rule states that \(\ds \frac{d}{dx}\left[\frac{f(x)}{g(x)}\right] = \frac{\fp(x)}{g'(x)}\text{.}\)
  • True
  • False
Explain what the indeterminate form “\(1^\infty\)” means.
Fill in the blanks: The Quotient Rule is applied to \(\ds \frac{f(x)}{g(x)}\) when taking ; l’Hospital’s Rule is applied when taking certain .
Create (but do not evaluate!) a limit that returns “\(\infty^0\)”.
Create a function \(f(x)\) such that \(\lim\limits_{x\to 1}f(x)\) returns “\(0^0\)”.
Create a function \(f(x)\) such that \(\ds \lim_{x\to \infty}f(x)\) returns “\(0\cdot\infty\)”.


Exercise Group.
Evaluate the given limit using l’Hospital’s rule.
\(\lim\limits_{x\to 1} \frac{{x^{2}+x-2} }{{x-1}}\)
\begin{equation*} \lim\limits_{x\to 2} \frac{{x^{2}+x-6} }{{x^{2}-7x+10}} \end{equation*}
\begin{equation*} \lim\limits_{x\to \pi} \frac{{\sin\mathopen{}\left(x\right)} }{{x-\pi }} \end{equation*}
\begin{equation*} \lim\limits_{x\to \pi/4} \frac{{\sin\mathopen{}\left(x\right)-\cos\mathopen{}\left(x\right)} }{{\cos\mathopen{}\left(2x\right)}} \end{equation*}
\begin{equation*} \lim\limits_{x\to 0} \frac{{\sin\mathopen{}\left(5x\right)} }{{x}} \end{equation*}
\begin{equation*} \lim\limits_{x\to 0} \frac{{\sin\mathopen{}\left(2x\right)} }{{x+2}} \end{equation*}
\begin{equation*} \lim\limits_{x\to 0} \frac{{\sin\mathopen{}\left(2x\right)} }{{\sin\mathopen{}\left(3x\right)}} \end{equation*}
\begin{equation*} \lim\limits_{x\to 0} \frac{{\sin\mathopen{}\left(ax\right)} }{{\sin\mathopen{}\left(bx\right)}} \end{equation*}
\begin{equation*} \lim\limits_{x\to 0^+} \frac{{e^{x}-1} }{{x^{2}}} \end{equation*}
\begin{equation*} \lim\limits_{x\to 0^+} \frac{{e^{x}-x-1} }{{x^{2}}} \end{equation*}
\begin{equation*} \lim\limits_{x\to 0^+} \frac{{x-\sin\mathopen{}\left(x\right)} }{{x^{3}-x^{2}}} \end{equation*}
\begin{equation*} \lim\limits_{x\to \infty} \frac{{x^{4}}}{{e^{x}}} \end{equation*}
\begin{equation*} \lim\limits_{x\to \infty} \frac{{\sqrt{x}}}{{e^{x}}} \end{equation*}
\begin{equation*} \lim\limits_{x\to\infty} \frac{{e^{x}}}{{x^{2}}} \end{equation*}
\begin{equation*} \lim\limits_{x\to \infty} \frac{{e^{x}}}{{\sqrt{x}}} \end{equation*}
\begin{equation*} \lim\limits_{x\to \infty} \frac{{e^{x}}}{{2^{x}}} \end{equation*}
\begin{equation*} \lim\limits_{x\to \infty} \frac{{e^{x}}}{{3^{x}}} \end{equation*}
\begin{equation*} \lim\limits_{x\to 3} \frac{{x^{3}-5x^{2}+3x+9}}{{x^{3}-7x^{2}+15x-9}} \end{equation*}
\begin{equation*} \lim\limits_{x\to -2} \frac{{x^{3}+4x^{2}+4x}}{{x^{3}+7x^{2}+16x+12}} \end{equation*}
\begin{equation*} \lim\limits_{x\to \infty} \frac{{\ln\mathopen{}\left(x\right)}}{{x}} \end{equation*}
\begin{equation*} \lim\limits_{x\to \infty} \frac{{\ln\mathopen{}\left(x^{2}\right)}}{{x}} \end{equation*}
\begin{equation*} \lim\limits_{x\to \infty} \frac{{\ln^{2}\mathopen{}\left(x\right)}}{{x}} \end{equation*}
\begin{equation*} \lim\limits_{x\to 0^+} {x}\cdot {\ln\mathopen{}\left(x\right)} \end{equation*}
\begin{equation*} \lim\limits_{x\to 0^+} {\sqrt{x}}\cdot {\ln\mathopen{}\left(x\right)} \end{equation*}
\begin{equation*} \lim\limits_{x\to 0^+} {x} \cdot {e^{\frac{1}{x}}} \end{equation*}
\begin{equation*} \lim\limits_{x\to \infty} {x^{3}}-{x^{2}} \end{equation*}
\begin{equation*} \lim\limits_{x\to \infty} {\sqrt{x}}-{\ln\mathopen{}\left(x\right)} \end{equation*}
\begin{equation*} \lim\limits_{x\to -\infty} {x} \cdot {e^{x}} \end{equation*}
\begin{equation*} \lim\limits_{x\to 0^+} {\frac{1}{x^{2}}} \cdot {e^{\frac{-1}{x}}} \end{equation*}
\begin{equation*} \lim\limits_{x\to 0^+} ({1+x})^{\frac{1}{x}} \end{equation*}
\begin{equation*} \lim\limits_{x\to 0^+} ({2x})^{{x}} \end{equation*}
\begin{equation*} \lim\limits_{x\to 0^+} ({\frac{2}{x}})^{{x}} \end{equation*}
\begin{equation*} \lim\limits_{x\to 0^+} ({\sin\mathopen{}\left(x\right)})^{{x}} \end{equation*}
Hint: use the Squeeze Theorem.
\begin{equation*} \lim\limits_{x\to 1^-} ({1-x})^{{1-x}} \end{equation*}
\begin{equation*} \lim\limits_{x\to \infty} ({x})^{{\frac{1}{x}}} \end{equation*}
\begin{equation*} \lim\limits_{x\to \infty} ({\frac{1}{x}})^{{x}} \end{equation*}
\begin{equation*} \lim\limits_{x\to 1^+} ({\ln\mathopen{}\left(x\right)})^{{1-x}} \end{equation*}
\begin{equation*} \lim\limits_{x\to \infty} ({1+x})^{{\frac{1}{x}}} \end{equation*}
\begin{equation*} \lim\limits_{x\to \infty} ({1+x^{2}})^{{\frac{1}{x}}} \end{equation*}
\begin{equation*} \lim\limits_{x\to \pi/2} {\tan\mathopen{}\left(x\right)} {\cos\mathopen{}\left(x\right)} \end{equation*}
\begin{equation*} \lim\limits_{x\to \pi/2} {\tan\mathopen{}\left(x\right)} {\sin\mathopen{}\left(2x\right)} \end{equation*}
\begin{equation*} \lim\limits_{x\to 1^+} {\frac{1}{\ln\mathopen{}\left(x\right)}} - {\frac{1}{x-1}} \end{equation*}
\begin{equation*} \lim\limits_{x\to 3^+} {\frac{5}{x^{2}-9}} - {\frac{x}{x-3}} \end{equation*}
\begin{equation*} \lim\limits_{x\to \infty} {x} {\tan\mathopen{}\left(\frac{1}{x}\right)} \end{equation*}
\begin{equation*} \lim\limits_{x\to \infty} \frac{{\ln^{3}\mathopen{}\left(x\right)}}{{x}} \end{equation*}
\begin{equation*} \lim\limits_{x\to 1} \frac{{x^{2}+x-2}}{{\ln\mathopen{}\left(x\right)} } \end{equation*}
You have attempted of activities on this page.