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

## 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

Example 1
Find $$\lim_{x\to0}\frac{\sin x}{1-e^{x}}}$$

Solution 1
Here $f(x)=\sin x,\qquad g(x)=1-e^{x},$ with $f(0)=0,\qquad g(0)=0.$ Because $f^\prime(x)=\cos x\Rightarrow f^\prime(0)=\cos0=1$ and $g^\prime(x)=-e^{x}\Rightarrow g^\prime(0)=-e^{0}=-1.$ by Equation (i), we have $\lim_{x\to0}\frac{\sin x}{1-e^{x}}=\frac{f^\prime(0)}{g^\prime(0)}=\frac{1}{-1}=-1.$

Example 2
Find $$\lim_{x\to1}\frac{1-x^{3}}{1-x}$$.
Solution 2
Here $$f(x)=1-x^{3}$$ and $$g(x)=1-x$$ with $$f(1)=0$$ and $$g(0)=0$$. We can use Equation (i) to evaluate the above limit: $f(x)=1-x^{3}\Rightarrow f^\prime(x)=-3x^{2}\Rightarrow f^\prime(1)=-3$ $g(x)=1-x\Rightarrow g^\prime(x)=-1\Rightarrow g^\prime(1)=-1$ $\lim_{x\to1}\frac{1-x^{3}}{1-x}=\frac{f^\prime(1)}{g^\prime(1)}=\frac{-3}{-1}=3.$

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$$.
Theorem 1. (l’Hôpital’s Rule): Assume $\lim_{x\to s}f(x)=0\quad\text{and}\quad\lim_{x\to s}g(x)=0$ and assume also that $$\lim_{x\to s}}f^\prime(x)/g^\prime(x$$ exists or this limit is $$+\infty$$ or $$-\infty$$. Then $$\lim_{x\to s}}f(x)/g(x$$ also approaches a limit and $\lim_{x\to s}\frac{f(x)}{g(x)}=\lim_{x\to s}\frac{f^\prime(x)}{g^\prime(x)}.$ Here $$s$$ signifies $$a,a^{+},a^{-},-\infty$$, or $$+\infty$$, where $$a\in\mathbb{R}$$.

By the hypothesis that $$\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

1. Both $$f$$ and $$g$$ are differentiable ($$f^\prime(x)$$ and $$g^\prime(x)$$ exist) for all $$x$$ in $$I$$ (except possibly for $$x=a$$).
2. $$g^\prime(x)\neq0$$ in $$I$$ (except possibly when $$x=a$$).

#### Show the proof …

First we prove this theorem for $$x\to a^{+}$$. Because $$f$$ and $$g$$ may not be defined at $$a$$, we introduce two new functions $F(x)=\begin{cases} f(x) & \text{if }x\neq a\\ 0 & \text{if }x=a \end{cases}\quad G(x)=\begin{cases} g(x) & \text{if }x\neq a\\ 0 & \text{if }x=a \end{cases}.$ Both $$F$$ and $$G$$ are continuous at $$a$$ because $\lim_{x\to a}F(x)=\lim_{x\to a}f(x)=0=F(a)$ and similarly $$\lim_{x\to a}G(x)=0=G(0)$$.

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.
To apply l’Hôpital’s rule:

1. Make sure the limit of $$f(x)/g(x)$$ assumes the form 0/0 as $$x\to s$$.
2. Differentiate $$f(x)$$ and $$g(x)$$ separately.
3. 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.
Example 3
Find $\lim_{x\to1}\frac{x^{3}-3x+2}{2x^{3}-x^{2}-4x+3}.$

Solution 3
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
Find $\lim_{t\to2}\frac{\sqrt{t+7}-3}{t-2}.$

Solution 4
Because $\left.\frac{\sqrt{t+7}-3}{t-2}\right|_{t=2}=\frac{\sqrt{2+7}-3}{t-2}=\frac{0}{0},$ we apply l’Hôpital’s rule: \begin{aligned} \lim_{t\to2}\frac{\sqrt{t+7}-3}{t-2} & \stackrel{H}{=}\lim_{t\to2}\frac{\dfrac{1}{2\sqrt{t+7}}}{1}\\ \\ & =\frac{\dfrac{1}{2\sqrt{2+7}}}{1}\\ & =\frac{1}{6}.\end{aligned}
Example 5
Find $\lim_{x\to0}\frac{1-\cos x}{x^2}.$
Solution 5
Note that here we have an indeterminate limit of type 0/0. So $\lim_{x\to0}\frac{1-\cos x}{x^{2}}\stackrel{H}{=}\lim_{x\to0}\frac{-(-\sin x)}{2x}=\frac{1}{2}.$ For the last step, we could use l’Hôpital’s rule again.
Example 6
Find $\lim_{x\to0}\frac{x-\sin x}{x-\tan x}.$

Solution 6
Here we have an indeterminate limit of type $$0/0$$. So

$\lim_{x\to0}\frac{x-\sin x}{x-\tan x}\stackrel{H}{=}\lim_{x\to0}\frac{1-\cos x}{1-\sec^{2}x}$ Although the second limit is also indeterminate and we can apply l’Hôpital’s rule again, it is easier to directly evaluate the second limit: \begin{aligned} \frac{1-\cos x}{1-\sec^{2}x} & =\frac{1-\cos x}{1-\frac{1}{\cos^{2}x}}\\ \\ & =\frac{1-\cos x}{\frac{\cos^{2}x-1}{\cos^{2}x}}\\ \\ &=\frac{\cos^{2}x\ (1-\cos x)}{(\cos x-1)(\cos x+1)}\quad{(A^{2}-B^{2}=(A-B)(A+B))}\\ \\ & =\frac{-\cos^{2}x}{\cos x+1}.\end{aligned} Therefore: $\lim_{x\to0}\frac{1-\cos x}{1-\sec^{2}x}=\lim_{x\to0}\frac{-\cos^{2}x}{\cos x+1}=-\frac{1}{1+1}=-\frac{1}{2}.$

Example 7
Find $\lim_{x\to1}\frac{\ln x}{x-1}.$

Solution 7
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 8
Find $\lim_{x\to0}\frac{x-\sin x}{\sinh x}.$

Solution 8
Because $\left.\frac{x-\sin x}{\sinh x}\right|_{x=0}=\frac{0-0}{0},$ we can use l’Hôpital’s rule$\lim_{x\to0}\frac{x-\sin x}{\sinh x}\stackrel{H}{=}\lim_{x\to0}\frac{1-\cos x}{\cosh x}=\frac{1-1}{(e^{0}+e^{0})/2}=0.$ Example 9
Find $\lim_{x\to0}\frac{\arcsin4x-2\arcsin2x}{x^{3}}.$

Solution 9
Because $\lim_{x\to0}(\arcsin4x-2\arcsin2x)=0-2(0)=0$ and $\lim_{x\to0}x^{3}=0$ we have an indeterminate limit of type $$0/0$$ and we can apply l’Hôpital’s rule . Recall that $(\arcsin x)’=\frac{1}{\sqrt{1-x^{2}}}.$ Thus, $\lim_{x\to0}\frac{\arcsin4x-2\arcsin2x}{x^{3}}\stackrel{H}{=}\lim_{x\to0}\frac{\dfrac{4}{\sqrt{1-16x^{2}}}-2\dfrac{2}{\sqrt{1-4x^{2}}}}{3x^{2}}$ The second limit is still 0/0. Thus we can apply l’Hôpital’s rule again. To differentiate the numerator, it might be easier to write it as $4(1-16x^{2})^{-\frac{1}{2}}-4(1-4x^{2})^{-\frac{1}{2}}.$ Therefore, \begin{aligned} &\lim_{x\to0}\frac{4(1-16x^{2})^{-\frac{1}{2}}-4(1-4x^{2})^{-\frac{1}{2}}}{3x^{2}} \\ & \stackrel{H}{=}\lim_{x\to0}\frac{\dfrac{4(-32\bcancel{x})}{-2}(1-16x^{2})^{-\frac{3}{2}}-\dfrac{4(-8\bcancel{x})}{-2}(1-4x^{2})^{-\frac{3}{2}}}{6\bcancel{x}}\\ & =\lim_{x\to0}\frac{64(1-16x^{2})^{-\frac{3}{2}}-16(1-4x^{2})^{-\frac{3}{2}}}{6}\\ & =\frac{64-16}{6}\\ & =8.\end{aligned}

Example 10
Find $\lim_{x\to\infty}\frac{e^{1/x^{2}}-1}{2\arctan x^{2}-\pi}.$

Solution 10
Because $\lim_{x\to\infty}e^{1/x^{2}}=e^{\lim_{x\to\infty}\frac{1}{x^{2}}}=e^{0}=1$ and $\lim_{x\to\infty}\arctan x^{2}\stackrel{u=x^{2}}{=}\lim_{u\to\infty}\arctan u=\frac{\pi}{2},$ we have an indeterminate limit of type $$0/0$$. Thus $\lim_{x\to\infty}\frac{e^{1/x^{2}}-1}{2\arctan x^{2}-\pi}\stackrel{H}{=}\lim_{x\to\infty}\frac{\dfrac{d}{dx}\left(e^{1/x^{2}}-1\right)}{\dfrac{d}{dx}\left(2\arctan x^{2}-\pi\right)}.$ Because $\frac{d}{dx}e^{u}=e^{u}\frac{du}{dx},\quad\frac{d}{dx}\arctan u=\frac{1}{1+u^{2}}\dfrac{du}{dx},$ we obtain \begin{aligned} \lim_{x\to\infty}\frac{\dfrac{d}{dx}\left(e^{1/x^{2}}-1\right)}{\dfrac{d}{dx}\left(2\arctan x^{2}-\pi\right)} & =\lim_{x\to\infty}\frac{\dfrac{d}{dx}(x^{-2})e^{1/x^{2}}}{2\dfrac{dx^{2}}{dx}\dfrac{1}{1+x^{4}}}\\ \\ & =\lim_{x\to\infty}\frac{-\cancel{2}x^{-3}e^{1/x^{2}}}{2(\cancel{2}x)\dfrac{1}{1+x^{4}}}\\ \\ & =\lim_{x\to\infty}\frac{1+x^{4}}{-2x^{4}}e^{1/x^{2}}\\ \\ & =\left(\lim_{x\to\infty}\frac{1+x^{4}}{-2x^{4}}\right)\left(\lim_{x\to\infty}e^{1/x^{2}}\right)\\ \\ & =\left(\lim_{x\to\infty}\frac{x^{4}}{-2x^{4}}\right)\left(e^{\lim_{x\to\infty}1/x^{2}}\right)\\ \\ & =\left(\frac{1}{-2}\right)(\underbrace{e^{0}}_{=1})\\ & =-\frac{1}{2}.\end{aligned}

Example 11
Find $\lim_{x\to+\infty}\frac{x^{-5/3}}{\sin(1/x)}.$

Solution 11
Because $\lim_{x\to+\infty}x^{-5/3}=\lim_{x\to+\infty}\frac{1}{x^{5/3}}=0$ and \begin{aligned} \lim_{x\to+\infty}\sin\left(\frac{1}{x}\right) & =\sin\left(\lim_{x\to+\infty}\frac{1}{x}\right)\\ & =\sin0=0,\end{aligned} we have an indeterminate limit of type $$0/0$$. So l’Hôpital’s rule applies: \begin{aligned} \lim_{x\to+\infty}\frac{x^{-5/3}}{\sin(1/x)} & \stackrel{H}{=}\lim_{x\to+\infty}\frac{-\frac{5}{3}x^{-8/3}}{-\frac{1}{x^{2}}\cos\left(1/x\right)}\\ & =\lim_{x\to+\infty}\frac{-\frac{5}{3}x^{-2/3}}{\cos(1/x)}\\ & =\lim_{x\to+\infty}\frac{1}{\cos(1/x)}\left(\lim_{x\to+\infty}-\frac{5}{3x^{2/3}}\right)\\ & =\frac{1}{\cos0}(0)\\ & =0.\end{aligned}

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

Solution 12
Because $$\sin x$$ and $$\ln x$$ are continuous functions, we have \begin{aligned} \lim_{x\to-\infty}\sin\frac{1}{x} & =\sin\left(\lim_{x\to-\infty}\frac{1}{x}\right)\\ & =\sin0=0\end{aligned} and \begin{aligned} \lim_{x\to-\infty}\ln\frac{x+1}{x+2} & =\ln\left(\lim_{x\to-\infty}\frac{x+1}{x+2}\right)\\ & =\ln1=0.\end{aligned} 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}}{\frac{1(x+2)-1(x+1)}{(x+2)^{2}}\frac{x+2}{x+1}}\\ \\ & =\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)\\ & =-\left(\lim_{x\to-\infty}\frac{x^{2}}{x^{2}}\right)\cos\left(\lim_{x\to-\infty}\frac{1}{x}\right)\\ & =-(1)\cos(0)\\ & =-1.\end{aligned}

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.

