Skip to main content

Subsection 3.7.2 Standard Examples

Here are some simple examples using L'Hôpital's rule.

Consider the limit

\begin{gather*} \lim_{x\to 0} \frac{\sin x}{x} \end{gather*}
  • Notice that
    \begin{align*} \lim_{x\to 0} \sin x &= 0\\ \lim_{x\to 0} x &= 0 \end{align*}
    so this is a \(\frac00\) indeterminate form, and suggests we try l'Hôpital's rule.
  • To apply the rule we must first check the limits of the derivatives.
    \begin{align*} f(x)&= \sin x & f'(x) & =\cos x & \text{and} && f'(0)=1\\ g(x) &= x & g'(x) & = 1 & \text{and} && g'(0)=1 \end{align*}
  • So by l'Hôpital's rule
    \begin{align*} \lim_{x\to 0} \frac{\sin x}{x} &= \frac{f'(0)}{g'(0)} = \frac{1}{1} = 1. \end{align*}

Consider the limit

\begin{gather*} \lim_{x\to 0} \frac{\sin(x)}{\sin(2x)} \end{gather*}
  • First check
    \begin{align*} \lim_{x\to 0} \sin 2x &= 0\\ \lim_{x\to 0} \sin x &= 0 \end{align*}
    so we again have a \(\frac00\) indeterminate form.
  • Set \(f(x)=\sin x\) and \(g(x)=\sin 2x\text{,}\) then
    \begin{align*} f'(x) &= \cos x & f'(0)= 1\\ g'(x) &= 2\cos 2x & g'(0)= 2 \end{align*}
  • And by l'Hôpital's rule
    \begin{align*} \lim_{x\to 0} \frac{\sin x}{\sin 2x} &= \frac{f'(0)}{g'(0)} = \frac{1}{2}. \end{align*}

Let \(q \gt 1\) and compute the limit

\begin{gather*} \lim_{x \to0} \frac{q^x - 1}{x} \end{gather*}

This limit arose in our discussion of exponential functions in Section 2.7.

  • First check
    \begin{align*} \lim_{x \to 0} (q^x-1) & = 1-1 = 0\\ \lim_{x \to 0} x & = 0 \end{align*}
    so we have a \(\frac00\) indeterminate form.
  • Set \(f(x)= q^x-1\) and \(g(x)=x\text{,}\) then (maybe after a quick review of Section 2.7)
    \begin{align*} f'(x) &= \diff{}{x}\left(q^x-1\right) = q^x \cdot \log q & f'(0) &= \log q\\ g'(x) &= 1 & g'(0) &= 1 \end{align*}
  • And by l'Hôpital's rule  3 While it might not be immediately obvious, this example relies on circular reasoning. In order to apply l'Hôpital's rule, we need to compute the derivative of \(q^x\text{.}\) However in order to compute that limit (see Section 2.7) we needed to evaluate this limit.
    \begin{equation*} \mbox{ } \end{equation*}
    A more obvious example of this sort of circular reasoning can be seen if we use l'Hôpital's rule to compute the derivative of \(f(x)=x^n\) at \(x=a\) using the limit
    \begin{equation*} f'(a) = \lim_{x \to a} \frac{x^n -a^n}{x-a} = \lim_{x \to a} \frac{n x^{n-1}-0}{1-0} = n a^{n-1}. \end{equation*}
    We have used the result \(\diff{}{x} x^n = nx^{n-1}\) to prove itself!
    \begin{align*} \lim_{h \to0} \frac{q^h - 1}{h} &= \log q. \end{align*}

In this example, we shall apply L'Hôpital's rule twice before getting the answer.

Compute the limit

