Skip to main content

Section 4.8 L’Hôpital’s Rule

References.

There are places in the graph of a function where simple evaluation can fail to show what is happening: argument values \(x\) where the formula gives a meaningless indeterminate form like “0/0”, “\(\infty/\infty\)”, “\(0 \cdot \infty\)”, “\(\infty-\infty\)”, “\(0^0\)”, “\(1^\infty\)” or “\(\infty^0\)”.
It can be useful to compute the limits at such points, and l'Hôpital's Rule often helps with these sort of limits. This rule can also be useful in exploring the sideways extremes of a graph, the limits as \(x \to -\infty\) and \(x \to \infty\text{.}\)

When \(f(x)\) gives “\(0/0\)” for some \(x\) values.

With the function given by the formula \(\displaystyle f(x) = \frac{\sin x}{x}\text{,}\) the formula fails at \(x=0\text{,}\) because substituting in \(x=0\) gives \(0/0\text{,}\) an indeterminate form.
It cannot be simplified to 0 (suggested by the zero numerator), or to infinity (suggested by the zero denominator), or to 1 (suggested by canceling equal factors).
An indeterminate form tells us nothing about what happens at that point!
A new idea is needed. Fortunately, in the above example, we have seen that this is a removable discontinuity: the domain of the function can be extended to include \(x=0\) while keeping function continuous, with a unique choice of the value given by the limit
\begin{equation*} f(0) = \lim_{x \to 0}\frac{\sin x}{x}, = 1. \end{equation*}
Evaluating that limit was the hardest part of finding the derivative of sine, but now that we know a good collection of derivatives, computing such limits can be much easier, avoiding much algebra and trigonometry.

L'Hôpital's Rule for \(\mathbf{0/0}\).

