Skip to main content

Unit 6.1 L’Hôpital’s Rule

L’Hôpital’s Rule allows us resolve UND limits in some cases. In other words, it can determine a limit of an expression such as \(f+g\) or \(f/g\) or \(f^g\text{,}\) etc., when this limit is not determined just by knowing the limit of \(f\) and the limit of \(g\text{.}\) These cases of UND limits are often called indeterminate forms. For example, \(0/0\) is an indeterminate form because when \(\displaystyle\lim_{x \to a} f(x) = 0\) and \(\displaystyle\lim_{x \to a} g(x) = 0\text{,}\) the limit \(\displaystyle\lim_{x \to a} f(x) / g(x)\) can turn out to be any real number, or \(+\infty\text{,}\) or \(-\infty\text{,}\) or undefined. The basic version of L’Hôpital’s Rule involves just the one indeterminate form \(0/0\text{.}\)

Aside

Aside

Example 6.2.

L’Hôpital’s Rule computes \(\displaystyle\lim_{x \to 0} \sin(x) / x\) much more easily than you did in your homework. Let \(f(x) = \sin x\text{,}\) \(g(x) = x\) and \(a=0\) and observe that the continuous functions \(f\) and \(g\) both vanish at zero, hence \(\displaystyle\lim_{x \to 0} f(x) = \lim_{x \to 0} g(x) = 0\text{.}\) Therefore,
\begin{equation*} \displaystyle\lim_{x \to 0} \frac{\sin x}{x} = \lim_{x \to 0} \frac{\cos x}{1} = \frac{\cos (0)}{1} = 1 \, . \end{equation*}
You might wonder, when we first evaluated this limit, why did we do it the hard way? Remember, we did not and will not prove L’Hôpital’s Rule. For this reason it’s good to see some things that can be done without it.

Checkpoint 100.