\begin{gather*} \lim_{x\to 0} \frac{\sin(x^2)}{1-\cos x} \end{gather*}
  • Again we should check
    \begin{align*} \lim_{x\to 0} \sin(x^2) &= \sin 0 = 0\\ \lim_{x\to 0}(1-\cos x) &= 1-\cos 0 = 0 \end{align*}
    and we have a \(\frac00\) indeterminate form.
  • Let \(f(x) = \sin(x^2)\) and \(g(x)=1-\cos x\) then
    \begin{align*} f'(x) &= 2x\cos(x^2) & f'(0)&=0\\ g'(x) &= \sin x & g'(0) &=0 \end{align*}
    So if we try to apply l'Hôpital's rule naively we will get
    \begin{align*} \lim_{x\to 0} \frac{\sin(x^2)}{1-\cos x} &= \frac{f'(0)}{g'(0)} = \frac{0}{0}. \end{align*}
    which is another \(\frac00\) indeterminate form.
  • It appears that we are stuck until we remember that l'Hôpital's rule (as stated in Theorem 3.7.2) has a part (b) — now is a good time to reread it.
  • It says that
    \begin{align*} \lim_{x\to 0} \frac{f(x)}{g(x)} &= \lim_{x\to 0} \frac{f'(x)}{g'(x)} \end{align*}
    provided this second limit exists. In our case this requires us to compute
    \begin{gather*} \lim_{x \to 0} \frac{2x \cos(x^2)}{\sin(x)} \end{gather*}
    which we can do using l'Hôpital's rule again. Now
    \begin{align*} h(x) &= 2x\cos(x^2) & h'(x) &= 2\cos(x^2) - 4x^2\sin(x^2) & h'(0) &=2\\ \ell(x) &= \sin(x) & \ell'(x) &= \cos(x) & \ell'(0) &= 1 \end{align*}
    By l'Hôpital's rule
    \begin{align*} \lim_{x \to 0} \frac{2x \cos(x^2)}{\sin(x)} &= \frac{h'(0)}{\ell'(0)} = 2 \end{align*}
  • Thus our original limit is
    \begin{align*} \lim_{x\to 0} \frac{\sin(x^2)}{1-\cos x} &=\lim_{x \to 0} \frac{2x \cos(x^2)}{\sin(x)} = 2. \end{align*}
  • We can succinctly summarise the two applications of L'Hôpital's rule in this example by
    \begin{align*} \lim_{x\to 0}\underbrace{\frac{\sin(x^2)}{1-\cos x}}_{\atp {\mathrm{num}\to 0} {\mathrm{den}\to 0}} &=\lim_{x\to 0}\underbrace{\frac{2x\cos(x^2)}{\sin x}}_{\atp {\mathrm{num}\to 0} {\mathrm{den}\to 0}} =\lim_{x\to 0}\underbrace{\frac{2\cos(x^2)-4x^2\sin(x^2)}{\cos x}}_{\atp {\mathrm{num}\to 2} {\mathrm{den}\to 1}} =2 \end{align*}
    Here “num” and “den” are used as abbreviations of “numerator” and “denominator” respectively."

One must be careful to ensure that the hypotheses of l'Hôpital's rule are satisfied before applying it. The following “warnings” show the sorts of things that can go wrong.

Warning 3.7.7 Denominator limit nonzero

If

\begin{align*} \lim\limits_{x\rightarrow a}f(x)&=0 & \text{but}&& \lim\limits_{x\rightarrow a}g(x)&\ne 0 \end{align*}

then

\begin{align*} \lim\limits_{x\rightarrow a}\frac{f(x)}{g(x)} && \text{need not be the same as} && \frac{f'(a)}{g'(a)} \text{ or } \lim\limits_{x\rightarrow a}\frac{f'(x)}{g'(x)}. \end{align*}

Here is an example. Take

\begin{gather*} a=0\qquad f(x)=3x \qquad g(x)=4+5x \end{gather*}

Then

\begin{align*} \lim_{x\rightarrow 0}\frac{f(x)}{g(x)} &=\lim_{x\rightarrow 0}\frac{3x}{4+5x} & &=\frac{3\times 0}{4+5\times 0} =0\\ \lim_{x\rightarrow 0}\frac{f'(x)}{g'(x)} &= \frac{f'(0)}{g'(0)} =\frac{3}{5} \end{align*}
Warning 3.7.8 Numerator limit nonzero

If

\begin{align*} \lim\limits_{x\rightarrow a}g(x)&=0 &\text{but}&& \lim\limits_{x\rightarrow a}f(x)&\ne 0 \end{align*}

then

\begin{align*} \lim\limits_{x\rightarrow a}\frac{f(x)}{g(x)} && \text{need not be the same as} && \lim\limits_{x\rightarrow a}\frac{f'(x)}{g'(x)}. \end{align*}

Here is an example. Take

\begin{gather*} a=0\qquad \qquad f(x)=4+5x \qquad g(x)=3x \end{gather*}

