L’Hopital’s Rule

Page
L’Hôpital’s Rule – HMC Calculus Tutorial

Consider the limit \[\lim_{x\to a}\, \frac{f(x)}{g(x)}.\] If both the numerator and the denominator are finite at $a$ and $g(a)\neq 0$, then \[\lim_{x\to a}\, \frac{f(x)}{g(x)}=\frac{f(a)}{g(a)}.\]

Example

$\displaystyle\lim_{x\to 3}\, \frac{x^2+1}{x+2}=\frac{10}{5}=2$.

But what happens if both the numerator and the denominator tend to $0$? It is not clear what the limit is. In fact, depending on what functions $f(x)$ and $g(x)$ are, the limit can be anything at all!

Example

$\displaystyle\begin{array}{l@{\qquad\qquad}l} \displaystyle\lim_{x\to 0}\, \frac{x^3}{x^2}=\lim_{x\to 0} x=0. & \displaystyle\lim_{x\to 0}\, \frac{-x}{x^3}=\lim_{x\to 0} \frac{-1}{x^2}=-\infty.\\ \displaystyle\lim_{x\to 0}\, \frac{x}{x^2}=\lim_{x\to 0} \frac{1}{x}=\infty. & \displaystyle\lim_{x\to 0}\, \frac{kx}{x}=\lim_{x\to 0} k=k. \end{array}$

These limits are examples of indeterminate forms of type $\frac{0}{0}$. L’Hôpital’s Rule provides a method for evaluating such limits. We will denote $\displaystyle\lim_{x\to a}, \lim_{x\to a^+}, \lim_{x\to a^-}, \lim_{x\to \infty}, {\small\textrm{ and }} \lim_{x\to -\infty}$ generically by $\lim$ in what follows.

L’Hôpital’s Rule for $\displaystyle\frac{0}{0}$

Suppose $\lim f(x)=\lim g(x)=0$. Then

  1. If $\displaystyle \lim\, \frac{f'(x)}{g'(x)}=L$, then $\displaystyle \lim\, \frac{f(x)}{g(x)}=\lim \frac{f'(x)}{g'(x)}=L$.
  2. If $\displaystyle \lim\, \frac{f'(x)}{g'(x)}$ tends to $+\infty$ or $-\infty$ in the limit, then so does $\displaystyle\frac{f(x)}{g(x)}$.
Follow the image link for a complete description of the image

Consider $\displaystyle \lim_{t\to a^+}\, \frac{y(t)}{x(t)}$, where $x(a)=y(a)=0$. At time $t$, the secant line through $(x(t), y(t))$ and $(0,0)$ has slope \[\frac{y(t)-0}{x(t)-0}=\frac{y(t)}{x(t)}.\] As $t\to a^+$, $x(t)\to 0$ and $y(t)\to 0$, and we expect the secant line to approximate the tangent line at $(0,0)$ better and better. In the limit as $t\to a^+$, \[{\small\textrm{slope of tangent at $(0,0)$}} = \lim_{t\to a^+}\, \frac{y(t)}{x(t)}.\] But we can also calculate the slope of the tangent line at $(0,0)$ as

\[{\small\textrm{slope of tangent at $(0,0)$}} = \left.\frac{dy}{dx}\right|_{x=0}=\frac{dy/dt|_{y=0}}{dx/dt|_{x=0}}=\lim_{t\to a^+} \frac{y'(t)}{x'(t)}.\] Thus, \[\lim_{t\to a^+}\frac{y(t)}{x(t)}=\lim_{t\to a^+}\frac{y'(t)}{x'(t)}.\] This is an informal geometrical interpretation, and certainly not a proof, of L’Hôpital’s Rule. However, it does give us insight into the formal statement of the rule.

We will use an extension of the Mean Value Theorem:

Extended (Cauchy) Mean Value Theorem