Example 13
Can we apply l’Hôpital’s rule to find $\lim_{x\to0}\frac{f(x)}{g(x)}$ if $$f(x)=x^{2}\sin\dfrac{1}{x}$$ and $$g(x)=x$$?
Solution 13
In this example, $f(x),g(x)\to0\text{ as }x\to0$ [Because $$-1\leq\sin\dfrac{1}{x}\leq1$$, we have $$-x^{2}\leq x^{2}\sin\dfrac{1}{x}\leq x^{2}$$, and by the Sandwich Theorem we get $$\lim_{x\to0}x^{2}\sin\frac{1}{x}=0$$.] So we deal with an indeterminate limit of type $$0/0$$. If we attempt to apply l’Hôpital’s rule, we get $$g^\prime(x)=1$$, \begin{aligned} f^\prime(x) & =2x\sin\frac{1}{x}+x^{2}\left(-\frac{1}{x^{2}}\right)\cos\frac{1}{x}\\ & =2x\sin\frac{1}{x}-\cos\frac{1}{x},\end{aligned} and $\lim_{x\to0}\frac{f^\prime(x)}{g^\prime(x)}=\lim_{x\to0}\left(2x\sin\frac{1}{x}-\cos\frac{1}{x}\right).$ However, this limit does not exist because $$2x\sin\frac{1}{x}\to0$$ (by the Sandwich Theorem), but the limit of $$\cos\frac{1}{x}$$ does not exist as it widly oscillates between $$-1$$ and $$1$$.

