Skip to main content

Section 2.15 L’Hôpital’s rule

Subsection Indeterminate forms \(0/0\) and \(\infty/\infty\)

Recall that when computing a derivative value \(f'(a)\) using the limit definition, the initial limit expression
\begin{align*} \lim\limits_{h\to 0}\frac{f(a+h)-f(a)}{h} \amp \end{align*}
is inevitably of the form \(0/0\text{.}\) In more detail, assuming that \(f\) is continuous at \(a\text{,}\) the limits of the numerator and denominator of the difference quotient \((f(a+h)-f(a))/h\) are both equal to zero. Recall further that this state of affairs is not a signal for us to throw up our hands and walk away. Indeed, if that were the case, we’d never be able to compute a derivative! No, instead it is a signal only that our current analysis of the limit does not suffice for us to give a definitive answer, and that more mathematical work is required.
Similarly, when computing limits of algebraic functions, we often encounter limit expressions \(\lim\limits_{x\to a}f(x)/g(x)\) where the numerator and denominator are both equal to \(\infty\text{,}\) making this a limit of the form \(\infty/\infty\text{.}\) Once again, this in itself does not tell us much beyond the fact the the numerator and denominator both get arbitrarily large (and positive) as \(x\to \infty\text{.}\) Without further analysis, there is no telling how the ratio of these two large numbers behaves as \(x\to\infty\text{:}\) it might approach \(\infty\text{,}\) \(0\text{,}\) or \(\sqrt{2}\text{.}\)
Because of this nondefinitive state of affairs, limit expressions of the form \(0/0\) and \(\infty/\infty\) are special cases of what we call indeterminate forms.

Definition 2.15.1. Indeterminate forms \(0/0\) and \(\infty/\infty\).

Consider a limit expression of the form
\begin{equation*} \lim_{x\to a}\frac{f(x)}{g(x)}\text{,} \end{equation*}
where \(a\) is either a finite number or \(\pm\infty\text{.}\)
The expression is an indeterminate form of type \(0/0\) if
\begin{equation*} \lim_{x\to a}f(x)=\lim_{x\to a}g(x)=0\text{.} \end{equation*}
The expression is an indeterminate form of type \(\infty/\infty\) if
\begin{equation*} \lim_{x\to a}f(x)=\pm\infty \text{ and } \lim_{x\to a}g(x)=\pm\infty\text{.} \end{equation*}

Remark 2.15.2. Indeterminate forms.

As discussed above, a limit expression having an indeterminate form does not mean that the limit does not exist. You should interpret this conclusion as simply saying that our current analysis is not detailed enough to determine whether the limit exists. In this spirit we will be careful not to write expressions like
\begin{align*} \lim_{x\to\infty}\frac{f(x)}{g(x)}\amp=\frac{0}{0} \amp \lim_{x\to a}\frac{f(x)}{g(x)}\amp =\frac{\infty}{\infty} \end{align*}
as these suggest we are asserting something more definitive about the limit expression. In general, when in the course of a limit computation you discover that the the current limit expression is of indeterminate form, you should treat this simply as an indication that the analysis is not yet complete!

Example 2.15.3. Indeterminate forms.

Decide whether the following limit expressions have determinate or indeterminate forms. If determinate, compute the limit.
  1. \(\displaystyle \displaystyle \lim\limits_{x\to 1}\frac{x-1}{\ln x}\)
  2. \(\displaystyle \displaystyle\lim_{x\to 0+}\frac{\sqrt{x}}{\ln x}\)
  3. \(\displaystyle \displaystyle\lim_{x\to\infty}\frac{x}{e^{-x}}\)
  4. \(\displaystyle \displaystyle\lim_{x\to\infty}\frac{e^x}{2^x+3^x}\)
Solution.
  1. As \(x\to 1\) we have \(x-1\to 0\) and \(\ln x\to 0\text{.}\) Thus the limit expression is indeterminate, of form \(0/0\text{.}\)
  2. As \(x\to 0^+\) we have \(\sqrt{x}\to 0\) and \(\ln x\to -\infty\) (using known properties of \(\ln\)). The form of this limit expression is thus \(0/\infty\text{,}\) which is not indeterminate: since the numerator gets arbitrarily small and the denominator gets arbitrarily large, we see the limit is equal to 0. (Note that the denominator being negative is of no consequence here; what is important is that it is large in absolute value.) Procedure 1.17.9 describes a general technique for dealing with limits like these that involve infinity is some manner, but which end up being of determinate form.
  3. As \(x\to \infty\text{,}\) we have \(x\to \infty\) and \(e^{-x}\to 0\text{.}\) The limit expression is thus of form \(\infty/0\text{.}\) Again this is a determinate form. We conclude that the limit is equal to \(\infty\text{,}\) since the numerator gets arbitrarily large (positive), and the denominator gets arbitrarily small (and positive). Notice that here sign (positive/negative) does play a role. Again, see Procedure 1.17.9 for a refresher of how to compute such limits.
  4. As \(x\to \infty\) we have \(e^x\to \infty\) and \(2^x+3^x\to \infty\text{.}\) The limit expression is thus indeterminate, of form \(\infty/\infty\text{.}\)

Subsection L’Hôpital’s rule

Up until now, in situations where a limit computation lead us to an indeterminate form, the only tool we had at our disposal was algebra: e.g., factoring, clearing denominators,rationalizing radical expressions, etc..
Now that we have introduced some non-algebraic functions into the discourse (e.g., \(f(x)=b^x\) and \(g(x)=\log_b x\)), we see that this algebraic approach is woefully inadequate. Consider the limit expression
\begin{align*} \lim\limits_{x\to 1}\frac{x-1}{\ln x} \amp \text{,} \end{align*}
for example. It seems clear that the three algebraic techniques mentioned above will not get us very far with this limit of form \(0/0\text{.}\) Indeed, surveying the various algebraic rules we know concerning \(\ln x\text{,}\) it would seem no amount of algebraic manipulation would lead to any progress. This is precisely the type of situation where l’Hôpital’s rule can come to our rescue.

Warning 2.15.5. Common mistake.

In a situation where l’Hôpital’s rule applies, do not make the mistake of computing the derivative of the quotient \(\left(f/g\right)'\text{.}\) That is, in general
\begin{align*} \lim_{x\to a}\frac{f(x)}{g(x)} \ne \lim_{x\to a}\left(\frac{f(x)}{g(x)}\right)' \amp \text{.} \end{align*}
Not only will this mistake usually result in an incorrect computation, it is also very time consuming to compute
\begin{align*} \left(\frac{f}{g}\right)'\amp=\frac{f'g-fg'}{g^2} \text{.} \end{align*}

Example 2.15.6. L’Hôpital’s rule.

Compute the following limits.
  1. \(\displaystyle \displaystyle\lim_{x\to\infty}\frac{\ln x}{x^{1/100}}\)
  2. \(\displaystyle \displaystyle\lim_{x\to 0}\frac{2^x-3^{-x}}{4^x-5^{-x}}\)
  3. \(\displaystyle \displaystyle\lim_{x\to 1}\frac{\cos(\pi x/2)}{\log_2(x)}\)
  4. \(\displaystyle \displaystyle\lim_{x\to 0}\frac{x-\sin x}{x\sin x}\)
Solution.
  1. \begin{align*} \lim_{x\to\infty}\frac{\ln x}{x^{1/100}} \amp = \lim_{x\to\infty}\frac{(\ln x)'}{(x^{1/100})'} \amp (\text{L'Hop }, \infty/\infty) \\ \amp = \lim_{x\to\infty}\frac{1/x}{\frac{1}{100}x^{-99/100}}\\ \amp = \lim_{x\to\infty}100\cdot \frac{1}{x^{1/100}}\\ \amp = 0 \amp (1/\infty) \end{align*}
  2. \begin{align*} \lim_{x\to 0}\frac{2^x-3^{-x}}{4^x-5^{-x}} \amp =\lim_{x\to 0}\frac{(2^x-3^{-x})'}{(4^x-5^{-x})'}\amp (\text{L'Hop }, 0/0)\\ \amp = \lim_{x\to 0}\frac{\ln 2\cdot 2^x+\ln 3\cdot 3^{-x}}{\ln 4\cdot 4^x+\ln 5\cdot 5^{-x}}\\ \amp = \frac{\ln 2+\ln 3}{\ln 4+\ln 5} \amp \text{(evaluation)}\\ \amp = \frac{\ln 6}{\ln 20} \amp (\text{log props.}) \end{align*}
  3. \begin{align*} \lim_{x\to 1}\frac{\cos(\pi x/2)}{\log_2(x)} \amp = \lim_{x\to 1}\frac{(\cos(\pi x/2))'}{(\log_2(x))'} \amp (\text{L'Hop }, 0/0) \\ \amp = \lim_{x\to 1}\frac{-\frac{\pi}{2}\sin(\pi x/2)}{\frac{1}{\ln 2}\cdot 1/x}\\ \amp =-\ln 2\cdot \frac{\pi}{2} \amp (\text{evaluation})\text{.} \end{align*}
  4. \begin{align*} \lim_{x\to 0}\frac{x-\sin x}{x\sin x} \amp = \lim_{x\to 0}\frac{(x-\sin x)'}{(x\sin x)'} \amp (\text{L'Hop }, 0/0)\\ \amp = \lim_{x\to 0}\frac{1-\cos x}{\sin x+x\cos x}\\ \amp =\lim_{x\to 0}\frac{(1-\cos x)'}{(\sin x+x\cos x)'} \amp (\text{L'Hop }, 0/0)\\ \amp = \lim_{x\to 0}\frac{\sin x}{2\cos x-x\sin x}\\ \amp = \frac{0}{2} \amp \text{(evaluation)}\\ \amp = 0\text{.} \end{align*}

Remark 2.15.7.

Students tend to fall madly in love with l’Hôpital’s rule upon first encountering it. Here are some comments to temper your passion.
  1. Make sure the relevant conditions apply: i.e., (a) \(f\) and \(g\) must be differentiable on an open interval containing \(a\text{,}\) and (b) we must have an indeterminate form of type \(0/0\) or \(\infty/\infty\text{.}\)
  2. Even if l’Hôpital’s rule applies, it may not be useful! In the following examples, applying l’Hôpital’s rule either gets us nowhere, or is too cumbersome.
    \begin{align*} \lim_{x\to\infty}\frac{e^x+e^{-x}}{e^{x}-e^{-x}} \amp \amp \lim_{x\to\infty}\frac{x^{24}-2x^{22}+2x^2+7}{3x^{24}+x^{20}-x^2+x+1} \text{.} \end{align*}

Example 2.15.8. Indeterminate form limit.

Evaluate \(\displaystyle\lim_{x\to\infty}\frac{e^x}{2^x+3^x}\text{.}\)
Solution.
Although this is a situation where l’Hôpital’s rule applies, upon applying it once we see that we get essentially the same limit expression back. Instead, we make use of our intuition. Since \(2< e < 3\text{,}\) it would stand to reason that the \(3^x\) term “dominates” the other exponential terms as \(x\to\infty\text{.}\) We make this intuition rigorous by “forcibly” factoring out the dominating term \(3^x\text{:}\)
\begin{align*} \lim_{x\to\infty}\frac{e^x}{2^x+3^x} \amp =\lim_{x\to\infty}\frac{e^x}{3^x(2^x/3^x+1)}\\ \amp = \lim_{x\to\infty}\frac{e^x}{3^x}\cdot \lim_{x\to\infty}\frac{1}{(2/3)^x+1}\\ \amp = \lim_{x\to\infty}(e/3)^x\cdot \frac{1}{0+1} \amp ((2/3)^x\to 0)\\ \amp = 0\cdot 1 \amp ((e/3)^x\to 0) \\ \amp = 0\text{.} \end{align*}

Subsection Other indetermiante forms

There are other types of indeterminate form limit expression to which l’Hôpital’s rule cannot be directly applied. However, after some algebraic manipulation we can often get the expression into a more tractable form.

Definition 2.15.9. More indeterminate forms.

Assume \(a\) is either a finite number or \(\pm\infty\text{.}\)
If \(\displaystyle\lim_{x\to a}f(x)=\lim_{x\to a}g(x)=\infty\text{,}\) then \(\displaystyle\lim_{x\to a}f(x)-g(x)\) is an indeterminate form of type \(\infty-\infty\).
If \(\displaystyle\lim_{x\to a}f(x)=0\) and \(\lim_{x\to a}g(x)=\pm\infty\text{,}\) then \(\displaystyle\lim_{x\to a}f(x)g(x)\) is an indeterminate form of type \(0\cdot\infty\text{.}\)
If \(\displaystyle\lim_{x\to a}f(x)=\lim_{x\to a}g(x)=0\text{,}\) then \(\displaystyle\lim_{x\to a}f(x)^{g(x)}\) is an indeterminate form of type \(0^0\).
If \(\displaystyle\lim_{x\to a}f(x)=\infty\) and \(\lim_{x\to a}g(x)=0\text{,}\) then \(\displaystyle\lim_{x\to a}f(x)^{g(x)}\) is an indeterminate form of type \(\infty^0\).
If \(\displaystyle\lim_{x\to a}f(x)=1\) and \(\lim_{x\to a}g(x)=\infty\text{,}\) then \(\displaystyle\lim_{x\to a}f(x)^{g(x)}\) is an indeterminate form of type \(1^\infty\).

Example 2.15.11. More indeterminate forms.

Compute the following limits.
  1. \(\displaystyle \displaystyle\lim_{x\to 0^+}\frac{1}{\sin x}-\frac{1}{x}\)
  2. \(\displaystyle \displaystyle\lim_{x\to \infty}2x-\sqrt{4x^2-13x}\)
  3. \(\displaystyle \displaystyle\lim_{x\to -\infty}x^22^{x}\)
  4. \(\displaystyle \displaystyle\lim_{x\to 0^+}(1+x)^{1/x}\)
  5. \(\displaystyle \displaystyle\lim_{x\to \infty}(1+x^2)^{2/x}\)
Solution.
  1. \begin{align*} \lim_{x\to 0^+}\frac{1}{\sin x}-\frac{1}{x} \amp = \lim_{x\to 0^+}\frac{x-\sin x}{x\sin x} \amp (\text{alg. tech.: common denom.})\\ \amp =0\text{.} \end{align*}
    The last equality was shown in Example 2.15.6 with the help of l’Hôpital’s rule.
  2. \begin{align*} \lim_{x\to \infty}2x-\sqrt{4x^2-13x}\amp= \lim_{x\to \infty}2x-\sqrt{4x^2-13x}\cdot \frac{2x+\sqrt{4x^2+13x}}{2x+\sqrt{4x^2-13x}} \amp (\text{alg. tech.: conjugate})\\ \amp = \lim_{x\to \infty}\frac{4x^2-(4x^2-13x)}{2x+\sqrt{4x^2-13x}} \\ \amp = \lim_{x\to \infty}\frac{13x}{2x+\sqrt{4x^2-13x}}\\ \amp = \lim_{x\to \infty}\frac{\cancel{x}}{\cancel{x}}\frac{13}{2+\sqrt{4-13/x}}\\ \amp = \frac{13}{2+\sqrt{4-0}}\\ \amp = \frac{13}{4} \end{align*}
    Note: the step where \(x\) is factored out of the numerator and denominator was motivated by the intuition that as \(x\to \infty\text{,}\) the \(x^2\) term in the radical dominates the \(x\) term.
  3. \begin{align*} \lim_{x\to -\infty}x^22^{x} \amp = \lim_{x\to -\infty}\frac{x^2}{2^{-x}}\\ \amp = \lim_{x\to -\infty}\frac{2x}{-\ln 2 \cdot 2^{-x}} \amp (\text{l'Hop }, \infty/\infty)\\ \amp = \lim_{x\to -\infty}\frac{2}{(\ln 2)^2\cdot 2^{-x}}\\ \amp = \frac{2}{\infty} \amp (2^{-x}\to \infty \text{ as } x\to -\infty)\\ \amp = 0\text{.} \end{align*}
  4. \begin{align*} \lim_{x\to 0^+}(1+x)^{1/x} \amp = \lim_{x\to 0^+}e^{\frac{1}{x}\ln (1+x)} \amp (\text{def. of } a^b)\\ \amp = e^{\lim_{x\to 0^+}\frac{\ln (1+x)}{x}} \amp \knowl{./knowl/xref/eq_exp_limit.html}{\text{(2.54)}} \\ \amp = e^{\lim_{x\to 0^+}\frac{1/(1+x)}{1}} \amp (\text{l'Hop }, 0/0)\\ \amp = e^{1}\\ \amp = e\text{.} \end{align*}
  5. \begin{align*} \lim_{x\to \infty}(1+x^2)^{2/x} \amp = \lim_{x\to \infty}e^{\frac{2}{x}\ln(1+x^2)} \amp (\text{def. of } a^b)\\ \amp = e^{\lim_{x\to \infty}\frac{2\ln(1+x^2)}{x}} \amp \knowl{./knowl/xref/eq_exp_limit.html}{\text{(2.54)}}\\ \amp = e^{\lim_{x\to \infty}\frac{4x/(1+x^2)}{1}} \amp (\text{l'Hop }, \infty/\infty) \\ \amp = e^0 \amp (4x/1+x^2\to 0 \text{ as } x\to \infty)\\ \amp = 1\text{.} \end{align*}