Let $f$ and $g$ be differentiable on $(a,b)$ and continuous on $[a,b]$. Suppose that $g'(x)\neq 0$ in $(a,b)$. Then there is at least one point $c$ in $(a,b)$ such that \[\frac{f'(c)}{g'(c)}=\frac{f(b)-f(a)}{g(b)-g(a)}.\] The proof of this theorem is fairly simple and can be found in most calculus texts.

We will now sketch the proof of L’Hôpital’s Rule for the $\frac{0}{0}$ case in the limit as $x\to c^+$, where $c$ is finite. The case $x\to c^-$ can be proven in a similar manner, and these two cases together can be used to prove L’Hôpital’s Rule for a two-sided limit. This proof is taken from Salas and Hille’s Calculus: One Variable.

Let $f$ and $g$ be defined on an interval $(c,b)$, where $f(x)\to 0$ and $g(x)\to 0$ as $x\to c^+$ but $\displaystyle \frac{f'(x)}{g'(x)}$ tends to a finite limit $L$. Then $f’$ and $g’$ exist on some set $(c, c+g]$ and $g’\neq 0$ on $(c, c+h]$. Also, $f$ and $g$ are continuous on $[c,c+h]$, where we define $f(c)=0$ and $g(c)=0$.

By the Extended Mean Value Theorem, there exists $c_h\in (c,c+h)$ such that \[\frac{f'(c_h)}{g'(c_h)}=\frac{f(c+h)-f(c)}{g(c+h)-g(c)}=\frac{f(c+h)} {g(c+h)}\] since $f(c)=g(c)=0$. Letting $h\to 0^+$, $\displaystyle \lim_{h\to 0^+}\, \frac{f'(c_h)}{g'(c_h)}=\lim_{x\to c^+}\, \frac{f'(x)}{g'(x)}$ while $\displaystyle \lim_{h\to 0^+}\, \frac{f(c+h)}{g(c+h)}=\lim_{x\to c^+}\, \frac{f(x)}{g(x)}$. Thus, \[\lim_{x\to c^+}\frac{f(x)}{g(x)}=\lim_{x\to c^+} \frac{f'(x)}{g'(x)}.\]

Example
  • $\displaystyle \lim_{x\to 0}\, \frac{\sin x}{x}=\lim_{x\to 0}\, \frac{\frac{d}{dx}(\sin x)}{\frac{d}{dx}(x)}=\lim_{x\to 0}\, \frac{\cos x}{1}=1.$
  • $\displaystyle \lim_{x\to 1}\, \frac{2\ln x}{x-1}=\lim_{x\to 1}\, \frac{\frac{d}{dx}(2\ln x)}{\frac{d}{dx}(x-1)}=\lim_{x\to 1}\, \frac{~\frac{2}{x}~}{1}=2.$
  • $\displaystyle \lim_{x\to 0}\, \frac{e^x-1}{x^2}=\lim_{x\to 0}\, \frac{\frac{d}{dx}(e^x-1)}{\frac{d}{dx}(x^2)}=\lim_{x\to 0}\, \frac{e^x}{2x}=\text{does not exist}.$

If the numerator and the denominator both tend to $\infty$ or $-\infty$, L’Hôpital’s Rule still applies.

L’Hôpital’s Rule for $\displaystyle\frac{\infty}{\infty}$

Suppose $\lim f(x)$ and $\lim g(x)$ are both infinite. Then

  1. If $\displaystyle \lim\, \frac{f'(x)}{g'(x)}=L$, then $\displaystyle \lim\, \frac{f(x)}{g(x)}=\lim \frac{f'(x)}{g'(x)}=L$.
  2. If $\displaystyle \lim\, \frac{f'(x)}{g'(x)}$ tends to $+\infty$ or $-\infty$ in the limit, then so does $\displaystyle\frac{f(x)}{g(x)}$.

The proof of this form of L’Hôpital’s Rule requires more advanced analysis.

Here are some examples of indeterminate forms of type $\displaystyle\frac{\infty}{\infty}$.

Example

$\displaystyle\lim_{x\to\infty} \frac{e^x}{x}=\lim_{x\to\infty} \frac{e^x}{1}=\infty.$

Sometimes it is necessary to use L’Hôpital’s Rule several times in the same problem:

Example

$\displaystyle\lim_{x\to 0} \frac{1-\cos x}{x^2}=\lim_{x\to 0}\frac{\sin x}{2x}=\lim_{x\to 0}\frac{\cos x}{2}=\frac{1}{2}.$

Occasionally, a limit can be re-written in order to apply L’Hôpital’s Rule:

Example

$\displaystyle\lim_{x\to 0}\, x\ln x=\lim_{x\to 0}\frac{\ln x}{\frac{1}{x}}=\lim_{x\to 0}\, \frac{~\frac{1}{x}~}{-\frac{1}{x^2}}=\lim_{x\to 0}\, (-x)=0.$

We can use other tricks to apply L’Hôpital’s Rule. In the next example, we use L’Hôpital’s Rule to evaluate an indeterminate form of type $0^0$:

Example

To evaluate $\displaystyle \lim_{x\to 0^+}\, x^x$, we will first evaluate $\displaystyle \lim_{x\to 0^+}\, \ln (x^x)$. \[\lim_{x\to 0^+}\, \ln (x^x)=\lim_{x\to 0^+}\, x\ln (x)=0,\quad {\small\textrm{ by the previous example}}.\] Then since $\displaystyle\lim_{x\to 0^+}\, \ln (x^x)\to 0$ as $x\to 0^+$ and $\ln (u)=0$ if and only if $u=1$, \[x^x\to 1 \quad\textrm{as}\quad x\to 0^+.\] Thus, \[\lim_{x\to 0^+}\, x^x=1.\]

Notice that L’Hôpital’s Rule only applies to indeterminate forms. For the limit in the first example of this tutorial, L’Hôpital’s Rule does not apply and would give an incorrect result of 6. L’Hôpital’s Rule is powerful and remarkably easy to use to evaluate indeterminate forms of type $\frac{0}{0}$ and $\frac{\infty}{\infty}$.


Key Concepts

L’Hôpital’s Rule for $\frac{0}{0}$

Suppose $\lim f(x) = \lim g(x) = 0$. Then

  1. If $\displaystyle\lim \frac{f'(x)}{g'(x)} = L,$ then $\displaystyle\lim \frac{f(x)}{g(x)} = \displaystyle\lim \frac{f'(x)}{g'(x)} = L$.
  2. If $\displaystyle\lim \frac{f'(x)}{g'(x)}$ tends to $+\infty$ or $-\infty$ in the limit, then so does $\frac{f(x)}{g(x)}$.

L’Hôpital’s Rule for $\frac{\infty}{\infty}$
Suppose $\lim f(x)$ and $\lim g(x)$ are both infinite. Then

  1. If $\displaystyle\lim \frac{f'(x)}{g'(x)} = L$, then $\displaystyle\lim \frac{f(x)}{g(x)} = \displaystyle\lim \frac{f'(x)}{g'(x)} = L$.
  2. If $\displaystyle\lim \frac{f'(x)}{g'(x)}$ tends to $+\infty$ or $-\infty$ in the limit, then so does $\frac{f(x)}{g(x)}$.

[I’m ready to take the quiz.] [I need to review more.]