Then

\begin{align*} \lim_{x\rightarrow 0}\frac{f(x)}{g(x)} &=\lim_{x\rightarrow 0}\frac{4+5x}{3x} & &=\text{DNE}\\ \lim_{x\rightarrow 0}\frac{f'(x)}{g'(x)} &=\lim_{x\rightarrow 0}\frac{5}{3} =\frac{5}{3} \end{align*}

This next one is more subtle; the limits of the original numerator and denominator functions both go to zero, but the limit of the ratio their derivatives does not exist.

Warning 3.7.9 Limit of ratio of derivatives DNE

If

\begin{align*} \lim\limits_{x\rightarrow a}f(x)&=0 & \text{and}&& \lim\limits_{x\rightarrow a}g(x) &= 0 \end{align*}

but

\begin{align*} \lim\limits_{x\rightarrow a}\frac{f'(x)}{g'(x)} & \text{ does not exist} \end{align*}

then it is still possible that

\begin{align*} \lim\limits_{x\rightarrow a}\frac{f(x)}{g(x)} & \text{ exists.} \end{align*}

Here is an example. Take

\begin{gather*} a=0\qquad \qquad f(x)=x^2\sin\frac{1}{x} \qquad g(x)= x \end{gather*}

Then (with an application of the squeeze theorem)

\begin{align*} \lim_{x\to 0} f(x) &= 0 & \text{and}&& \lim_{x\to 0} g(x) &= 0. \end{align*}

If we attempt to apply l'Hôptial's rule then we have \(g'(x)=1\) and

\begin{align*} f'(x)&=2x\sin\frac{1}{x} -\cos\frac{1}{x}\\ \end{align*}

and we then try to compute the limit

\begin{align*} \lim_{x\to 0} \frac{f'(x)}{g'(x)} &= \lim_{x\to 0} \left( 2x\sin\frac{1}{x} -\cos\frac{1}{x}\right) \end{align*}

However, this limit does not exist. The first term converges to 0 (by the squeeze theorem), but the second term \(\cos(1/x)\) just oscillates wildly between \(\pm 1\text{.}\) All we can conclude from this is

Since the limit of the ratio of derivatives does not exist, we cannot apply l'Hôpital's rule.

Instead we should go back to the original limit and apply the squeeze theorem:

\begin{align*} \lim_{x\rightarrow 0}\frac{f(x)}{g(x)} &=\lim_{x\rightarrow 0}\frac{x^2\sin\frac{1}{x} }{x} =\lim_{x\rightarrow 0} x\sin\frac{1}{x} = 0, \end{align*}

since \(|x\sin(1/x)| \lt |x|\) and \(|x| \to 0\) as \(x\to 0\text{.}\)

It is also easy to construct an example in which the limits of numerator and denominator are both zero, but the limit of the ratio and the limit of the ratio of the derivatives do not exist. A slight change of the previous example shows that it is possible that

\begin{align*} \lim\limits_{x\rightarrow a}f(x) &=0 & \text{and}&& \lim\limits_{x\rightarrow a}g(x) &= 0 \end{align*}

but neither of the limits

\begin{align*} \lim\limits_{x\rightarrow a}\frac{f(x)}{g(x)} && \text{or}&& \lim\limits_{x\rightarrow a}\frac{f'(x)}{g'(x)} \end{align*}

exist. Take

\begin{gather*} a=0\qquad \qquad f(x)=x\sin\frac{1}{x} \qquad g(x)= x \end{gather*}

Then (with a quick application of the squeeze theorem)

\begin{align*} \lim_{x\to 0} f(x) &= 0 & \text{and}&& \lim_{x\to 0} g(x) &= 0. \end{align*}

However,

\begin{align*} \lim_{x\rightarrow 0}\frac{f(x)}{g(x)} &=\lim_{x\rightarrow 0}\frac{x\sin\frac{1}{x} }{x} =\lim_{x\rightarrow 0} \sin\frac{1}{x} \end{align*}

does not exist. And similarly

\begin{align*} \lim_{x\rightarrow 0}\frac{f'(x)}{g'(x)} &= \lim_{x\to 0} \frac{\sin\frac{1}{x} - \frac{1}{x}\cos\frac{1}{x} }{x^2} \end{align*}

does not exist.