L’Hôpital’s rule – Conditions, Formula, and Examples

L’Hôpital’s rule is an essential tool in evaluating indeterminate forms’ limits. Remember the times when you have to go through extra miles to evaluate limits that initially return $\dfrac{0}{0}$ or $\dfrac{\infty}{\infty}$? This rule will make this process easier.

L’Hôpital’s rule is an essential technique in Calculus to evaluate limits of indeterminate forms by taking the derivatives of the expression’s numerator and denominator.

This is why we need to refresh our knowledge on the following topics to make the most out of our discussion on L’Hôpital’s rule.

Let’s go ahead and learn more about this helpful technique but first, understanding the conditions that this rule requires.

What is L’Hôpital’s rule?                

The L’Hopital’s rule helps us in simplifying our approach on evaluating limits by using derivatives. Given a rational function, $\dfrac{f(x)}{g(x)}$, and we have $\lim_{x\rightarrow a} \dfrac{f(x)}{g(x)} = \dfrac{0}{0}$ or $\lim_{x\rightarrow a} \dfrac{f(x)}{g(x)} = \dfrac{\pm \infty}{\pm \infty}$, we can still evaluate its limit using the L’Hôpital’s rule as shown below.

\begin{aligned}\lim_{x\rightarrow a} \dfrac{f(x)}{g(x)} = \lim_{x\rightarrow a} \dfrac{f’(x)}{g’(x)}\end{aligned}

This means that when we’re given a function with indeterminate form, according to L’Hôpital’s rule, we can still determine its limit by:

  • Taking the derivatives of the numerator and denominator.
  • Use this new rational expression instead, then take this limit’s expression instead of as $x\rightarrow a$.
  • If the function still returns a limit of either $\dfrac{0}{0}$ and $\dfrac{\pm \infty}{\pm \infty}$, perform the L’Hôpital’s rule again.

When to use the L’Hôpital’s rule?                

As we have mentioned in the earlier section, we can’t use L’Hôpital’s rule for all rational expressions. We have to make sure that the limit using direct substitution will return a limit of the following forms:

Indeterminate

Forms

\begin{aligned}\dfrac{0}{0}\end{aligned}

\begin{aligned}\dfrac{\pm \infty}{\pm \infty}\end{aligned}

\begin{aligned} 0 \cdot \infty\end{aligned}

\begin{aligned}1^{\infty}\end{aligned}

\begin{aligned}0^0\end{aligned}

\begin{aligned}\infty^0\end{aligned}

\begin{aligned} \infty – \infty\end{aligned}

When $\lim_{x \rightarrow a} \dfrac{f(x)}{g(x)}$ returns any of the forms shown above and meets the condition shown below, we can apply the L’Hôpital’s rule.

  • Both $f(x)$ and $g(x)$ are differentiable on both sides of $a$ (not necessarily for $a$ though).
  • The returning expression for $g’(x)$ must not be equal to zero.

When these conditions are met, we can evualte the limit of $\dfrac{f(x)}{g(x)}$ as $x$ approaches $a$ can be determined using $\lim_{x \rightarrow a} \dfrac{f’(x)}{g’(x)}$.

Let’s try an example of the $\boldsymbol{\dfrac{0}{0}}$ form:

\begin{aligned}\lim_{x \rightarrow 3}\dfrac{x – 3}{x^2 – 9}\end{aligned}

By direct substitution, we can see that the limit returned will be as shown below.

\begin{aligned}\lim_{x \rightarrow 3}\dfrac{x – 3}{x^2 – 9} &= \dfrac{{\color{green} 3} -3}{({\color{green} 3})^2 -9}\\&= \dfrac{0}{0}\end{aligned}

Since $x -3$ and $x^2 -9$ are continuous and differentiable, we can apply L’Hôpital’s rule by taking the derivatives of the two expressions.

\begin{aligned}\lim_{x \rightarrow 3}\dfrac{x – 3}{x^2 – 9} &= \lim_{x \rightarrow 3}\dfrac{\dfrac{d}{dx} (x -3)}{\dfrac{d}{dx} (x^2 -9)}\\&= \lim_{x \rightarrow 3} \dfrac{1}{2x}\end{aligned}

Once we have the new expression, we can now apply direct substitution.

\begin{aligned}\lim_{x \rightarrow 3}\dfrac{x – 3}{x^2 – 9} &= \lim_{x \rightarrow 3} \dfrac{1}{2x}\\&= \dfrac{1}{2({\color{green}3})}\\&= \dfrac{1}{6}\end{aligned}