For a limit \(\lim_{x \to a} \frac{f(x)}{g(x)}\) with \(f(a)=g(a)=0\) and both functions differentiable, the behavior for \(x\) values near \(a\) can be approximated with the linearizations
\begin{align*} f(x) \amp \approx f(a) + f'(a)(x-a) = f'(a)(x-a)\\ g(x) \amp \approx g(a) + g'(a)(x-a) = g'(a)(x-a). \end{align*}
This suggests that for \(x \approx a\text{,}\)
\begin{equation*} \frac{f(x)}{g(x)} \approx \frac{ f'(a)(x-a)}{ g'(a)(x-a)} = \frac{ f'(a)}{g'(a)}. \end{equation*}
The one hazard is that \(g'(a)\) might also be zero. To avoid this, the precise result is
\begin{align*} \lim_{x \to 0}\frac{\sin x}{x} \amp = \lim_{x \to 0}\frac{(\sin x)'}{x'} = \lim_{x \to 0}\frac{\cos x}{1} = \cos 0 = 1\\ \lim_{x \to 1}\frac{x-1}{\ln x} \amp = \lim_{x \to 1}\frac{1}{1/x} = 1\\ \lim_{x \to 2}\frac{x-2}{x^2-4} \amp = \lim_{x \to 2}\frac{1}{2x} = \frac14\\ \lim_{x \to 0}\frac{1-\cos x}{x^2} \amp = \lim_{x \to 0}\frac{\sin x}{2x} = \lim_{x \to 0}\frac{\cos x}{2} = \frac12\\ \lim_{x \to 0}\frac{\tan x}{x^2} \amp = \lim_{x \to 0}\frac{\sec^2 x}{2x} \text{, DNE: division by zero.} \end{align*}

Notes.

  1. Keep going so long as both the top and bottom are zero at \(x=a\text{,}\) but evaluate as soon as either one is non-zero, even if the result is “no limit” or an infinite limit due to division by zero.
  2. The top and bottom are differentiated separately, different from and easier than the quotient rule for derivatives!
Again, repeated application might be needed, so long as limits of the new top and bottom functions are both infinite or both zero, but you must stop as soon as this is no longer true.
Evaluate \(\displaystyle \lim_{x \to -\infty}\frac{4x^2-2x+5}{2x^2+x+1}\text{.}\)
Evaluate \(\displaystyle \lim_{x \to \infty}\frac{e^x}{x^2}\text{.}\)
Evaluate \(\displaystyle \lim_{x \to \infty}\frac{\ln x}{\sqrt[3]{x}}\text{.}\)

Indeterminate Products \(\infty \cdot 0\).

 
Another kind of indeterminate form that can arise in limits is a product \(\infty \cdot 0\text{,}\) as with \(\lim_{x \to a} f(x) g(x)\) when \(\lim_{x \to a} f(x) = \infty\) and \(\lim_{x \to a} g(x) = 0\text{.}\)
Simple examples like \(\lim_{x \to 0} (5/x) x\text{,}\) \(\lim_{x \to 0} (1/x^2) x\) and \(\lim_{x \to 0} (1/x) x^2\) show that the limit can be zero, infinity or anything in between; it can be negative too.
Fortunately, such limits can often be rewritten as a quotient where l'Hôpital's Rule applies: simply rewrite \(f(x) g(x)\) as
\begin{equation*} \text{either} \quad \frac{f(x)}{1/g(x)} \quad \text{ giving a form } \frac\infty\infty, \quad \text{or} \quad \frac{g(x)}{1/f(x)}, \quad \text{giving a form } \quad \frac00. \end{equation*}
The form \(\infty/\infty\) is usually more useful.
\begin{align*} \lim_{x \to 0^+} x \ln x \amp = \lim_{x \to 0^+} \frac{\ln x}{1/x} \qquad \text{Simplify: rearrange in } \infty/\infty \text{ form}\\ \amp = \lim_{x \to 0^+} \frac{1/x}{-1/x^2} \qquad \text{From l'Hôpital's Rule.}\\ \amp \text{The result is still } \infty/\infty \text{, so SIMPLIFY before trying anything fancier:}\\ \amp = \lim_{x \to 0^+} -x\\ \amp = 0. \end{align*}
Warning:

Indeterminate Differences: \(\mathbf \infty - \infty\).

 
If \(\lim_{x \to a} f(x) = \infty\) and also \(\lim_{x \to a} g(x) = \infty\text{,}\) attempting to evaluate \(\lim_{x \to a} (f(x)-g(x))\) can lead to another kind of indeterminate form, “\(\infty - \infty\)”.
This can have any finite or infinite value, or no limit at all.
Sometimes, the function \(f(x)-g(x)\) can be rewritten as a quotient giving an indeterminate form \(0/0\text{,}\) so that l'Hôpital's Rule can be tried. For example, this happens if \(f(x)\) and \(g(x)\) are both quotients with the same function in the denominator, with that function going to zero as \(x \to a\text{.}\)
Compute \(\displaystyle \lim_{x \to (\pi/2)^-}(\sec x - \tan x).\)

Indeterminate Powers: \(\mathbf 0^0\text{,}\) \(\infty^0\) and \(1^\infty\).

 
A final kind of indeterminate form is with the limit as \(x \to a\) of an exponential expression
\begin{equation*} y = [f(x)]^{g(x)} \end{equation*}
where as \(x \to a\text{,}\) either
  • \(f(x) \to 0\) and \(g(x) \to 0\)   [type \(0^0\)], or
  • \(f(x) \to \infty\) and \(g(x) \to 0\)   [type \(\infty^0\)], or
  • \(f(x) \to 1\) and \(g(x) \to \pm\infty\)   [type \(1^\infty\)].
All of these can be handled by converting the exponentiation into a product, by looking at the limit of the logarithm:
\begin{equation*} \ln y = \ln ([f(x)]^g(x)) = g(x) \ln(f(x))\text{,} \end{equation*}
and computing the limit of \(\ln y\) gives the indeterminate form \(0 \cdot (-\infty)\text{,}\) or \(0 \cdot \infty\text{,}\) or \(\pm\infty \cdot 0\) respectively for the three cases above. So one can try to evaluate this limit by the methods above for indeterminate products.
Note that if one succeeds, that gives the value of the limit of \(\ln y\text{,}\) so the last step is to exponentiate this to get the desired limit of \(y\) itself.
\(\displaystyle \lim_{x \to 0^+}x^x\)
\(\displaystyle \lim_{x \to 0^+}(1+\sin(4x))^{(\cot x)}\)

Exercises Exercises

Study Calculus Volume 1, Section 4.8 2 , Examples 38–41, 43 and 44, Checkpoints 37–40, 42 and 43, and a selection from Exercises 356–361, 362–366, 367–385, 387–389 and 391–395.
Here the exercises are grouped in ranges by "question type", so start by trying one or two from each of the ranges; some suggested selections are Exercises 357, 359, 363, 367, 371, 377, 379, 387, and 393.
openstax.org/books/calculus-volume-1/pages/4-8-lhopitals-rule
openstax.org/books/calculus-volume-1/pages/4-8-lhopitals-rule