4.6 L’H\(\hat {\text {o}}\)pital’s Rule

We know from the algebra of limits that if \(\lim _{x\rightarrow a} f(x) = L\) and \(\lim _{x\rightarrow a} g(x) = M\), then \(\lim _{x\rightarrow a} \frac {f(x)}{g(x)} = \frac {L}{M}\) as long as \(M\neq 0\). If \(L = 0\) and \(M = 0\), the algebra of limits does not apply, and we need L’H\(\hat {\text {o}}\)pital’s Rule.

Theorem 4.6.1 (L’H\(\hat {\text {o}}\)pital’s Rule). Let \(n\geq 1\), and suppose that \(f\) and \(g\) have continuous derivatives up to order \(n\) on an open interval \((a,b)\) containing \(\alpha \). Suppose that

(i)
\(f(\alpha ) = f'(\alpha ) = \dots = f^{(n-1)}(\alpha ) = 0\);
(ii)
\(g(\alpha ) = g'(\alpha ) = \dots = g^{(n-1)}(\alpha ) = 0\);
(iii)
\(g^{(n)}(\alpha ) \neq 0\).

Then \(\displaystyle \lim _{x\rightarrow \alpha } \frac {f(x)}{g(x)} = \frac {f^{(n)}(\alpha )}{g^{(n)}(\alpha )}\).

Proof. Since \(g^{(n)}\) is continuous and \(g^{(n)}(\alpha ) \neq 0\), there is some \(r> 0\) with \((\alpha - r, \alpha + r)\subseteq (a,b)\) and \(g^{(n)}(t)\neq 0\) for all \(t\in (\alpha - r, \alpha + r)\). Let \(0 < |x - \alpha | < r\). By Taylor’s Theorem, using (i) and (ii), there are points \(c\) and \(d\) strictly between \(\alpha \) and \(x\) such that \[f(x) = \frac {f^{(n)}(c) (x - \alpha )^n}{n!}, \qquad g(x) = \frac {g^{(n)}(d) (x - \alpha )^n}{n!} .\] Since \(|d-\alpha |<r\), \(g^{(n)}(d)\neq 0\), and so \(g(x)\neq 0\). Therefore, for \(0< |x - \alpha | < r\), \begin {equation} \label {eq:lhratio} \frac {f(x)}{g(x)} = \frac {f^{(n)}(c)}{g^{(n)}(d)} . \end {equation} As \(x\longrightarrow \alpha \), also \(c\longrightarrow \alpha \) and \(d\longrightarrow \alpha \), because \(c\) and \(d\) lie between \(\alpha \) and \(x\). By the continuity of \(f^{(n)}\) and \(g^{(n)}\), \(f^{(n)}(c)\longrightarrow f^{(n)}(\alpha )\) and \(g^{(n)}(d)\longrightarrow g^{(n)}(\alpha )\neq 0\). Hence, from (4.10), \(\lim _{x\rightarrow \alpha } \frac {f(x)}{g(x)} = \frac {f^{(n)}(\alpha )}{g^{(n)}(\alpha )}\).

Note that the points \(c\) and \(d\) given by Taylor’s Theorem depend on the function as well as on \(x\), so in general \(c\neq d\); that is why two different letters are needed. □

Example 4.6.2. Evaluate (a) \(\displaystyle \lim _{x\rightarrow 0} \frac {\cos x - 1}{x^2}\) and (b) \(\displaystyle \lim _{x \rightarrow 0} \frac {e^{x^2} - 1}{\sin x^2}\).

Solution. (a) Let \(f(x) = \cos x - 1\) and \(g(x) = x^2\); all their derivatives are continuous on \(\mathbb {R}\). We first find the order \(n\) at which \(g\) stops vanishing at \(0\): \[g(0) = 0,\qquad g'(0) = 0,\qquad g''(0) = 2\neq 0,\] so \(n = 2\). Check that \(f\) vanishes to the same order: \(f(0) = 0\), \(f'(x) = -\sin x\) gives \(f'(0) = 0\), and \(f''(x) = -\cos x\) gives \(f''(0) = -1\). Hence \[\lim _{x\rightarrow 0} \frac {\cos x - 1}{x^2} = \frac {f''(0)}{g''(0)} = -\frac {1}{2} .\]

(b) Let \(f(x) = e^{x^2} - 1\) and \(g(x) = \sin x^2\). Then \begin {align*} f'(x) &= 2x e^{x^2}, & f''(x) &= (2+4x^2)e^{x^2},\\ g'(x) &= 2x\cos x^2, & g''(x) &= 2\cos x^2 - 4x^2\sin x^2 , \end {align*}

so \(f(0) = f'(0) = 0 = g(0) = g'(0)\), and \(f''(0) = 2\), \(g''(0) = 2\neq 0\). Hence the limit is \(\frac {2}{2} = 1\).

Example 4.6.3. Evaluate (a) \(\displaystyle \lim _{x\rightarrow 0}\frac {x - \sin x}{x^3}\); (b) \(\displaystyle \lim _{x\rightarrow 0}\frac {e^x - 1 - x}{x^2}\); (c) \(\displaystyle \lim _{x\rightarrow 0}\frac {1-\cos x}{x\sin x}\).

Solution. (a) With \(f(x) = x - \sin x\) and \(g(x) = x^3\): \(g(0) = g'(0) = g''(0) = 0\) and \(g'''(0) = 6\), so \(n = 3\). Also \(f(0) = 0\), \(f'(x) = 1 - \cos x\), \(f''(x) = \sin x\) and \(f'''(x) = \cos x\), which give \(f'(0) = f''(0) = 0\) and \(f'''(0) = 1\). The limit is \(\frac {1}{6}\).

(b) With \(f(x) = e^x - 1 - x\) and \(g(x) = x^2\): \(n = 2\), \(f'(x) = e^x - 1\) and \(f''(x) = e^x\), so \(f(0) = f'(0) = 0\) and \(f''(0) = 1\). The limit is \(\frac {1}{2}\).

(c) With \(f(x) = 1 - \cos x\) and \(g(x) = x\sin x\): \(g'(x) = \sin x + x\cos x\) and \(g''(x) = 2\cos x - x\sin x\), so \(g(0) = g'(0) = 0\) and \(g''(0) = 2\). Also \(f'(0) = \sin 0 = 0\) and \(f''(0) = \cos 0 = 1\). The limit is \(\frac {1}{2}\).

Example 4.6.4. Explain why the rule must be applied with the right \(n\), using \(\displaystyle \lim _{x\rightarrow 0}\frac {x^2}{\sin x}\).

Solution. Let \(f(x) = x^2\) and \(g(x) = \sin x\). Here \(g(0) = 0\) but \(g'(0) = 1\neq 0\), so \(n = 1\). We need \(f(0) = 0\), which holds, and the rule gives \(\frac {f'(0)}{g'(0)} = \frac {0}{1} = 0\). It would be wrong to differentiate a second time: \(\frac {f''(0)}{g''(0)} = \frac {2}{0}\) is meaningless. The number of differentiations is fixed by the first derivative of \(g\) that does not vanish at \(\alpha \), and \(f\) and its earlier derivatives must vanish there.

Questions on this section

Stuck on something here? Ask below and it stays attached to this topic.