We can see that it’s now possible for us to work on different indeterminate forms as long as the numerator and denominator meet the conditions for L’Hôpital’s rule.

This also shows that knowing the derivative rules by heart can also help us evaluate limits, so make sure to refresh your notes. We’ve also summarized the derivative rules for you here to make answering the sample problems easier:

Common Derivative Rules

\begin{aligned}\dfrac{d}{dx} c = 0\end{aligned}

\begin{aligned}\dfrac{d}{dx} f(g(x))= f’(g(x)) g’(x)\end{aligned}

\begin{aligned}\dfrac{d}{dx} x^n = nx^{n -1}\end{aligned}

\begin{aligned}\dfrac{d}{dx} e^x = e^x \end{aligned}

\begin{aligned}\dfrac{d}{dx} c\cdot f(x) = c \cdot f’(x)\end{aligned}

\begin{aligned}\dfrac{d}{dx} a^x = a^x \ln a \end{aligned}

\begin{aligned}\dfrac{d}{dx} f(x) \pm g(x) = f’(x) \pm g’(x)\end{aligned}

\begin{aligned}\dfrac{d}{dx} \sin x = \cos x\end{aligned}

\begin{aligned}\dfrac{d}{dx} [f(x) \cdot g(x)] = f’(x) \cdot g(x) + g’(x) \cdot f(x)\end{aligned}

\begin{aligned}\dfrac{d}{dx} \cos x = -\sin x\end{aligned}

\begin{aligned}\dfrac{d}{dx} \left[\dfrac{f(x)}{g(x)}\right] =\dfrac{g(x)f’(x) – f(x) g’(x)}{[g(x)]^2}\end{aligned}

\begin{aligned}\dfrac{d}{dx} \tan x =\sec^2 x\end{aligned}

Are you now ready to evaluate more limits using the L’Hôpitals rules? Try out these sample problems we’ve prepared for you to master this technique!

Example 1

Evaluate the limit of $\dfrac{2x^2 + 6x +4}{6 x^2  – 8}$ as $x$ approaches $\infty$.

Solution

First, we’ll need to check if $\lim_{x \rightarrow \infty} \dfrac{2x^2 + 6x +4}{6 x^2  – 8}$ will return an indeterminate form by using direct substitution first:

\begin{aligned}\lim_{x \rightarrow \infty} \dfrac{2x^2 + 6x + 4}{6 x^2  – 8} &= \dfrac{\infty}{\infty}\end{aligned}

We can see that the limit of the function is of the form, $\dfrac{\infty}{\infty}$. Since the numerator and the denominator are continuous and their limits exist, we can use the L’Hôpital’s rule.

\begin{aligned}\lim_{x \rightarrow a} \dfrac{f(x)}{g(x)} &= \lim_{x \rightarrow a} \dfrac{f’(x)}{g’(x)}\end{aligned}

For our case, $\dfrac{2x^2 + 6x +4}{6x^2 – 8}$, we have $f(x) = 2x^2 + 6x + 4$ and $g(x) = 6x^2 -8$. Let’s first focus on taking the derivative of the numerator and the denominator:

\begin{aligned}\boldsymbol{f’(x)}\end{aligned}

\begin{aligned}\dfrac{d}{dx} 2x^2 + 6x + 4 &= 2(2)x^{2 -1} + 6(1) + 0\\&= 4 x + 6 \end{aligned}

\begin{aligned}\boldsymbol{g’(x)}\end{aligned}

\begin{aligned}\dfrac{d}{dx} 6 x^2  – 8 &= 6(2)x^{2 -1} – 0\\&= 12x \end{aligned}

\begin{aligned}\lim_{x \rightarrow \infty} \dfrac{2x^2 + 6x +4}{6x^2 – 8} &= \lim_{x\rightarrow \infty} \dfrac{4x + 6}{12x} \end{aligned}

This expression will still return a $\dfrac{\infty}{\infty}$ form, so we can apply the L’Hôpital’s rule again by taking the derivatives of $4x + 6$ and $12x$.

\begin{aligned}\lim_{x\rightarrow \infty} \dfrac{4x + 6}{12x}&= \lim_{x \rightarrow \infty}\dfrac{\dfrac{d}{dx} 4x + 6}{\dfrac{d}{dx} 12x} \\&= \lim_{x\rightarrow \infty} \dfrac{4}{12}\\&= \dfrac{4}{12}\\&= \dfrac{1}{3} \end{aligned}