Note that we CANNOT conclude that $$\lim_{x\to0}f(x)/g(x)$$ does not exist. In fact, in this example, $$\lim_{x\to0}f(x)/g(x)$$ DOES exist: \begin{aligned} \lim_{x\to0}\frac{f(x)}{g(x)} & =\lim_{x\to0}\frac{x^{2}\sin\frac{1}{x}}{x}\\ & =\lim_{x\to0}x\sin\frac{1}{x}=0.\end{aligned} In general, if $$\lim_{x\to s}f^\prime(x)/g^\prime(x)$$ does not exist (and it is not equal to $$\pm\infty$$), l’Hôpital’s rule does not apply.

## L’Hópital’s Rule for the Indeterminate Form  ±∞/±∞

Theorem 2. (L’Hôpital’s Rule for $$\infty$$/$$\infty$$): Assume $\lim_{x\to s}f(x)=+\infty,\text{ or }-\infty$ and $\lim_{x\to s}g(x)=+\infty}\text{ or }-\infty$ If $\lim_{x\to s}\frac{f^\prime(x)}{g^\prime(x)}=L,$ then $\lim_{x\to s}\frac{f(x)}{g(x)}=L.$ Here $$s$$ signifies $$a,a^{+},a^{-},-\infty$$, or $$+\infty$$, where $$a\in\mathbb{R}$$. The theorem remains valid if $$L$$ is replaced by $$+\infty$$ or $$-\infty$$.

