Skip to main content

Section 4.7 L’Hôpital’s Rule

We’re going to revisit limits, but with a slightly new problem-solving tool. Specifically, we’ll be thinking about Indeterminate Forms. We noticed, back in Section 1.3, that we could evaluate limits for indeterminate forms by swapping out the function with another function that was mostly equivalent, only differing at the \(x\)-value we were approaching in the limit (Theorem 1.3.3 Limits of (Slightly) Different Functions).
We ended that section by thinking about a limit where this was difficult, in Activity 1.3.3.
We’re now going to build a more systematic (and helpful) way of thinking about these limits using the ideas of Linear Approximation!

Subsection Indeterminate Forms

We have given a preliminary definition of Indeterminate Forms already (Definition 1.3.4), but let’s remember how these work.
We said that \(\frac{0}{0}\) is an indeterminate form, since a limit whose numerator and denominator approach 0 can end up taking on different values or even not exist. For instance, we can notice that the definition of the Derivative at a Point is a limit with this indeterminate form. As long as \(f(x)\) is continuous (a necessity of it being differentiable) at \(x=a\text{,}\) then:
\begin{equation*} \lim_{x\to a} \left(\frac{f(x)-f(a)}{x-a}\right) \stackrel{?}{\to} \frac{f(a)-f(a)}{a-a} = \frac{0}{0} \end{equation*}
But we have seen so many different values that this limit can end up being! We have spent most of the past two chapters in this text playing with derivatives and evaluating them: all of those values come from this limit! We have also seen that, even for continuous functions, this limit may not exist. A function can be non-differentiable at \(x=a\text{.}\)
We can show the same thing for a second indeterminate form: \(\frac{\pm\infty}{\pm\infty}\text{,}\) which we will simplify by just using the symbol \(\frac{\infty}{\infty}\text{.}\) For us to see that limits with this form can take on different values (or not exist), we just need to think about end behavior limits for rational functions (End Behavior Limits).
Let’s think about the following limit:
\begin{equation*} \lim_{x\to \infty} \left(\frac{2x^m+1}{1-3x^n}\right)\text{.} \end{equation*}
As long as \(m,n\gt 0\text{,}\) then this limit looks like it’s in the form of \(\frac{\infty}{\infty}\text{.}\) Sure, the denominator is really approaching \(-\infty\text{,}\) but we really just mean that there is an infinite numerator and an infinite denominator, regardless of sign.
We also know that the actual limit depends on the degrees \(m\) and \(n\text{!}\) Try to spend a couple of minutes confirming the next few claims:
  • If \(m\lt n\text{,}\) then this limit is \(0\text{.}\)
  • If \(m=n\text{,}\) then this limit is \(-\frac{2}{3}\text{.}\)
  • If \(m\gt n\text{,}\) then this limit doesn’t exist.
All of this to show us that we have some forms of limits where we can’t immediately tell what the actual value of the limit is (or if it even exists). L’Hôpital’s Rule will be a way for us to navigate these limits a little easier than before, in some cases.

Subsection L’Hôpital’s Rule

Activity 4.7.1. Building L’Hôpital’s Rule.

