In this section, we learn a powerful method to attack problems on indeterminate forms, called l’Hôpital’s rule (also written l’Hospital’s rule).
Table of Contents
L’Hôpital’s Rule for the Indeterminate Form 0/0
Assume \(f\) and \(g\) are two functions with \(f(a)=g(a)=0\). Then for \(x\neq a\), we have \[\begin{aligned} \frac{f(x)}{g(x)} & =\frac{f(x)-f(a)}{g(x)-g(a)}\\ \\ & =\frac{\dfrac{f(x)-f(a)}{x-a}}{\dfrac{g(x)-g(a)}{x-a}}\end{aligned}\] Suppose the derivatives \(f^\prime(a)\) and \(g^\prime(a)\) exist and \(g^\prime(a)\neq0\). Because \[\lim_{x\to a}\frac{f(x)-f(a)}{x-a}=\lim_{h\to0}\frac{f(a+h)-f(a)}{h}=f^\prime(a),\qquad(h=x-a)\] and \[\lim_{x\to a}\frac{g(x)-g(a)}{x-a}=g^\prime(a),\] we get \[\boxed{\lim_{x\to a}\frac{f(x)}{g(x)}=\frac{f^\prime(a)}{g^\prime(a)}\tag{i}}\] provided that \(g^\prime(a)\neq0\).
Figure 1 visually justifies Equation (i). Figure 1(a) shows the graphs of two differentiable functions \(f\) and \(g\) near \(x=a\). If we zoom in toward the point \((a,0)\) (Figure 1(b)), the graphs of \(f\) and \(g\) look almost linear, so we can approximate the ratio of \(f\) and \(g\) by the ratio of their local linearizations. That is, because \[f(x)\approx L_{f}(x)=\underbrace{f(a)}_{=0}+f^\prime(a)(x-a)\] and \[g(x)\approx L_{g}(x)=\underbrace{g(a)}_{=0}+g^\prime(a)(x-a),\] we have \[\frac{f(x)}{g(x)}\approx\frac{f^\prime(a)(x-a)}{g^\prime(a)(x-a)}=\frac{f^\prime(a)}{g^\prime(a)}.\]
(a) | (b) |
Figure 1
Use Equation (i) only when \(f(a)=g(a)=0\). If this condition is not satisfied, we cannot use this equation.
For example, consider \[\lim_{x\to0}\frac{1+2x}{1-x}\] Here \(f(x)=1+2x\) and \(g(x)=1-x\). Because \(f(0)/g(0)\neq0/0\), we cannot use Equation (i). If we use (i), because \(f^\prime(0)=2\) and \(g^\prime(0)=-1\), we get \(2/(-1)=-2\). But the correct answer can be obtained simply by subsituting 0 for \(x\): \[\lim_{x\to0}\frac{1+2x}{1-x}=\frac{1+2\times0}{1-0}=1\neq\frac{f^\prime(0)}{g^\prime(0)}=\frac{2}{-1}=-2.\]
- The following theorem generalizes the cases where we can use Equation (i). It states that Equation (i) is true under less stringent conditions and is also valid for one-sided limits as well as limits at \(+\infty\) and \(-\infty\).
By the hypothesis that \({\displaystyle \lim_{x\to a}}f^\prime(x)/g^\prime(x)\) exists, it is tactically assumed there is an open interval \(I\) containing \(a\) such that
- Both \(f\) and \(g\) are differentiable (\(f^\prime(x)\) and \(g^\prime(x)\) exist) for all \(x\) in \(I\) (except possibly for \(x=a\)).
- \(g^\prime(x)\neq0\) in \(I\) (except possibly when \(x=a\)).
Show the proof …
Hide the proof
If \(a<x\) and \(x\in I\), then \(F\) and \(G\) are continuous on \([a,x]\) and differentiable on \((a,x)\) (because \(f^\prime=f^\prime\) and \(g^\prime=g^\prime\)). Therefore, we can apply Cauchy’s Mean-Value Formula to the interval \([a,x]\) and obtain \[\left[\underbrace{F(x)}_{=f(x)}-\overset{=0}{\cancel{F(a)}}\right]\underbrace{g^\prime(c)}_{=g^\prime(c)}=\left[\underbrace{G(x)}_{=g(x)}-\overset{=0}{\cancel{G(a)}}\right]\underbrace{f^\prime(c)}_{=f^\prime(c)}\] or \[f(x)g^\prime(c)=g(x)f^\prime(c)\tag{*}\] for some \(c\) in the interval \((a,x)\).
Because \(g^\prime(x)\neq0\) for all \(x\) in \(I-\{a\}\), we have:
(1) \(g^\prime(c)\neq0\) (\(a<c<x\))
(2) \(g(x)\neq0\), because if \(g(x)=0\), then we would have \(g(x)=g(a)=0\) and by Rolle’s theore, there would be a point \(c_{1}\) between \(a\) and \(x\) such that \(g^\prime(c_{1})=0\).
Therefore, we divide both sides of (*) by \(g^\prime(c)\) and \(g(x)\) and obtain \[\frac{f(x)}{g(x)}=\frac{f^\prime(c)}{g^\prime(c)}.\] Now if we let \(x\to a^{+}\), then \(c\to a^{+}\) (because \(a<c<x\)), so \[\lim_{x\to a^{+}}\frac{f(x)}{g(x)}=\lim_{c\to a^{+}}\frac{f^\prime(c)}{g^\prime(c)}.\] The method needs some minor modifications to show that the result is valid as \(x\to a^{-}\). The combination of these two one-sided limit cases proves that the theorem is true as \(x\to a\).
When \(x\to+\infty\), the substitution \(x=\frac{1}{u}\) reduces the limit to evaluation of the limit as \(u\to0^{+}\). Thus \[\lim_{x\to+\infty}\frac{f(x)}{g(x)}=\lim_{u\to0^{+}}\frac{f(1/u)}{g(1/u)}\] Applying l’Hôpital’s rule: \[\begin{aligned} \lim_{u\to0^{+}}\frac{f(1/u)}{g(1/u)} & =\lim_{u\to0^{+}}\frac{-\dfrac{1}{u^{2}}f^\prime\left(\dfrac{1}{u}\right)}{-\dfrac{1}{u^{2}}g^\prime\left(\dfrac{1}{u}\right)}\\ & =\lim_{u\to0^{+}}\frac{f^\prime(1/u)}{g^\prime(1/u)}\\ & =\lim_{x\to+\infty}\frac{f^\prime(x)}{g^\prime(x)}.\quad (\text{replace} \frac{1}{u}=x)\end{aligned}\]
- Notice that \(f^\prime(x)/g^\prime(x)\) is the derivative of the numerator divided by the derivative of the denominator and it is different from the derivative of the fraction \(f(x)/g(x)\). \[\frac{f^\prime(x)}{g^\prime(x)}\neq\frac{d}{dx}\left(\frac{f(x)}{g(x)}\right)=\frac{f^\prime(x)g(x)-g^\prime(x)f(x)}{[g(x)]^{2}}.\]
- If we apply l’Hôpital’s rule to the well-known limit \(\lim_{x\to0}\sin x/x\), we obtain \[\lim_{x\to0}\frac{\sin x}{x}\stackrel{H}{=}\lim_{x\to0}\frac{\cos x}{1}=\cos0=1\] Although we could obtain this limit easily, to derive the formula \(\frac{d}{dx}\sin x=\cos x\), we assumed the truth of this limit.
- In these notes, we place an “H” above the equal sign to indicate that the two limits are equal as a result of applying l’Hôpital’s rule.
- Make sure the limit of \(f(x)/g(x)\) assumes the form 0/0 as \(x\to s\).
- Differentiate \(f(x)\) and \(g(x)\) separately.
- Find the limit of \(f^\prime(x)/g^\prime(x)\) as \(x\to s\). If the limit is a number, \(+\infty\), or \(-\infty\), then it is equal to the limit of \(f(x)/g(x)\); otherwise, we CANNOT conclude that the limit of \(f(x)/g(x)\) does not exist.
- If necessary, we may repeat the above process. Stop differentiating as soon as the derivative of the numerator or that of the denominator is different from zero.
It is a common error to apply l’Hôpital’s rule to calculate the limit of \(6x/(12x-2)\) as \(x\to1\). Applying l’Hôpital’s rule leads to a wrong value because this limit is not indeterminate and can be simply obtained by substituting 1 for \(x\).
Again note that if \(f,g\to0\) as \(x\to s\), but \[\lim_{x\to s}\frac{f^\prime(x)}{g^\prime(x)}\] does not approach a limit (that is, it is not a finite number, \(+\infty\), or \(-\infty\)), we cannot conclude that \(\lim_{x\to s}f(x)/g(x)\) does not approach a limit. The next example shows such a situation.
L’Hópital’s Rule for the Indeterminate Form ±∞/±∞
The proof of this theorem is discussed in more advanced books.
- The above example shows us that \(x^{\alpha}\) (\(\alpha>0\)) grows much faster than \(\ln x\).
Evaluation of the Indeterminate Form 0·(±∞)
We can apply l’Hôpital’s rule to evaluate the limits of the indeterminate form \(0\cdot(\pm\infty)\). Namely,
Evaluation of the Indeterminate Form ∞-∞
To evaluate a limit of the indeterminate form \(\infty-\infty\), we can transform it into a limit of a fraction such that we get an indeterminate form of type \(0/0\) or \(\pm\infty/\pm\infty\), then we apply l’Hôpital’s rule. Some examples of converting a difference into a fraction are:
- Using a common denominator
- Rationalization
- Factoring out a common factor
or we may write:
\[\begin{aligned} f(x)-g(x) & =\frac{1}{\dfrac{1}{f(x)}}-\frac{1}{\dfrac{1}{g(x)}}\\ \\ & =\frac{\dfrac{1}{g(x)}-\dfrac{1}{f(x)}}{\dfrac{1}{f(x)g(x)}}=\frac{0}{0}\end{aligned}\]
Evaluation of the indeterminate forms \(0^{0},1^{\pm\infty},(\pm\infty)^{0}\)
In addition to \(0/0\), \(\pm\infty/\infty\), \(0\cdot(\pm\infty)\), and \(\infty-\infty\), other indeterminate forms are \[0^{0},1^{\pm\infty},\text{ and }(\pm\infty)^{0}.\] That is, limits of the form
\[\lim_{x\to s}f(x)^{g(x)}\quad[\text{with }f(x)>0]\] are indeterminate if
- \(f\to0\) and \(g\to0\)
- \(f\to1\) and \(g\to+\infty\) or \(-\infty\)
- \(f\to+\infty\) or \(-\infty\) and \(g\to0\).
To evaluate such limits, let
\[y=f(x)^{g(x)}.\] Taking the natural logarithm of each side, \[\begin{aligned} \ln y & =\ln f(x)^{g(x)}\\ & =g(x)\ln f(x),\end{aligned}\] and then exponentiating the results, we obtain \[\underbrace{e^{\ln y}}_{=y}=e^{g(x)\ln f(x)}.\] Because \(e^{x}\) is a continuous function \[\lim_{x\to s}y=e^{\lim_{x\to s}\left(g(x)\ln f(x)\right)}.\]
In any of the above cases, \(\lim_{x\to s}(g(x)\ln f(x))\) will take on the indeterminate form \(0\cdot\pm\infty\).
- Note that \(0^{\pm\infty}\) is not an indeterminate form. If \(f\to0^{+}\) and \(g\to+\infty\) , then \[\ln f(x)\to-\infty\] and \[g(x)\ln f(x)\to(+\infty)(-\infty)=-\infty\] and \[y=e^{g(x)\ln f(x)}\stackrel{e^{-\infty}}{\to}0.\] And if \(f\to0^{+}\) and \(g\to-\infty\), then \[g(x)\ln f(x)\to(-\infty)(-\infty)=+\infty\] and \[y=e^{g(x)\ln f(x)}\stackrel{e^{+\infty}}{\to}+\infty.\]