The proof of this theorem is discussed in more advanced books.

Example 14
Find $\lim_{x\to\frac{\pi}{2}^{+}}\frac{\tan5x}{\tan x}.$

Solution 14
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}\qquad(0/0)\\ & \overset{H}{=}\lim_{x\to\frac{\pi}{2}^{+}}\frac{\cancel{5(2)}(\bcancel{-}\sin x)\cos x}{\cancel{2(5)}(\bcancel{-}\sin5x)\cos5x}\\ & \begin{equation*}=\lim_{x\to\frac{\pi}{2}^{+}}\frac{\sin2x}{\sin10x}\tag{using the double angle formula}\end{equation*}\\ & \stackrel{H}{=}\lim_{x\to\frac{\pi}{2}^{+}}\frac{2\cos2x}{10\cos10x}\\ & =\frac{2\cos0}{10\cos0}\\ & =\frac{1}{5}.\end{aligned}

Example 15
Evaluate $\lim_{x\to+\infty}\frac{\ln x}{x^{\alpha}},$ where $$\alpha>0$$.
Solution 15
This is an indeterminate limit of type $$\infty/\infty$$, and l’Hôpital’s rule applies: \begin{aligned} \lim_{x\to+\infty}\frac{\ln x}{x^{\alpha}} & \stackrel{H}{=}\lim_{x\to+\infty}\frac{\dfrac{1}{x}}{\alpha x^{\alpha-1}}\\ & =\lim_{x\to+\infty}\frac{1}{\alpha x^{\alpha}}\\ & =0,\end{aligned} because $$\alpha>0$$.
• The above example shows us that $$x^{\alpha}$$ ($$\alpha>0$$) grows much faster than $$\ln x$$.
Example 16
Evaluate $\lim_{x\to0^{+}}\frac{\ln x}{\csc x}.$