We’re going to take a closer look at the indeterminate form, \(\frac{0}{0}\text{,}\) and use our new ideas of linear approximation to think about how these types of things work.
We’re going to be working with the following limit:
\begin{equation*} \lim_{x\to a}\frac{f(x)}{g(x)} \end{equation*}
where \(f(x)\) and \(g(x)\) are differentiable at \(x=a\) (since we’re going to want to build linear approximations of them).
(a)
Write out the linear approximations for both \(f(x)\) and \(g(x)\text{,}\) both centered at \(x=a\text{.}\) We’ll call them \(L_f(x)\) and \(L_g(x)\text{.}\)
Hint.
We’re just using the formula for Linear Approximation of a Function, but with \(f(x)\) for one of them and \(g(x)\) in the other.
(b)
Describe how well or how poorly these linear approximations estimate the values from our functions \(f(x)\) and \(g(x)\text{?}\) What happens to these approximations as we get close to the center \(x=a\text{?}\) What happens in the limit as \(x\to a\text{?}\)
Hint.
You can revisit the local linearity visualization from Section 4.6 to see what happens, in general, with a linear approximation of a function as we zoom in on the center.
(c)
Let’s rewrite our limit. We can replace \(f(x)\) with our formula for its linear approximation, \(L_f(x)\) and replace \(g(x)\) with its linear approximation, \(L_g(x)\text{:}\)
\begin{equation*} \lim_{x\to a} \frac{f(x)}{g(x)} = \lim_{x\to a} \left(\frac{\fillinmath{XXXXXXXXXXXXXXX}}{\fillinmath{XXXXXXXXXXXXXXX}}\right) \end{equation*}
(d)
Up until now, we have not thought about indeterminate forms at all. Let’s start now.
If this limit is a \(\frac{0}{0}\) indeterminate form, then that means that \(\displaystyle \lim_{x\to a} f(x) = 0\) and \(\displaystyle \lim_{x\to a} g(x) = 0\text{.}\)
Since our functions are, by definition, differentiable at \(x=a\text{,}\) then they also have to be continuous at \(x=a\text{.}\) What does this mean about the values of \(f(a)\) and \(g(a)\text{?}\)
Hint.
Take a look back at our definition of function being Continuous at a Point. How does the function value relate to the limit? What does that mean in our case?
(e)
Use this new information about the values of \(f(a)\) and \(g(a)\) to revisit the limit. We rewrote \(\displaystyle \lim_{x\to a} \frac{f(x)}{g(x)}\) by replacing each function with its linear approximation. What happens with the algebra when we know this information about \(f(a)\) and \(g(a)\text{?}\)
Hint.
We rewrote
\begin{equation*} \lim_{x\to a} \frac{f(x)}{g(x)} = \lim_{x\to a} \left(\frac{f'(a)(x-a)+f(a)}{g'(a)(x-a)+g(a)}\right) \end{equation*}
and also know that in this case (due to the \(\frac{0}{0}\) indeterminate form) that \(f(a)=0\) and \(g(a)=0\text{.}\)
So we have a really nice result here! In the \(\frac{0}{0}\) indeterminate form, we can replace the ratio of the \(y\)-values from our functions with the ratio of slopes (coming from the first derivatives) of our functions.
In general, we’ll put a step in between, where we find \(f'(x)\) and \(g'(x)\) first before trying to evaluate these derivatives at \(x=a\text{.}\)

Example 4.7.2. Some First Limits.

Evaluate the following limits. You should first confirm that they are, actually, indeterminate forms!
(a)
\(\displaystyle \lim_{x\to 0}\left(\frac{\sin(x)}{x}\right)\)
(b)
\(\displaystyle \lim_{x\to 5} \left(\frac{x^2-6x+5}{x-5}\right)\)
(c)
\(\displaystyle \lim_{x\to 1}\left(\frac{\ln(x)}{x-1}\right)\)
(d)
\(\displaystyle \lim_{x\to \infty} \left(\frac{x^2-6x+5}{x-5}\right)\)
(e)
\(\displaystyle \lim_{x\to \infty}\left(\frac{\ln(x)}{x-1}\right)\)
There are more indeterminate forms than these two! In each of the following cases, we mean that a limit with this form can take on different values (or not exist). Other indeterminate forms that we can consider include:
  • \(\displaystyle f(x)\cdot g(x)\stackrel{?}{\to} 0\cdot \infty\)
  • \(\displaystyle \left(f(x)-g(x)\right) \stackrel{?}{\to} \infty-\infty\)
  • \(\displaystyle f(x)^{g(x)} \stackrel{?}{\to} 0^0\)
  • \(\displaystyle f(x)^{g(x)} \stackrel{?}{\to} 1^\infty\)
  • \(\displaystyle f(x)^{g(x)} \stackrel{?}{\to} \infty^0\)
