Short and Sweet Calculus

4.6 L’Hôpital’s Rule for Indeterminate Limits

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

4.6.1 L’Hôpital’s Rule for the Indeterminate Forms of Type \(0/0\) and \(\pm\infty/\pm\infty\)

Assume \(f\) and \(g\) are two functions with \(f(a)=g(a)=0\). Then for \(x\neq a\), we have \[\frac{f(x)}{g(x)}=\frac{f(x)-\overbrace{f(a)}^{0}}{g(x)-\underbrace{g(a)}_{0}}=\frac{\dfrac{f(x)-f(a)}{x-a}}{\dfrac{g(x)-g(a)}{x-a}}\] Suppose the derivatives \(f'(a)\) and \(g'(a)\) exist and \(g'(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'(a),\qquad(h=x-a)\] and \[\lim_{x\to a}\frac{g(x)-g(a)}{x-a}=g'(a),\] we get \[\boxed{\lim_{x\to a}\frac{f(x)}{g(x)}=\frac{f'(a)}{g'(a)}\tag{i}}\] provided that \(g'(a)\neq0\).

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\).

4.7. (l’Hôpital’s Rule): If \(f\) and \(g\) both approach \(0\) or both approach \(\pm\infty\) as \(x\to s\), then \[\lim_{x\to s}\frac{f(x)}{g(x)}=\lim_{x\to s}\frac{f'(x)}{g'(x)}\] provided that \({\displaystyle \lim_{x\to s}}\frac{f'(x)}{g'(x)}\) exists or the limit is \(+\infty\) or \(-\infty\).

Here \(s\) signifies \(a,a^{+},a^{-},-\infty\), or \(+\infty\), where \(a\) is a real number.