Solution 16
Because $\lim_{x\to0^{+}}\ln x=-\infty$

and $\lim_{x\to0^{+}}\csc x=\lim_{x\to0^{+}}\frac{1}{\sin x}\stackrel{\left[\frac{1}{0^{+}}\right]}{=}+\infty$ we have an indeterminate limit of type $$-\infty/\infty$$ and we can apply l’Hôpital’s rule: $\lim_{x\to0^{+}}\frac{\ln x}{\csc x}\stackrel{H}{=}\lim_{x\to0^{+}}\frac{\dfrac{1}{x}}{-\csc x\cot x}$ The second limit is still indeterminate of type $$\infty/(-\infty)$$. If we directly apply l’Hôpital’s rule to this fraction, because powers of $$1/x$$ appear in the numerator and expressions involving $$\csc x$$ and $$\cot x$$ in the denominator, we will make the problem more complicated. However, if we first simplify the quotient, l’Hôpital’s rule is then helpful: \begin{aligned} \lim_{x\to0^{+}}\frac{\dfrac{1}{x}}{-\csc x\cot x} & =\lim_{x\to0^{+}}\frac{-1}{x\dfrac{1}{\sin x}\dfrac{\cos x}{\sin x}}\\ \\ & \begin{equation*}=\lim_{x\to0^{+}}\frac{\sin^{2}x}{x\cos x}\tag{0/0}\end{equation*}\\ \\ & \stackrel{H}{=}\lim_{x\to0^{+}}\frac{2\sin x\cos x}{\cos x-x\sin x}\\ & =\frac{2(0)(1)}{1-0(0)}=0.\end{aligned}

## 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,

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 (Theorem 1 or 2).
Example 17
Evaluate $\lim_{x\to\pi/2}(\sec3x\cos5x).$

Solution 17
Because \begin{aligned} \lim_{x\to\pi/2}\sec3x & =\lim_{x\to\pi/2}\frac{1}{\cos3x}\\ & =\begin{cases} \lim_{x\to\frac{\pi}{2}^{-}}\frac{1}{\cos3x}\stackrel{\left[\frac{1}{0^{-}}\right]}{=}-\infty & \text{(see Figure 3)}\\ \lim_{x\to\frac{\pi}{2}^{+}}\frac{1}{\cos3x}\stackrel{\left[\frac{1}{0^{+}}\right]}{=}+\infty & \text{(see Figure 3)} \end{cases}\end{aligned} and $\lim_{x\to\pi/2}\cos5x=\cos(5\pi/2)=0.$ Figure 3. (a) $$\cos 3x\to0^{-}$$ as $$x\to\pi/2^{-}$$ or $\cos u\to 0^-$ as $u\to \frac{3\pi}{2}^-$ (b) $$\cos 3x\to0^{+}$$ as $x\to\pi/2^{+}$ or $\cos u\to 0^+$ as $u\to \frac{3\pi}{2}^+$.

