Calculus – Differentiation – L'Hospital's rule
The rule is named after the French mathematician Guillaume François Antoine, Marquis de l'Hôpital (1661-1704), also spelled as "Marquis de l'Hospital".
Theorem: If \(f(a)=0=g(a)\), then we have
\[\lim_{x\to a}\frac{f(x)}{g(x)}=\lim_{x\to a}\frac{f'(x)}{g'(x)}\]provided that this limit exists.
This version is relatively easy to prove if \(f\) and \(g\) are differentiable at \(a\) and the derivatives of \(f\) and \(g\) are continuous at \(a\).
Proof: If \(f(a)=0=g(a)\), then we have
\[\lim_{x\to a}\frac{f(x)}{g(x)}=\lim_{x\to a}\frac{f(x)-f(a)}{g(x)-g(a)} =\lim_{x\to a}\frac{\displaystyle\frac{f(x)-fa)}{x-a}}{\displaystyle\frac{g(x)-g(a)}{x-a}}=\frac{f'(a)}{g'(a)}=\lim_{x\to a}\frac{f'(x)}{g'(x)}\]if \(f\) and \(g\) are differentiable at \(a\) and if \(f'\) and \(g'\) are continuous at \(a\).
A more general version is:
Theorem: Suppose that \(f\) and \(g\) are differentiable and \(g'(x)\neq0\) on an open interval \(I\) that contains \(a\) (except possibly \(a\) itself). If
\[\lim_{x\to a}f(x)=0=\lim_{x\to a}g(x),\]then
\[\lim_{x\to a}\frac{f(x)}{g(x)}=\lim_{x\to a}\frac{f'(x)}{g'(x)}\]provided that this limit exists.
Proof: Assume that \(\displaystyle\lim_{x\to a}f(x)=0=\lim_{x\to a}g(x)\) and let \(L=\displaystyle\lim\limits_{x\to a}\frac{f'(x)}{g'(x)}\). Define
\[F(x)=\left\{\begin{array}{ll}f(x),&x\neq a\\[2.5mm]0,&x=a\end{array}\right.\quad\textrm{and}\quad G(x)=\left\{\begin{array}{ll}g(x),&x\neq a\\[2.5mm]0,&x=a.\end{array}\right.\]Then \(F\) is continuous on \(I\), since \(F\) is continuous on \(I\setminus\{a\}\) and \(\displaystyle\lim\limits_{x\to a}F(x)=\lim\limits_{x\to a}f(x)=0=F(a)\). Likewise, \(G\) is continuous on \(I\). Let \(x\in I\) with \(x > a\). Then \(F\) and \(G\) are continuous on \([a,x]\) and differentiable on \((a,x)\) and \(G'\neq0\) there, since \(F'=f'\) and \(G'=g'\). Then Cauchy's mean value theorem implies that there exists a number \(y\) such that \(a < y < x\) and
\[\frac{F'(y)}{G'(y)}=\frac{F(x)-F(a)}{G(x)-G(a)}=\frac{F(x)}{G(x)},\]since \(F(a)=0=G(a)\). Now if we let \(x\downarrow a\), then \(y\downarrow a\) since \(a < y < x\), so
\[\lim\limits_{x\downarrow a}\frac{f(x)}{g(x)}=\lim\limits_{x\downarrow a}\frac{F(x)}{G(x)}=\lim\limits_{x\downarrow a}\frac{F'(y)}{G'(y)} =\lim\limits_{x\downarrow a}\frac{f'(y)}{g'(y)}=L.\]A similar argument shows that the left limit is also \(L\). Therefore \(\displaystyle\lim\limits_{x\to a}\frac{f(x)}{g(x)}=L\), which proves the theorem.
The theorem also holds for \(a=\pm\infty\). For instance, using \(x=\displaystyle\frac{1}{t}\) we obtain
\[\lim\limits_{x\to\infty}\frac{f(x)}{g(x)}=\lim\limits_{t\downarrow0}\frac{f(1/t)}{g(1/t)} =\lim\limits_{t\downarrow0}\frac{f'(1/t)\cdot(-1/t^2)}{g'(1/t)\cdot(-1/t^2)}=\lim\limits_{t\downarrow0}\frac{f'(1/t)}{g'(1/t)} =\lim\limits_{a\to\infty}\frac{f'(x)}{g'(x)}.\]Furthermore, the theorem also holds if \(\displaystyle\lim_{x\to a}f(x)=\pm\infty=\lim_{x\to a}g(x)\) and for one-sided limits.
The number \(e\) as a limit
The number \(e\) is defined as the number such that the graph of \(y=e^x\) has a slope \(1\) at the point \((0,1)\), this is
\[\lim\limits_{x\to 0}\frac{e^x-1}{x}=1.\]Let \(f(x)=\ln(x)\), then \(f'(x)=\displaystyle\frac{1}{x}\). This implies that \(f'(1)=1\). Using the definition of a derivative we have
\[1=\lim\limits_{x\to 0}\frac{\ln(1+x)-\ln(1)}{x}=\lim\limits_{x\to 0}\frac{1}{x}\ln(1+x)=\lim\limits_{x\to 0}\ln(1+x)^{\frac{1}{x}}.\]This implies that \(e=\displaystyle\lim\limits_{x\to 0}(1+x)^{\frac{1}{x}}\). This limit can now be evaluated as follows:
\[\lim\limits_{x\to 0}(1+x)^{\frac{1}{x}}=\lim\limits_{x\to 0}e^{\frac{1}{x}\ln(1+x)}=e^{\lim\limits_{x\to 0}\frac{\ln(1+x)}{x}}\]using the continuity of the exponential function. Now we have using l'Hospital's rule
\[\lim\limits_{x\to 0}\frac{\ln(1+x)}{x}=\lim\limits_{x\to 0}\frac{\displaystyle\frac{1}{1+x}}{1}=1.\]This implies that \(\displaystyle\lim\limits_{x\to 0}(1+x)^{\frac{1}{x}}=e^1=e\). Using the substitution \(t=\displaystyle\frac{1}{x}\) we also obtain that
\[\lim\limits_{t\to\infty}\left(1+\frac{1}{t}\right)^t=\lim\limits_{x\downarrow0}=(1+x)^{\frac{1}{x}}=e.\]Examples
| 1) \(\displaystyle\lim\limits_{x\to 0}\frac{\sin(x)}{x}=\lim\limits_{x\to 0}\frac{\cos(x)}{1}=\cos(0)=1\). | 2) \(\displaystyle\lim\limits_{x\to 0}\frac{e^x-1}{x}=\lim\limits_{x\to 0}\frac{e^x}{1}=e^0=1\). |
| 3) \(\displaystyle\lim\limits_{x\to 1}\frac{\ln(x)}{x-1}=\lim\limits_{x\to 1}\frac{\displaystyle\frac{1}{x}}{1}=1\). | 4) \(\displaystyle\lim\limits_{x\to 0}\frac{1-\cos(x)}{x^2}=\lim\limits_{x\to 0}\frac{\sin(x)}{2x}=\lim\limits_{x\to 0}\frac{\cos(x)}{2}=\frac{\cos(0)}{2}=\frac{1}{2}\). |
| 5) \(\displaystyle\lim\limits_{x\to 0}\frac{e^x-1-x-\frac{1}{2}x^2-\frac{1}{6}x^3}{x^4}=\lim\limits_{x\to 0}\frac{e^x-1-x-\frac{1}{2}x^2}{4x^3}=\lim\limits_{x\to 0}\frac{e^x-1-x}{12x^2}=\lim\limits_{x\to 0}\frac{e^x-1}{24x}=\lim\limits_{x\to 0}\frac{e^x}{24}=\frac{1}{24}\). | |
| 6) \(\displaystyle\lim\limits_{x\to 0}\frac{\tan(x)-x}{x^3}=\lim\limits_{x\to 0}\frac{\displaystyle\frac{1}{\cos^2(x)}-1}{3x^2}=\lim\limits_{x\to 0}\frac{\displaystyle\frac{2\sin(x)}{\cos^3(x)}}{6x}=\lim\limits_{x\to 0}\frac{\displaystyle\frac{2\cos^4(x)+6\sin^2(x)\cos^2(x)}{\cos^6(x)}}{6}=\lim\limits_{x\to 0}\frac{2\cos^2(x)+6\sin^2(x)}{6\cos^4(x)}=\frac{1}{3}\). | |
| 7) \(\displaystyle\lim\limits_{x\to 1}\left(\frac{1}{\ln(x)}-\frac{1}{x-1}\right)=\lim\limits_{x\to 1}\frac{x-1-\ln(x)}{(x-1)\ln(x)}=\lim\limits_{x\to 1}\frac{1-\displaystyle\frac{1}{x}}{\displaystyle(x-1)\cdot\frac{1}{x}+\ln(x)}=\lim\limits_{x\to 1}\frac{x-1}{x-1+x\ln(x)}=\lim\limits_{x\to 1}\frac{1}{2+\ln(x)}=\frac{1}{2}\). | |
| 8) \(\displaystyle\lim\limits_{x\to\infty}x^5e^{-x}=\lim\limits_{x\to\infty}\frac{x^5}{e^x}=\lim\limits_{x\to\infty}\frac{5x^4}{e^x}=\cdots=\lim\limits_{x\to\infty}\frac{5!}{e^x}=0\). | 9) \(\displaystyle\lim\limits_{x\to\infty}\frac{x^3}{e^{x^2}}=\lim\limits_{x\to\infty}\frac{3x^2}{2xe^{x^2}}=\lim\limits_{x\to\infty}\frac{3x}{2e^{x^2}}=\lim\limits_{x\to\infty}\frac{3}{4xe^{x^2}}=0\). |
| 10) \(\displaystyle\lim\limits_{x\to 0}(1-2x)^{\frac{1}{x}}=\lim\limits_{x\to 0}e^{\frac{1}{x}\ln(1-2x)}=e^{\lim\limits_{x\to 0}\frac{\ln(1-2x)}{x}}=e^{-2}\), since \(\displaystyle\lim\limits_{x\to 0}\frac{\ln(1-2x)}{x}=\lim\limits_{x\to 0}\frac{\displaystyle\frac{-2}{1-2x}}{1}=-2\). | |
Stewart §4.4, Exercise 75
What happens if you try to use l'Hospital's rule to find the limit \(\displaystyle\lim\limits_{x\to\infty}\frac{x}{\sqrt{x^2+1}}\)?
Evaluate the limit using another method.
Solution: Using l'Hospital's rule we obtain
\[\lim\limits_{x\to\infty}\frac{x}{\sqrt{x^2+1}}=\lim\limits_{x\to\infty}\frac{1}{\displaystyle\frac{2x}{2\sqrt{x^2+1}}} =\lim\limits_{x\to\infty}\frac{\sqrt{x^2+1}}{x}.\]However, if we divide the numerator and the denominator by \(\sqrt{x^2}=|x|=x\) we obtain
\[\lim\limits_{x\to\infty}\frac{x}{\sqrt{x^2+1}}=\lim\limits_{x\to\infty}\frac{1}{\sqrt{1+\displaystyle\frac{1}{x^2}}}=\frac{1}{\sqrt{1+0}}=1.\]Last modified on October 28, 2021
Teaching