To apply l’Hôpital’s rule:

  1. Make sure the limit of \(f(x)/g(x)\) assumes the form \(\dfrac{0}{0}\) or \(\dfrac{\pm\infty}{\pm\infty}\) as \(x\to s\).

  2. Differentiate \(f(x)\) and \(g(x)\) separately.

  3. Find the limit of \(f'(x)/g'(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 or infinity.

Example 4.7. Find \[\lim_{x\to1}\frac{x^{3}-3x+2}{2x^{3}-x^{2}-4x+3}.\]

Solution

Because \[\left.\frac{x^{3}-3x+2}{2x^{3}-x^{2}-4x+3}\right|_{x=1}=\frac{1-3+2}{2-1-4+3}=\frac{0}{0},\] we can apply l’Hôpital’s rule \[\lim_{x\to1}\frac{x^{3}-3x+2}{2x^{3}-x^{2}-4x+3}\stackrel{H}{=}\lim_{x\to1}\frac{3x^{2}-3}{6x^{2}-2x-4}.\] Because \[\left.\frac{3x^{2}-3}{6x^{2}-2x-4}\right|_{x=1}=\frac{3(1)^{2}-3}{6(1)^{2}-2(1)-4}=\frac{0}{0},\] we apply l’Hôpital’s rule again \[\lim_{x\to1}\frac{3x^{2}-3}{6x^{2}-2x-4}\stackrel{H}{=}\lim_{x\to1}\frac{6x}{12x-2}=\frac{6(1)}{12(1)-2}=\frac{3}{5}.\]

  • 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\).

Example 4.8. Find \[\lim_{x\to1}\frac{\ln x}{x-1}.\]

Solution

Because \[\left.\frac{\ln x}{x-1}\right|_{x=1}=\frac{0}{0},\] we can apply l’Hôpital’s rule: \[\lim_{x\to1}\frac{\ln x}{x-1}\stackrel{H}{=}\lim_{x\to1}\frac{\dfrac{1}{x}}{1}=1.\]

Example 4.9. Find \[\lim_{x\to\frac{\pi}{2}^{+}}\frac{\tan5x}{\tan x}.\]

Solution

Because \[\lim_{x\to\frac{\pi}{2}^{+}}\tan5x=\lim_{x\to\frac{\pi}{2}^{+}}\tan x=-\infty,\] we have \[\begin{aligned} \lim_{x\to\frac{\pi}{2}^{+}}\frac{\tan5x}{\tan x} & \stackrel{H}{=}\lim_{x\to\frac{\pi}{2}^{+}}\frac{5\sec^{2}5x}{\sec^{2}x}\\ & =\lim_{x\to\frac{\pi}{2}^{+}}\frac{5\cos^{2}x}{\cos^{2}5x}\tag{\small0/0}\\ & \overset{H}{=}\lim_{x\to\frac{\pi}{2}^{+}}\frac{\cancel{5(2)}(\bcancel{-}\sin x)\cos x}{\cancel{2(5)}(\bcancel{-}\sin5x)\cos5x}\\ & =\left(\lim_{x\to\frac{\pi}{2}^{+}}\frac{\sin x}{\sin5x}\right)\left(\lim_{x\to\frac{\pi}{2}^{+}}\frac{\cos x}{\cos5x}\right).\end{aligned}\] Because \(\sin\frac{\pi}{2}=1\) and \(\sin\frac{5\pi}{2}=\sin\left(2\pi+\frac{\pi}{2}\right)=\sin\frac{\pi}{2}=1\), we have: \[\lim_{x\to\frac{\pi}{2}^{+}}\frac{\sin x}{\sin5x}=1.\] Because \(\cos\frac{\pi}{2}=0\) and \(\cos\frac{5\pi}{2}=\cos\left(2\pi+\frac{\pi}{2}\right)=\cos\frac{\pi}{2}=0\), we have an indeterminate limit of type \(0/0\). So we can apply l’Hôpital’s rule: \[\lim_{x\to\frac{\pi}{2}^{+}}\frac{\cos x}{\cos5x}\stackrel{H}{=}\lim_{x\to\frac{\pi}{2}^{+}}\frac{-\sin x}{-5\sin5x}=\frac{1}{5}.\] Therefore \[\lim_{x\to\frac{\pi}{2}^{+}}\frac{\tan5x}{\tan x}=\left(\lim_{x\to\frac{\pi}{2}^{+}}\frac{\sin x}{\sin5x}\right)\left(\lim_{x\to\frac{\pi}{2}^{+}}\frac{\cos x}{\cos5x}\right)=(1)\left(\frac{1}{5}\right)=\frac{1}{5}.\]

Example 4.10. Evaluate \[\lim_{x\to-\infty}\frac{\sin(1/x)}{\ln\frac{x+1}{x+2}}.\]

Solution

Because \(\sin x\) and \(\ln x\) are continuous functions, we have \[\lim_{x\to-\infty}\sin\frac{1}{x}=\sin\left(\lim_{x\to-\infty}\frac{1}{x}\right)=\sin0=0\] and \[\lim_{x\to-\infty}\ln\frac{x+1}{x+2}=\ln\left(\lim_{x\to-\infty}\frac{x+1}{x+2}\right)=\ln1=0.\] So we have an indeterminate limit of type 0/0, and l’Hôpital’s rule applies: \[\begin{aligned} \lim_{x\to-\infty}\frac{\sin(1/x)}{\ln\frac{x+1}{x+2}} & \overset{H}{=}\lim_{x\to-\infty}\frac{-\frac{1}{x^{2}}\cos\frac{1}{x}}{\underbrace{\frac{1(x+2)-1(x+1)}{(x+2)^{2}}}_{u’}\underbrace{\frac{x+2}{x+1}}_{1/u}}\tag{\ensuremath{u=\frac{x+1}{x+2}}}\\ & =\lim_{x\to-\infty}\frac{-\frac{1}{x^{2}}\cos\frac{1}{x}}{\frac{1}{(x+2)}\frac{1}{(x+1)}}\\ & =\lim_{x\to-\infty}\left(-\frac{(x+1)(x+2)}{x^{2}}\cos\frac{1}{x}\right)\\ & =-\left(\lim_{x\to-\infty}\frac{(x+1)(x+2)}{x^{2}}\right)\left(\lim_{x\to-\infty}\cos\frac{1}{x}\right)\end{aligned}\] The limit of a rational function as \(x\to+\infty\) or \(-\infty\) is the same as the limit of ration of the highest degree term in the numerator and the highest degree term in the denominator. So \[\lim_{x\to-\infty}\frac{x^{2}+3x+2}{x^{2}}=\lim_{x\to-\infty}\frac{x^{2}}{x^{2}}=1.\] Also \[\lim_{x\to-\infty}\cos\frac{1}{x}=\cos\left(\lim_{x\to-\infty}\frac{1}{x}\right)=\cos0=1.\] Therefore \[\lim_{x\to-\infty}\frac{\sin(1/x)}{\ln\frac{x+1}{x+2}}=-\left(\lim_{x\to-\infty}\frac{(x+1)(x+2)}{x^{2}}\right)\left(\lim_{x\to-\infty}\cos\frac{1}{x}\right)=-(1)(1)=-1.\]

4.6.2 Evaluation of the Indeterminate Form \(0\cdot(\pm\infty)\)

If \(f(x)\to0\) and \(g(x)\to+\infty\) or \(-\infty\) as \(x\to s\), then we write \[f(x)g(x)=\frac{f(x)}{1/g(x)}\left(\text{or }=\frac{g(x)}{1/f(x)}\right)\] so as to cause it to take on one of the forms \(0/0\) or \(\pm\infty/\pm\infty\), and then apply l’Hôpital’s rule.

Example 4.11. Evaluate \[\lim_{x\to\pi/2}(\pi-2x)\tan x.\]

Solution

Note that because \[\lim_{x\to\pi/2^{+}}\tan x=-\infty,\quad\lim_{x\to\pi/2^{-}}\tan x=+\infty\] we have an indeterminate limit of type \(0\cdot(\pm\infty)\).

We can transform this limit into one of the form \(0/0\), \[\lim_{x\to\frac{\pi}{2}}(\pi-2x)\tan x=\lim_{x\to\frac{\pi}{2}}\frac{\pi-2x}{\cot x}\quad\left[=\frac{0}{0}\right]\] and then apply l’Hôpital’s rule: \[\lim_{x\to\frac{\pi}{2}}\frac{\pi-2x}{\cot x}\stackrel{H}{=}\lim_{x\to\frac{\pi}{2}}\frac{-2}{-(1+\cot^{2}x)}=\frac{-2}{-(1+\cot^{2}(\pi/2))}=\frac{2}{1+0}=2.\]

Example 4.12. Evaluate \[\lim_{x\to-\infty}xe^{x}.\]

Solution

Because \(e^{x}\to0\) as \(x\to-\infty\), we have an indeterminate limit of type \(0\cdot(-\infty)\). We write it as \[\begin{aligned} \lim_{x\to-\infty}xe^{x} & =\lim_{x\to-\infty}\frac{x}{e^{-x}}\left[=\frac{-\infty}{+\infty}\right]\\ & \overset{H}{=}\lim_{x\to-\infty}\frac{1}{-e^{-x}}\\ & =-\lim_{x\to-\infty}e^{x}\\ & =0.\end{aligned}\]

4.6.3 Evaluation of the indeterminate form \(\infty-\infty\)

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 a difference into a fraction are:

  • Using a common denominator

  • Rationalization

  • Factoring out a common factor

Example 4.13. Evaluate \[\lim_{x\to0}\left(\frac{1}{\sin x}-\frac{1}{x}\right).\]

Solution

Here we have a limit of the form \(\infty-\infty\) (you may consider \(x\to0^{+}\) and \(x\to0^{-}\) separately). Using a common denominator, we get \[\lim_{x\to0}\left(\frac{1}{\sin x}-\frac{1}{x}\right)=\lim_{x\to0}\frac{x-\sin x}{x\sin x}\left[=\frac{0}{0}\right]\] Now we can apply l’Hôpital’s rule: \[\begin{aligned} \lim_{x\to0}\frac{x-\sin x}{x\sin x} & \overset{H}{=}\lim_{x\to0}\frac{1-\cos x}{\sin x+x\cos x}\left[=\frac{0}{0}\right]\\ & \overset{H}{=}\lim_{x\to0}\frac{+\sin x}{\cos x+\cos x-x\sin x}\\ & =\frac{\sin0}{2\cos0-0(0)}\\ & =0.\end{aligned}\]

4.6.4 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),\tag{Recall \ensuremath{\ln(a^{b})=b\ln a}}\end{aligned}\] and then raising \(e\) to the power of both sides, 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)}.\] Therefore: \[\boxed{\lim_{x\to s}f(x)^{g(x)}=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\).

Example 4.14. Evaluate \[\lim_{x\to0^{+}}x^{x}.\]

Solution

Let \(y=x^{x}\). Taking the natural logarithn of both sides, we get \[\ln y=x\ln x.\] Therefore, \[y=e^{x\ln x}\] As \(x\to0^{+}\), \(x\ln x\) takes on the form \(0\cdot(-\infty)\). To find \({\displaystyle \lim_{x\to0^{+}}x\ln x}\), we write it as \[\lim_{x\to0^{+}}x\ln x=\lim_{x\to0^{+}}\frac{\ln x}{\dfrac{1}{x}}\quad\left[=\frac{-\infty}{+\infty}\right]\] Now we can apply l’Hôpital’s rule: \[\lim_{x\to0^{+}}\frac{\ln x}{\dfrac{1}{x}}\stackrel{H}{=}\lim_{x\to0^{+}}\frac{\frac{1}{x}}{-\frac{1}{x^{2}}}=\lim_{x\to0^{+}}(-x)=0.\] Therefore \[\lim_{x\to0^{+}}x^{x}=\lim_{x\to0^{+}}y=e^{\lim_{x\to0^{+}}(x\ln x)}=e^{0}=1.\]


[up][previous][table of contents][next]