That is, we have an indeterminate limit of type $$0\cdot\infty$$ or $$0\cdot(-\infty)$$ (Figure 4). If we write, $\sec3x\cos5x=\frac{\cos5x}{\cos3x},$ we get an indeterminate limit of type $$0/0$$: $\lim_{x\to\pi/2}\frac{\cos5x}{\cos3x}=\left[\frac{\cos(5\pi/2)}{\cos(3\pi/2)}=\frac{0}{0}\right]$

Now we can apply l’Hôpital’s rule. $\frac{d}{dx}\cos5x=-5\sin5x$ $\frac{d}{dx}\cos3x=-3\sin3x$ \begin{aligned} \Rightarrow\lim_{x\to\pi/2}\frac{\cos5x}{\cos3x} & \overset{H}{=}\lim_{x\to\pi/2}\frac{-5\sin5x}{-3\sin3x}\\ \\ & =\frac{-5\overbrace{\sin(5\pi/2)}^{=\sin(2\pi+\frac{\pi}{2})=1}}{-3\underbrace{\sin(3\pi/2)}_{=-1}}\\ & =-\frac{5}{3}.\end{aligned} Therefore, $$\sec3x\cos5x\to-5/3$$ as $$x\to\pi/2$$. The graph of $$y=\sec3x\cos5x$$ is shown in Figure 5.

Example 18
Evaluate $\lim_{x\to\pi/2}(\pi-2x)\tan x.$

Solution 18
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)$$ (Figure 6).

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

Example 19
Evaluate $\lim_{x\to0^{+}}x\ln\sin x.$

Solution 19
Note that $\sin x\to0^{+}\text{ as }x\to0^{+},$ and $\ln u\to-\infty\text{ as }u\to0^{+}.$ Therefore, $\lim_{x\to0^{+}}\ln\sin x=-\infty$ and $$\lim_{x\to0^{+}}x\ln\sin x$$ is a limit of the form $$0\cdot(-\infty)$$ (see Figure 8).

We can transform it into one of the form $$\infty/\infty$$. \begin{aligned} \lim_{x\to0^{+}}x\ln x & =\lim_{x\to0^{+}}\frac{\ln\sin x}{\frac{1}{x}}\left[=\frac{-\infty}{+\infty}\right]\\ & \overset{H}{=}\lim_{x\to0^{+}}\frac{\cos x\ \dfrac{1}{\sin x}}{-\dfrac{1}{x^{2}}}\\ & =\lim_{x\to0^{+}}x^{2}\cos x\ \frac{1}{\sin x}\\ & =\underbrace{\left(\lim_{x\to0^{+}}\cos x\right)}_{=1}\underbrace{\left(\lim_{x\to0^{+}}x\right)}_{=0}\underbrace{\left(\lim_{x\to0^{+}}\frac{x}{\sin x}\right)}_{=1}\\ & =1(0)(1)=0.\end{aligned} [Recall that $$\sin x/x\to0$$ as $$x\to0$$.] The graph of $$y=x\ln\sin x$$ is shown in Figure 9.

Example 20
Evaluate $\lim_{x\to-\infty}xe^{x}.$

Solution 20
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} Figure 10 shows the graph of $$y=xe^{x}$$.

## 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}

Example 21
Evaluate $\lim_{x\to\pi/2}\left(\sec x-\tan x\right).$

Solution 21
We notice $\lim_{x\to\pi/2^{-}}\sec x=\lim_{x\to\pi/2^{-}}\frac{1}{\cos x}\overset{\left[\frac{1}{0^{+}}\right]}{=}+\infty$