Use L’Hôpital’s Rule to evaluate the following limits. Please state what are \(f, g, a, f'\) and \(g'\text{,}\) as well as the value of the limit.
  1. \(\lim_{x \to 0} \frac{e^x - 1}{x}\)
    \(f(x)\text{:}\)
    \(g(x)\text{:}\)
    \(f'(x)\text{:}\)
    \(g'(x)\text{:}\)
    \(\displaystyle\lim_{x\to 0}\frac{f(x)}{g(x)}=\)
  2. \(\displaystyle\lim_{x \to 10} \frac{\sqrt[3]{x} - \sqrt[3]{10}}{\sqrt{x} - \sqrt{10}}\)
    \(f(x)\text{:}\)
    \(g(x)\text{:}\)
    \(f'(x)\text{:}\)
    \(g'(x)\text{:}\)
    \(\displaystyle\lim_{x\to 0}\frac{f(x)}{g(x)}=\)
Answer 1.
\(e^{x}-1\)
Answer 2.
\(x\)
Answer 3.
\(e^{x}\)
Answer 4.
\(1\)
Answer 5.
\(1\)
Answer 6.
\(x^{0.333333}-2.15443\)
Answer 7.
\(x^{0.5}-3.16228\)
Answer 8.
\(0.333333x^{-0.666667}\)
Answer 9.
\(0.5x^{-0.5}\)
Answer 10.
\(\frac{2}{3}\cdot 10^{\frac{-1}{6}}\)
There are two common mistakes in applying L’Hôpital’s Rule. One is trying to use it the other way around. If \(f/g\) has a limit at \(a\text{,}\) that doesn’t mean \(f'/g'\) does, or that these even exist. The other is to try to use it when \(f\) or \(g\) has a nonzero limit at \(a\text{.}\) For example, if \(\displaystyle\lim_{x \to a} f(x) = 5\) and \(\displaystyle\lim_{x \to a} g(x) = 3\) then \(\displaystyle\lim_{x \to a} f(x) / g(x) = 5/3\) (the nonzero quotient rule) and is probably not equal to \(\displaystyle\lim_{x \to a} f'(x) / g'(x)\text{.}\)

Checkpoint 101.

Which (possibly several, possibly none) of these uses of L’Hôpital’s Rule are valid (hypotheses are satisfied and conclusion is correctly applied)?
\begin{equation*} \displaystyle\lim_{x \to 3} \frac{x^2-10}{x-3} = \lim_{x \to 3} \frac{2x}{1} = 6 \end{equation*}
\begin{equation*} \displaystyle\lim_{x \to 2} \frac{x^2-4}{x-2} = \lim_{x \to 2} \frac{2x}{1} = 4 \end{equation*}
\begin{equation*} \displaystyle\lim_{x \to \infty} \frac{6 - e^{-x}}{3 - e^{-2x}} = 2 \end{equation*}
(The respective derivatives on top and bottom are \(e^{-x}\) and \(2 e^{-2x}\text{,}\) therefore \(\lim_{x \to \infty} \frac{e^{-x}}{2e^{-2x}} = 2\text{.}\)
Answer 1.
\(\text{invalid}\)
Answer 2.
\(\text{valid}\)
Answer 3.
\(\text{invalid}\)

More general versions.

If the hypotheses hold only from one side, for example \(\displaystyle\lim_{x \to a^+} f(x) = \lim_{x \to a^+} g(x) = 0\text{,}\) then the conclusion still holds on that side: if \(\displaystyle\lim_{x \to a^+} f'(x)/g'(x) = L\) then \(\displaystyle\lim_{x \to a^+} f(x)/g(x) = L\text{.}\) Also, the limit can be taken at \(\pm \infty\) and nothing changes.

Checkpoint 102.

Turning other indeterminate forms into \(0/0\).

For each of the other indeterminate forms, there’s a trick to turn it into the basic form 0/0.
The case \(0 \cdot \infty\)
Suppose \(\displaystyle\lim_{x \to a} f(x) = 0\) and \(\displaystyle\lim_{x \to a} g(x) = \infty\text{.}\) How can we compute \(\displaystyle\lim_{x \to a} f(x) \cdot g(x)\text{?}\) We know that \(\displaystyle\lim_{x \to a} 1/g(x) = 1/\infty = 0\text{.}\) Therefore, an easy trick is to replace multiplication by \(g\) with division by \(1/g\text{.}\) Letting \(h\) denote \(1/g\text{,}\) we have
\begin{equation*} \displaystyle\lim_{x \to a} f(x) g(x) = \lim_{x \to a} \frac{f(x)}{h(x)} \end{equation*}
which is the correct form for L’Hôpital’s Rule.
Example 6.4.
What is \(\displaystyle\lim_{x \to 0^+} x \cot x\text{?}\) Letting \(f(x) = x\) and \(g(x) = \cot x\) we see this has the form \(0 \cdot \infty\text{.}\) Letting \(h(x) = 1/g(x) = \tan x\) we see that
\begin{equation*} \displaystyle\lim_{x \to 0^+} x \cot x = \lim_{x \to 0^+} \frac{x}{\tan x} = \lim_{x \to 0^+} \frac{x}{\sin x} \cdot \cos x \, . \end{equation*}
The limit at 0 of \(x / \sin x\) is 1 and the limit of the continuous function \(\cos x\) is \(\cos (0) = 1\text{,}\) therefore the answer is \(1 \cdot 1 = 1\text{.}\)
The case \(\infty / \infty\)
You could invert both \(f\) and \(g\text{,}\) writing \(\frac{f(x)}{g(x)}\) as \(\frac{1/g(x)}{1/f(x)}\text{.}\) There is a reasonable chance that L’Hôpital’s Rule can be applied to this. There is also another version of L’Hôpital’s Rule specifically for this case.
Checkpoint 103.
Compute \(\lim_{x \to \infty} \, \frac{x}{e^x}\) .
Answer.
\(0\)
The cases \(1^\infty\text{,}\) \(0^0\) and \(\infty^0\)
The idea with indeterminate powers is to take the log, compute the limit, then exponentiate. The reason this works is that \(e^x\) is a continous function. Theorem 2.32 says that if \(\displaystyle\lim_{x \to a} h(x) = L\) then \(\displaystyle\lim_{x \to a} e^{h(x)} = e^L\text{.}\)
The way we will use this when evaluating something of the form \(\displaystyle\lim_{x \to a} f(x)^{g(x)}\) is to take logarithms. Algebra tells us \(\ln f(x)^{g(x)} = g(x) \ln f(x)\text{.}\) If we can evaluate \(\displaystyle\lim_{x \to a} g(x) \ln f(x) = L\) then we can exponentiate to get \(\displaystyle\lim_{x \to a} f(x)^{g(x)} = e^L\text{.}\)
Checkpoint 104.
Suppose \(\displaystyle\lim_{x \to a} g(x) = 0\) and \(\displaystyle\lim_{x \to a} f(x)\) is either undefined or a real number other than 0. What do you think can be said about \(\displaystyle\lim_{x \to a} f(x) / g(x)\text{?}\) Proof not needed -- it’s OK to guess on this one.
Example 6.6. continuous compounding.
Suppose you have a million dollars earning a 12\% annual interest rate for one year. You might think after a year you will have \(1.12\) million dollars. But no, things are better than that. The bank compounds your interest for you. They realize you could have cashed out after half a year with 1.06 million and reinvested for another half year, giving you \(1.1236\) million, which doesn’t seem so different but is actually 3600 dollars more. You could play this game more frequently, dividing the year into \(n\) periods and earning \(12\% / n\) interest \(n\) times, so your one million becomes \((1 + 0.12/n)^n\) million.
With computerized trading, you could make the period of time a second, or even a microsecond. Does this enable you to claim an unbounded amount of money after one year? To answer that, let’s compute the amount you would get if you compounded continuously, namely \(\displaystyle\lim_{n \to \infty} (1 + 0.12/n)^n\text{.}\) Taking logs gives \(\ln (1 + 0.12/n)^n = n \ln (1 + 0.12/n)\text{.}\) Changing to the variable \(x := 1/n\text{,}\)
\begin{align*} \displaystyle\lim_{n \to \infty} n \ln (1 + 0.12/n) & = \lim_{x \to 0} \frac{\ln (1 + 0.12 x)}{x} \\ & = \lim_{x \to \infty} \frac{(d/dx) \ln (1 + 0.12 x)}{(d/dx) x} \mbox{ (L'Hôpital's Rule)} \\ & = \lim_{x \to \infty} \frac{0.12 / (1 + 0.12x)}{1} \mbox{ (use the chain rule)}\\ & = \; 0.12 \; \end{align*}
Therefore, \(\displaystyle\lim_{n \to \infty} (1 + 0.12/n)^n = e^{0.12} \approx 1.12749685\) million dollars. That’s better than the \(120,000\) you earn without compounding, or the \(3,600\) more than that you earn compounding once, but it’s not infinite, it’s just another \(3896.85\) better.
Checkpoint 105.
What is \(\displaystyle\lim_{t \to 0} \, (1+t)^{1/t}\text{?}\) This limit is sometimes used to define the famous constant named after Euler.
Answer.
\(e\)

Repeated use of L’Hôpital’s Rule.

Sometimes when trying to evaluate \(\displaystyle\lim_{x \to a} f(x) / g(x)\) you find that \(\displaystyle\lim_{x \to a} f'(x) / g'(x)\) appears a bit simpler, but you still can’t tell what it is. You might try L’Hôpital’s Rule twice. If \(f'(x)\) and \(g'(x)\) tend to zero as \(x \to a\) (if they don’t, you can probably tell what the limit is), then you can use \(f'\) in place of \(f\) and \(g'\) in place of \(g\) in L’Hôpital’s Rule. If you can evaluate the limit of \(f'(x) / g'(x)\) then this must be the limit of \(f(x)/g(x)\text{.}\) You can often do a little better if you simplify \(f'(x) / g'(x)\) to get a new numerator and denominator whose derivatives will be less messy.

Example 6.7.

Repeated L’Hôpital’s Rule makes another limit that was formerly painful into a piece of cake: \(\displaystyle\lim_{x \to 0} (1 - \cos x) / x^2\text{.}\) Both numerator and denominator are zero at zero, so we apply L’Hôpital’s Rule to see that the limit is equal to \(\displaystyle\lim_{x \to 0} \sin x / (2x)\text{.}\) You can probably remember what this is, but in case not, one more application of L’Hôpital’s Rule shows it to be equal to \(\displaystyle\lim_{x \to 0} \cos x / 2 = \cos (0) / 2 = 1/2\text{.}\)

Checkpoint 106.

Compute \(\displaystyle\lim_{x \to \infty} \frac{x^3}{e^x}\text{.}\)
Answer.
\(0\)