This means that through the L’Hôpital’s rule, we have $\lim_{x\rightarrow \infty} \dfrac{2x^2 + 6x + 4}{6x^2 -8} = \dfrac{1}{3}$.

Example 2

Evaluate the limit of $\dfrac{\sin x}{x}$ as $x$ approaches $0$.

Solution

By direct substitution, we can see that $\lim_{x \rightarrow 0} \dfrac{\sin x}{x}$ is of the form, $\dfrac{0}{0}$.

\begin{aligned}\lim_{x \rightarrow 0} \dfrac{\sin x}{x} &= \dfrac{\sin {\color{green} 0}}{{\color{green} 0}} \\&= \dfrac{0}{0}\end{aligned}              

Since both $\sin x $ and $x$ are continuous, let’s take the derivative of $\sin x$ and $x$ then apply the L’Hôpital’s rule.

  • $\dfrac{d}{dx} \sin x = \cos x$
  • $\dfrac{d}{dx} x = 1$

According to L’Hôpital’s rule, we can instead take the limit of the rational expression formed by numerator and denominator’s derivatives as shown below.

\begin{aligned}\lim_{x \rightarrow 0} \dfrac{\sin x}{x} &= \dfrac{\cos x}{1} \\&= \dfrac{\cos {\color{green} 0}}{1}\\&= \dfrac{1}{1}\\&= 1\end{aligned}

This means that $\lim_{x \rightarrow 0} \dfrac{\sin x}{x} = 1$ by L’Hôpital’s rule.

Does this equation look familiar? This is the special trigonometric limit we’ve learned in the past. One way to derive this is by Squeeze’s theorem, but it will take time and a lot of steps instead of the process we’ve just shown. This shows how helpful L’Hôpital’s rule is for expressions like these.

Example 3

Evaluate the limit of $\dfrac{6}{x^2 – 9} – \dfrac{1}{x – 3}$ as $x$ approaches $3$.

Solution

Let’s observe what happens when we evaluate $\lim_{x \rightarrow 3} \left( \dfrac{6}{x^2 – 9} – \dfrac{1}{x – 3} \right )$ by direct substitution.

\begin{aligned}\lim_{x \rightarrow 3} \left( \dfrac{6}{x^2 – 9} – \dfrac{1}{x – 3} \right )&=\lim_{x \rightarrow 3}  \dfrac{6}{x^2 – 9} -\lim_{x \rightarrow 3} \dfrac{1}{x – 3}\\&= \dfrac{6}{({\color{green}3})^2 – 9} -\dfrac{1}{(3 -{\color{green}3})} \\&= \infty – \infty\end{aligned}             

This shows that the evaluated limit is of the form,$\infty – \infty$. We can apply L’Hôpital’s rule to see if we can evaluate the resulting expression’s limit instead.

 First, let’s rewrite the expression by combining the two rational expressions and then applying L’Hôpital’s rule.

\begin{aligned}\lim_{x \rightarrow 3} \left( \dfrac{6}{x^2 – 9} – \dfrac{1}{x – 3} \right )&=\lim_{x \rightarrow 3}  \left(\dfrac{6- (x + 3)}{x^2 – 9} \right )\\&= \lim_{x\rightarrow 3} \dfrac{3 – x}{x^2 – 9}\\&= \lim_{x\rightarrow 3} \dfrac{\dfrac{d}{dx}(3 – x)}{\dfrac{d}{dx} (x^2 – 9)}\\&= \lim_{x\rightarrow 3} \dfrac{-1}{2x}\end{aligned}           

We can now substitute $x =3$ into the new expression as shown below.

\begin{aligned}\lim_{x\rightarrow 3} \dfrac{-1}{2x} &= – \dfrac{1}{2({\color{green}3})}\\&= -\dfrac{1}{6}\end{aligned}                      

This means that $\lim_{x \rightarrow 3} \left( \dfrac{6}{x^2 – 9} – \dfrac{1}{x – 3} \right )$ is equal to $-\dfrac{1}{6}$.

Example 4

Evaluate the limit of $\left(1 + \dfrac{1}{x}\right)^x$ as $x$ approaches $\infty$.

Solution

When we apply direct substitution to evaluate $\lim_{x \rightarrow \infty} \left(1 + \dfrac{1}{x}\right)^x$, we’ll see that it’s of the form $1^{\infty}$ as shown below.