$\lim_{x\to\pi/2^{-}}\tan x=\lim_{x\to\pi/2^{-}}\frac{\sin x}{\cos x}\overset{\left[\frac{1}{0^{+}}\right]}{=}+\infty,$ and $\lim_{x\to\pi/2^{+}}\sec x=\lim_{x\to\pi/2^{+}}\frac{1}{\cos x}\overset{\left[\frac{1}{0^{-}}\right]}{=}-\infty$ $\lim_{x\to\pi/2^{+}}\tan x=\lim_{x\to\pi/2^{+}}\frac{\sin x}{\cos x}\overset{\left[\frac{1}{0^{-}}\right]}{=}-\infty,$ so in both cases, we have an indeterminate limit of type $$\infty-\infty$$. Using a common denominator, we get \begin{aligned} \lim_{x\to\frac{\pi}{2}}\left(\sec x-\tan x\right) & =\lim_{x\to\frac{\pi}{2}}\left(\frac{1}{\cos x}-\frac{\sin x}{\cos x}\right)\\ & =\lim_{x\to\frac{\pi}{2}}\frac{1-\sin x}{\cos x}\left[=\frac{0}{0}\right]\\ & \overset{H}{=}\lim_{x\to\frac{\pi}{2}}\frac{-\cos x}{-\sin x}\\ & =\frac{\cos(\pi/2)}{\sin(\pi/2)}\\ & =-\frac{0}{1}\\ & =0.\end{aligned}

Example 22
Evaluate $\lim_{x\to0}\left(\frac{1}{\sin x}-\frac{1}{x}\right).$

Solution 22
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}

Example 23
Evaluate $\lim_{x\to1}\left(\frac{1}{\ln x}-\frac{1}{x-1}\right).$

Solution 23
Here we have a limit of the form $$\infty-\infty$$ (if you consider $$x\to1^{+}$$ and $$x\to1^{-}$$ separately, you will get $$\infty-\infty$$). Using a common denominator, we get \begin{aligned} \lim_{x\to1}\left(\frac{1}{\ln x}-\frac{1}{x-1}\right) & =\lim_{x\to1}\frac{x-1-\ln x}{(x-1)\ln x}\\ & \begin{equation*}=\lim_{x\to1}\frac{x-1-\ln x}{x\ln x-\ln x}\tag{0/0}\end{equation*}\end{aligned} Now we can apply l’Hôpital’s rule: \begin{aligned} \lim_{x\to1}\frac{x-1-\ln x}{x\ln x-\ln x} & \begin{equation*}\overset{H}{=}\lim_{x\to1}\frac{1-\frac{1}{x}}{\ln x-\frac{x}{x}-\frac{1}{x}}\tag{still 0/0}\end{equation*}\\ & \overset{H}{=}\lim_{x\to1}\frac{\frac{1}{x^{2}}}{\frac{1}{x}+\frac{1}{x^{2}}}\\ & =\frac{1}{1+1}=\frac{1}{2}.\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.$
Example 24
Evaluate $\lim_{x\to0^{+}}x^{x}.$

Solution 24
Let $y=x^{x};$ then $\ln y=x\ln x.$ As $$x\to0^{+}$$, $$x\ln x$$ takes on the form $$0\cdot(-\infty)$$. To find $$\lim_{x\to0^{+}}x\ln x$$, we write \begin{aligned} \lim_{x\to0^{+}}x\ln x & =\lim_{x\to0^{+}}\frac{\ln x}{\frac{1}{x}}\left[=\frac{-\infty}{+\infty}\right]\\ & \stackrel{H}{=}\lim_{x\to0^{+}}\frac{\frac{1}{x}}{-\frac{1}{x^{2}}}\\ & =\lim_{x\to0^{+}}(-x)=0.\end{aligned} Therefore, $\ln y\to0\text{ as }x\to0^{+}.$ So far we have obtained the limit of $$\ln y$$. To compute the limit of $$y$$, we use the fact that $$y=e^{\ln y}$$ and $\lim_{x\to0^{+}}y=\lim_{x\to0^{+}}e^{\ln y}$ and the continuity of the exponential function implies $\lim_{x\to0^{+}}e^{\ln y}=e^{\lim_{x\to0^{+}}\ln y}=e^{0}=1$ so $y\to1\text{ as }x\to0^{+}.$

Example 25
Evaluate $\lim_{x\to+\infty}x^{1/x}.$