The issue with these, though, is that L’Hôpital’s Rule only applies to quotients! We needed that quotient for the algebra to work out when we canceled things out to end up with the ratio of slopes.
So our strategies for these other indeterminate forms will all require us to manipulate the product, difference, or exponential in order to force some division to show up somehow.

Subsection Forcing Division

Let’s look at each new indeterminate form classified into groups based on the operation between the functions.

Subsubsection Products!

We can rewrite \(f(x)\cdot g(x)\) as a quotient by dividing by a reciprocal. So either
\begin{equation*} f(x)\cdot g(x) = \frac{f(x)}{1/g(x)} \end{equation*}
or
\begin{equation*} f(x)\cdot g(x) = \frac{g(x)}{1/f(x)}\text{.} \end{equation*}
Our choice ends up being based on what is most helpful.
Example 4.7.3.
Evaluate the limit:
\begin{equation*} \lim_{x\to 0^+} \left(x\ln(x)\right) \end{equation*}
Note that since \(x\to 0\) and \(\ln(x)\to -\infty\text{,}\) this is a \(0\cdot\infty\) indeterminate form.
Hint.
Rewrite this limit as:
\begin{equation*} \lim_{x\to 0^+} \left(\frac{\ln(x)}{1/x}\right)\text{.} \end{equation*}
Note that this is not an \(\frac{\infty}{\infty}\) indeterminate form, and we can use L’Hôpital’s Rule.
Solution.
\begin{align*} \lim_{x\to 0^+} \left(x\ln(x)\right)\amp = \lim_{x\to 0^+} \left(\frac{\ln(x)}{1/x}\right) \\ \amp = \lim_{x\to 0^+} \left(\frac{\ddx{\ln(x)}}{\ddx{1/x}}\right)\\ \amp = \lim_{x\to 0^+} \left(\frac{1/x}{-1/x^2}\right)\\ \amp \lim_{x\to 0^+} \left(\frac{1}{x}\right)\left(-\frac{x^2}{1}\right)\\ \amp = \lim_{x\to 0^+} (-x)\\ \amp = 0 \end{align*}
So \(\displaystyle\lim_{x\to 0^+} x\ln(x)=0\text{.}\)

Subsubsection Differences!

We can rewrite \(f(x)-g(x)\) as a product by factoring something out of the difference. Then, if the product is a \(0\cdot\infty\) indeterminate form, we can divide by a reciprocal to turn it into a quotient.
Choosing what to factor out is sometimes very difficult. But we should note that this is the strategy we used to evaluate Polynomial End Behavior Limits.
Example 4.7.4.
Evaluate the following limit:
\begin{equation*} \lim_{x\to \infty} \left(2^x - x^2\right) \end{equation*}
Note that since \(2^x\to \infty\) and \(x^2\to \infty\text{,}\) this is an \(\infty-\infty\) indeterminate form.
Hint.
Try to factor out \(2^x\text{.}\) You won’t be able to actual factor it nicely, but you’ll end up with a fraction term \(\frac{x^2}{2^x}\) that is an \(\frac{\infty}{\infty}\) indeterminate form!
Solution.
\begin{align*} \lim_{x\to\infty} \left(2^x-x^2\right)\amp = \lim_{x\to \infty} 2^x\left(1 - \frac{x^2}{2^x}\right) \end{align*}
Let’s focus on the limit \(\displaystyle \lim_{x\to \infty} \left(\frac{x^2}{2^x}\right)\text{,}\) since it is in an \(\frac{\infty}{\infty}\) indeterminate form.
\begin{align*} \lim_{x\to \infty} \left(\frac{x^2}{2^x}\right)\amp \stackrel{?}{\to} \frac{\infty}{\infty}\\ \amp = \lim_{x\to\infty} \frac{\ddx{x^2}}{\ddx{2^x}}\\ \amp = \lim_{x\to \infty} \frac{2x}{2^x\ln(2)}\\ \lim_{x\to \infty} \frac{2x}{2^x\ln(2)}\amp \stackrel{?}{\to} \frac{\infty}{\infty}\\ \amp = \lim_{x\to\infty} \frac{\ddx{2x}}{\ddx{2^x\ln(2)}}\\ \amp = \lim_{x\to \infty} \frac{2}{2^x\ln(2)\ln(2)}\\ \lim_{x\to \infty} \frac{2}{2^x\ln(2)\ln(2)}\amp \stackrel{?}{\to} \frac{2}{\infty} = 0 \end{align*}
So then we can go back to our original limit:
\begin{align*} \lim_{x\to\infty} \left(2^x-x^2\right)\amp = \lim_{x\to \infty} 2^x\left(1 - \frac{x^2}{2^x}\right) \\ \amp = \infty(1-0) = \infty \end{align*}