\begin{aligned}\lim_{x \rightarrow \infty} \left(1 + \dfrac{1}{x}\right)^x &= (1 + 0)^{\infty}\\&= 1^{\infty}\end{aligned}      

We haven’t discussed how we approach problems that deal with a $1^{\infty}$ form. When dealing with these types of the form (and $0^0$ forms), we perform the following steps:

  • Find the limit of the natural logarithms of the expressions first.
  • Apply the L’Hôpital’s rule (ie, finding the derivative of the new expression).

This means that for our example, we’ll focus on finding $\lim_{x \rightarrow \infty} \ln \left(1 + \dfrac{1}{x}\right)^x$ first. We’ll then rewrite the expression so that it is in rational form.

\begin{aligned}\lim_{x \rightarrow \infty} \ln \left(1 + \dfrac{1}{x}\right)^x &= \lim_{x \rightarrow \infty} x \ln \left(x + \dfrac{1}{x} \right )\\&= \lim_{x \rightarrow \infty} \dfrac{1}{x^{-1}} \ln \left(x + \dfrac{1}{x} \right )\\&= \lim_{x \rightarrow \infty} \dfrac{\ln \left(x + \dfrac{1}{x} \right )}{x^{-1}} \end{aligned}             

This will now return a $\dfrac{0}{0}$ form and the expression’s numerator and denominator are much easier to differentiate since we have established rules for them.

  • We can use the natural logarithm rule, $\dfrac{d}{dx} \ln {x} = \dfrac{1}{x}$, followed by the chain rule for the numerator.
  • Use the power rule, $\dfrac{d}{dx} x^n = nx^{n -1}$, on the denominator.

\begin{aligned}\lim_{x \rightarrow \infty} \dfrac{\ln \left(x + \dfrac{1}{x} \right )}{x^{-1}}&= \lim_{x \rightarrow \infty} \dfrac{\dfrac{d}{dx}\ln \left(x + \dfrac{1}{x} \right )}{\dfrac{d}{dx} x^{-1}}\\&= \lim_{x \rightarrow \infty} \dfrac{\dfrac{1}{1 + \dfrac{1}{x}} \cdot (-x^{-2})}{-1(x^{-2})}\\&= \lim_{x \rightarrow \infty} \dfrac{\dfrac{1}{1 + \dfrac{1}{x}} \cdot \cancel{(-x^{-2})}}{\cancel{-1(x^{-2})}}\\&=\lim_{x \rightarrow \infty} \dfrac{1}{1 + \dfrac{1}{x}}\end{aligned}  

Let’s substitute $x = \infty$ into the new expression, and let’s see if we can get a specific value this time. Remember that $\lim_{x \rightarrow \infty} \dfrac{k}{x^n} = 0$.

\begin{aligned}\lim_{x \rightarrow \infty} \dfrac{1}{1 + \dfrac{1}{x}} &= \dfrac{1}{1 + 0}\\&= \dfrac{1}{1}\\&= 1\end{aligned}    

This means that $\lim_{x \rightarrow \infty} \left(1 + \dfrac{1}{x}\right)^x$ is equal to $1$ through the L’Hôpital’s rule.

Practice Questions

1. Evaluate the limit of $\dfrac{2x^2 + 6x +4}{6 x^2 – 8}$ as $x$ approaches $\infty$.
2. Evaluate the limit of $\dfrac{1 -\cos x}{x}$ as $x$ approaches $0$.
3. Evaluate the limit of $2xe^{-x}$ as $x$ approaches $\infty$.
4. Evaluate the limit of $\dfrac{8}{x^2 – 16} – \dfrac{1}{x – 4}$ as $x$ approaches $3$.
5. Evaluate the limit of $4 + \left(2 – \dfrac{2}{x}\right)^x$ as $x$ approaches $\infty$.
6. Evaluate the limit of $\dfrac{2- 2\sin x}{3 \csc x}$ as $x$ approaches $\dfrac{\pi}{2} $.

Answer Key

1. $ \dfrac{3}{2}$
2. $0$
3. $0$
4. $-\dfrac{1}{8}$
5. $4$
6. $0$

Rate this page
Previous Lesson

Mean value theorem – Conditions, Formula, and Examples

Next Lesson

Newton’s method – Process, Approximation, and Example

We Create New Version

Coming Soon...