Solution 25
Because $$1/x\to0$$ as $$x\to+\infty$$, we have an indeterminate limit of type $$(+\infty)^{0}$$.
Method (a): To find this limit, we can take the natural logorithm of $$x^{1/x}$$ and follow similiar steps of the previous example, $y=x^{1/x}$ $\Rightarrow\ln y=\ln\left(x^{1/x}\right)=\frac{1}{x}\ln x$ Because $$\ln x\to+\infty$$ as $$x\to+\infty$$, $$\ln x/x$$ assumes an indeterminate form $$\infty/\infty$$, and l’H�pital’s rule applies: $\lim_{x\to+\infty}\ln y=\lim_{x\to+\infty}\frac{\ln x}{x}=\lim_{x\to+\infty}\frac{\frac{1}{x}}{1}=0.$ Therefore, \begin{aligned} \lim_{x\to+\infty}y & =\lim_{x\to+\infty}e^{\ln y}\\ & =e^{\lim_{x\to+\infty}\ln y}\\ & =e^{0}=1.\end{aligned}

Method (b): Put $$u=1/x$$. Then $$u\to0^{+}$$ as $$x\to+\infty$$ and \begin{aligned} \lim_{x\to+\infty}x^{1/x} & =\lim_{u\to0^{+}}\left(\frac{1}{u}\right)^{u}\\ & =\frac{1}{\lim_{u\to0^{+}}u^{u}}\end{aligned} From the previous example, we know $$\lim_{u\to0^{+}}u^{u}=1$$. So $\lim_{x\to+\infty}x^{1/x}=\frac{1}{1}=1.$

Example 26
Evaluate $\lim_{x\to0}(1+\sin x)^{1/x}.$

Solution 26
This function assumes the indeterminate form $$1^{\pm\infty}$$. Let $y=(1+\sin x)^{1/x}$ $\Rightarrow\ln y=\frac{1}{x}\ln(1+\sin x)\quad(\ln a^{b}=b\ln a)$ and \begin{aligned} \lim_{x\to0}\ln y & =\lim_{x\to0}\frac{\ln(1+\sin x)}{x}\left[=\frac{0}{0}\right]\\ & \stackrel{H}{=}\lim_{x\to0}\frac{\cos x\ \frac{1}{1+\sin x}}{1}\\ & =\cos0\left(\frac{1}{1+\sin0}\right)\\ & =1\end{aligned} Because $$y=e^{\ln y}$$ and $$\ln y\to1$$ as $$x\to0$$, we have $y\to e^{1}=e\text{ as }x\to0.$

Evaluate $\lim_{x\to0^{+}}(\cot x)^{\sin x}.$
Because $\sin x\to0^{+}$ and $\cot x=\frac{\cos x}{\sin x}\stackrel{\left[\frac{1}{0^{+}}\right]}{\rightarrow}+\infty$ as $$x\to0^{+}$$, we have an indeterminate limit of type $$\infty^{0}$$. Let $y=(\cot x)^{\sin x}$ thus $\ln y=\sin x\ln\cot x.\quad\left[=0\cdot\infty\text{ as }x\to0^{+}\right]$ \begin{aligned} \lim_{x\to0^{+}}\sin x\ln\cot x & =\lim_{x\to0^{+}}\frac{\ln\cot x}{\frac{1}{\sin x}}\left[=\frac{+\infty}{+\infty}\right]\\ & \stackrel{H}{=}\lim_{x\to0^{+}}\frac{-(1+\cot^{2}x)\ \frac{1}{\cot x}}{-\frac{\cos x}{\sin^{2}x}}\\ & =\lim_{x\to0^{+}}\frac{-(1+\cot^{2}x)\ \frac{\sin x}{\cos x}}{-\frac{\cos x}{\sin^{2}x}}\quad (\cot x=\frac{\cos x}{\sin x})\\ & =\lim_{x\to0^{+}}\left((1+\cot^{2}x)\frac{\sin^{3}x}{\cos^{2}x}\right)\\ \\ & =\lim_{x\to0^{+}}\left(\frac{\overbrace{\cos^{2}x+\sin^{2}x}^{=1}}{\sin^{2}x}\frac{\sin^{3}x}{\cos^{2}x}\right)\quad (\text{expanding} 1+\cot^{2}x)\\ & =\lim_{x\to0^{+}}\frac{\sin x}{\cos x}=0.\end{aligned} Because $$\ln y\to0$$ as $$x\to0^{+}$$, $y=e^{\ln y}\to e^{0}=1\text{ as }x\to0.$