Subsubsection Exponentials!

We can think about how we approached these types of functions raised to other functions when we learned about Logarithmic Differentiation.
We were able to use logarithms to rewrite these types of exponentials as products. So we can say that:
\begin{align*} f(x)^{g(x)} \amp = e^{\ln\left(f(x)^{g(x)}\right)}\\ \amp = e^{g(x)\ln(f(x))} \end{align*}
When we think about limits, the continuity of the exponential function allows us to just focus on the limit of the exponent, \(g(x)\ln(f(x))\text{,}\) which is likely an indeterminate form that we’ve seen!
Example 4.7.5.
(a)
Evaluate the following limit:
\begin{equation*} \lim_{x\to 0^+} x^x \end{equation*}
Note that this is the \(0^0\) indeterminate form.
Hint.
We can rewrite \(x^x\) as \(e^{\ln\left(x^x\right)}\) which is the same as \(e^{x\ln(x)}\text{.}\) Now we can evaluate the limit \(\displaystyle\lim_{x\to 0^+} x\ln(x)\text{,}\) and make sure to return the value into the exponent.
Solution.
We know from Example 4.7.3 that \(\displaystyle\lim_{x\to 0^+} x\ln(x) = 0\text{.}\) So then:
\begin{align*} \lim_{x\to 0^+} x^x \amp = \lim_{x\to 0^+} e^{x\ln(x)} \\ \amp = e^{\lim_{x\to 0^+} x\ln(x)}\\ \amp = e^0 = 1 \end{align*}
So \(\displaystyle \lim_{x\to 0^+} x^x = 1\text{.}\)
(b)
Evaluate the following limit:
\begin{equation*} \lim_{x\to\infty}\sqrt[x]{x}\text{.} \end{equation*}
Note that this is the \(0^\infty\) indeterminate form.
Hint.
Rewrite this as \(\displaystyle\lim_{x\to\infty}x^{\frac{1}{x}}\text{.}\) Now you can use the exponential/log composition to rewrite this again.
Solution.
\begin{align*} \lim_{x\to\infty} \sqrt[x]{x}\amp = \lim_{x\to\infty} x^{\frac{1}{x}} \\ \amp \lim_{x\to\infty} e^{\frac{1}{x}\ln(x)}\\ \amp = e^{\lim_{x\to\infty} \frac{1}{x}\ln(x)} \end{align*}
Now we can notice that the limit in the exponent is in a \(\dfrac{\infty}{\infty}\) indeterminate form.
\begin{align*} \lim_{x\to\infty} \frac{\ln(x)}{x} \amp = \lim_{x\to\infty} \frac{1/x}{1}\\ \amp = 0 \end{align*}
So then we have:
\begin{align*} \lim_{x\to\infty} \sqrt[x]{x} \amp = e^{\lim_{x\to\infty} \frac{\ln(x)}{x}} \\ \amp e^0\\ \amp = 1 \end{align*}

Practice Problems Practice Problems

1.

Explain how to use L’Hôpital’s Rule to evaluate a limit with the following indeterminate forms:
(d)
\(0^0\text{,}\) \(1^\infty\text{,}\) or \(\infty^0\)

2.

Consider the following limit: \(\displaystyle\lim_{x\to -2} \left(\frac{x+2}{x^2-4}\right)\)
(a)
Evaluate this limit using L’Hôpital’s Rule.
(b)
Evaluate this limit without using L’Hôpital’s Rule. Instead, use some algebraic manipulation of the function.

3.

Consider the following limit: \(\displaystyle\lim_{x\to 3} \left(\frac{2+\frac{3}{x}-x}{x-3}\right)\)
(a)
Evaluate this limit using L’Hôpital’s Rule.
(b)
Evaluate this limit without using L’Hôpital’s Rule. Instead, use some algebraic manipulation of the function.

4.

Consider the following limit: \(\displaystyle\lim_{x\to \infty} \left(\frac{2x^3-x^2+9x-1}{10-5x+3x^2-8x^4}\right)\)
(a)
Evaluate this limit using L’Hôpital’s Rule.
(b)
Evaluate this limit without using L’Hôpital’s Rule. Instead, use some algebraic manipulation of the function.

5.

Give an example of:
(a)
A limit with a \(0/0\) indeterminate form that we wouldn’t be able to evaluate using the basic algebraic manipulations we have. Use L’Hôpital’s Rule to evaluate that limit.
(b)
A limit with an \(\infty/\infty\) indeterminate form, and evaluate it using L’Hôpital’s Rule.
(c)
A limit with a \(0/0\) indeterminate form that equals \(6\text{.}\)
(d)
A limit with an \(\infty/\infty\) indeterminate form that equals \(-2\)

6.

Evaluate the following limits using L’Hôpital’s Rule.
(a)
\(\displaystyle\lim_{x\to \infty}\left(\dfrac{e^{2x}+4x-2}{x^2+1}\right)\)
(b)
\(\displaystyle\lim_{x\to 3}\left( \dfrac{x^3-x^2-4x-6}{x^2-5x+6} \right)\)
(c)
\(\displaystyle\lim_{x\to \infty}\left( \dfrac{\ln x}{x^2} \right)\)
(d)
\(\displaystyle\lim_{x\to 0}\left( \dfrac{\sin(x) + x}{\cos(x)-2x} \right)\)
(e)
\(\displaystyle\lim_{x\to 0}\left( \dfrac{e^x - \frac{x^3}{6} - \frac{x^2}{2} - x - 1}{\cos x - \sin x - \frac{x^3}{6} + \frac{x^2}{2} + x - 1} \right)\)
(f)
\(\displaystyle\lim_{x\to \infty} \left( \frac{x^2+1}{e^{4x+1}} \right)\)

7.

Evaluate the following limits using L’Hôpital’s Rule.
(a)
\(\displaystyle\lim_{x\to 0^+} \left(x \ln x\right)\)
(b)
\(\displaystyle\lim_{x\to 0^+} \left(\sin(x)\ln(x)\right)\)
(c)
\(\displaystyle\lim_{x\to \infty} (x^2e^{-x})\)
(d)
\(\displaystyle\lim_{x\to \infty} (e^{-x}\sqrt{x})\)
(e)
\(\displaystyle\lim_{x\to\infty} x^{1/x}\)
(f)
\(\displaystyle\lim_{x\to 0^+} x^x\)
(g)
\(\displaystyle\lim_{x\to0} (\cos(x))^{(1/x)}\)
(h)
\(\displaystyle\lim_{x\to\infty} \left(1+ \frac{1}{x}\right)^x\)
(i)
\(\displaystyle\lim_{x\to \infty} \left(1 + \frac{a}{x}\right)^x\) with \(a\) a real number
(j)
\(\displaystyle\lim_{x\to\infty} (\ln(x))^{1/x}\)