L'Hôpital's Rule

Let \( f \) and \( g \) be functions differentiable on a deleted neighborhood of \( x_0 \), and suppose that either $$ \lim_{x \rightarrow x_0} f(x) = 0 $$ $$ \lim_{x \rightarrow x_0} g(x) = 0 $$ or $$ \lim_{x \rightarrow x_0} f(x) = \pm \infty $$ $$ \lim_{x \rightarrow x_0} g(x) = \pm \infty. $$ If \( g(x) \neq 0 \) and \( g'(x) \neq 0 \) throughout a deleted neighborhood of \( x_0 \), $$ g(x) \neq 0 \quad \text{and} \quad g'(x) \neq 0 $$ and if the limit $$ \lim_{x \rightarrow x_0} \frac{f'(x)}{g'(x)} = L $$ exists, then $$ \lim_{x \rightarrow x_0} \frac{f(x)}{g(x)} = L. $$

The functions do not need to be differentiable at \(x_0\). It is enough that they are differentiable on a deleted neighborhood of \(x_0\), that is, at points arbitrarily close to \(x_0\), with \(x_0\) itself possibly excluded.

The point \(x_0\) may be either finite or infinite.

Note. If applying L'Hôpital's Rule still results in an indeterminate form of the type \(\frac{0}{0}\) or \(\frac{\infty}{\infty}\), you can apply the rule again by taking second derivatives, third derivatives, and so on, provided the hypotheses of the theorem remain satisfied. You can continue this process until the quotient of the derivatives is no longer indeterminate and its limit exists, whether finite or infinite.

What is L'Hôpital's Rule used for?

L'Hôpital's Rule is one of the most useful tools in calculus for evaluating limits that produce the indeterminate forms 0/0 and ∞/∞.

In the first case, both the numerator and the denominator approach zero.

$$ \lim_{x \rightarrow x_0} \frac{f(x)}{g(x)} = \frac{0}{0} $$

In the second case, both the numerator and the denominator approach infinity.

$$ \lim_{x \rightarrow x_0} \frac{f(x)}{g(x)} = \frac{\infty}{\infty} $$

Whenever all the hypotheses of the theorem are satisfied, the original limit can be replaced by the limit of the quotient of the derivatives. 

Worked Examples

Example 1

The following limit produces an indeterminate form of the type 0/0.

$$\lim_{x \rightarrow 0} \frac{f(x)}{g(x)} = \lim_{x \rightarrow 0} \frac{e^{2x}-e^{-2x}}{\sin 5x} = \frac{0}{0} $$

Since both functions approach zero, the hypotheses of L'Hôpital's Rule are satisfied.

$$ \lim_{x \rightarrow 0} f(x) = 0 \\ \lim_{x \rightarrow 0} g(x) = 0 $$

Differentiate the numerator and the denominator.

$$ f'(x)= 2e^{2x}+2e^{-2x} $$ $$ g'(x)= 5 \cos 5x $$

Now evaluate the limit of the quotient of the first derivatives.

$$ \lim_{x \rightarrow 0} \frac{f'(x)}{g'(x)} = \lim_{x \rightarrow 0} \frac{2e^{2x}+2e^{-2x}}{5 \cos 5x} = \frac{4}{5} $$

Therefore, the original limit is also equal to

$$ \boxed{\frac{4}{5}} $$

What if the result is still indeterminate? If the quotient of the first derivatives still produces an indeterminate form of the type 0/0 or ∞/∞, simply differentiate again. L'Hôpital's Rule may be applied repeatedly, provided its hypotheses remain satisfied.

Example 2

This limit produces an indeterminate form of the type ∞/∞.

$$\lim_{x \rightarrow ∞} \frac{f(x)}{g(x)} = \lim_{x \rightarrow ∞} \frac{e^x}{x} = \frac{∞}{∞} $$

Apply L'Hôpital's Rule.

$$ \lim_{x \rightarrow ∞} \frac{f'(x)}{g'(x)} = \lim_{x \rightarrow ∞} \frac{e^x}{1} = ∞ $$

Hence,

$$ \lim_{x \rightarrow ∞} \frac{f(x)}{g(x)} = ∞. $$

Example 3

This limit produces an indeterminate form of the type 0·∞.

$$\lim_{x \rightarrow 0+} x^2 \cdot \log x = 0 \cdot (-∞) $$

Rewrite the product as a quotient.

$$\lim_{x \rightarrow 0+} \frac{\log x}{\frac{1}{x^2}} $$

or equivalently,

$$\lim_{x \rightarrow 0+} \frac{\log x}{x^{-2}} $$

The limit is now of the type ∞/∞, so L'Hôpital's Rule applies.

Differentiate the numerator and the denominator.

$$\lim_{x \rightarrow 0+} \frac{\frac{1}{x}}{-2x^{-3}} $$

Rewrite the quotient.

$$\lim_{x \rightarrow 0+} \frac{\frac{1}{x}}{\frac{1}{-2x^{3}}} $$

Simplify.

$$\lim_{x \rightarrow 0+} \frac{-2x^3}{x} $$

$$\lim_{x \rightarrow 0+} -2x^2 = 0 $$

Example 4

This limit produces an indeterminate form of the type ∞/∞.

$$\lim_{x \rightarrow ∞} \frac{x^2}{e^x} = \frac{∞}{∞} $$

Applying L'Hôpital's Rule once still gives an indeterminate form.

$$\lim_{x \rightarrow ∞} \frac{2x}{e^x} = \frac{∞}{∞} $$

Apply the rule a second time.

$$\lim_{x \rightarrow ∞} \frac{2}{e^x} = 0 $$

Therefore, the original limit converges to zero.

Proof

Case of the Indeterminate Form \(0/0\)

Since we are dealing with the indeterminate form \(0/0\), we have

$$ \lim_{x \to x_0}f(x)=0 \qquad \text{and} \qquad \lim_{x \to x_0}g(x)=0. $$

Define

$$ f(x_0)=0 \qquad \text{and} \qquad g(x_0)=0, $$

so that both functions become continuous at \(x_0\).

Now choose any point \(x\) in the neighborhood \(I\), with \(x \neq x_0\). The functions \(f\) and \(g\) are continuous on the closed interval \([x_0,x]\) and differentiable on the open interval \((x_0,x)\). Therefore, Cauchy's Mean Value Theorem applies.

Hence, there exists a point \(c\) between \(x_0\) and \(x\) such that

$$ \frac{f(x)-f(x_0)}{g(x)-g(x_0)}=\frac{f'(c)}{g'(c)}. $$

Substituting \(f(x_0)=0\) and \(g(x_0)=0\) gives

$$ \frac{f(x)}{g(x)}=\frac{f'(c)}{g'(c)}. $$

Now let \(x \to x_0\). Since \(c\) lies between \(x_0\) and \(x\), it follows that \(c \to x_0\) as well. Therefore,

$$ \lim_{x \to x_0}\frac{f(x)}{g(x)}=\lim_{c \to x_0}\frac{f'(c)}{g'(c)}. $$

If the limit

$$ \lim_{x \to x_0}\frac{f'(x)}{g'(x)} $$

exists, then

$$ \lim_{c \to x_0}\frac{f'(c)}{g'(c)}=\lim_{x \to x_0}\frac{f'(x)}{g'(x)}. $$

Consequently,

$$ \boxed{\lim_{x \to x_0}\frac{f(x)}{g(x)}=\lim_{x \to x_0}\frac{f'(x)}{g'(x)}} $$

This is exactly the statement of L'Hôpital's Rule for the indeterminate form \(0/0\).

Note. The key idea behind the proof is the application of Cauchy's Mean Value Theorem. It allows us to express the quotient of the two functions as the quotient of their derivatives evaluated at a suitable intermediate point \(c\). Since \(c\) approaches \(x_0\) as \(x\) approaches \(x_0\), the limit of the quotient of the functions is the same as the limit of the quotient of their derivatives.

The proof for the remaining case follows the same line of reasoning.

Extension to the \( \infty / \infty \) Indeterminate Form

L'Hôpital's rule is not limited to functions approaching a finite point. It also applies to limits as \(x \to +\infty\) and \(x \to -\infty\).

In this setting, the hypotheses no longer need to hold in a neighborhood of a specific point. Instead, they must be satisfied for all sufficiently large values of \(x\), that is, for \(x > M\) when \(x \to +\infty\), or for all sufficiently small values of \(x\), that is, for \(x < -M\) when \(x \to -\infty\).

When these conditions are met, the conclusion of L'Hôpital's rule remains unchanged:

$$ \lim_{x\to\pm\infty}\frac{f(x)}{g(x)} = \lim_{x\to\pm\infty}\frac{f'(x)}{g'(x)}. $$

The proof follows the same idea as in the finite case. By introducing the substitution \(t=\frac{1}{x}\), the limit at infinity is transformed into a limit at a finite point.

Once this transformation has been made, the proof is exactly the same as the one used for the case \(x \to x_0\).

Using L'Hôpital's Rule with Other Indeterminate Forms

Not every indeterminate form can be evaluated directly with L'Hôpital's Rule. Forms such as ∞-∞, 0·∞, 00, 1, and ∞0 must first be rewritten, whenever possible, as one of the two indeterminate quotients for which the rule applies: 0/0 or ∞/∞.

Indeterminate Forms \( 0 \cdot \infty \) and \( \infty \cdot 0 \)

A product can often be converted into a quotient using one of the following identities:

$$ f \cdot g = \frac{f}{\frac{1}{g}} $$

or

$$ f \cdot g = \frac{g}{\frac{1}{f}} $$

Example

Consider the limit

\[ \lim_{x\to+\infty} x e^{-x} \]

As \(x \to +\infty\), we have

\[ \lim_{x\to+\infty} x e^{-x} = \infty \cdot 0 \]

This is an indeterminate form of type \( \infty \cdot 0 \).

Rewrite the product as a quotient:

\[ xe^{-x}=\frac{x}{e^x} \]

The limit becomes

\[ \lim_{x\to+\infty}\frac{x}{e^x} \]

Now the expression has the indeterminate form

\[ \lim_{x\to+\infty}\frac{x}{e^x}=\frac{\infty}{\infty} \]

Since the limit is now in a suitable form, L'Hôpital's Rule can be applied.

\[ \frac{D_x[x]}{D_x[e^x]}=\frac{1}{e^x} \]

After differentiation, the limit becomes

\[ \lim_{x\to+\infty}\frac{x}{e^x}=\lim_{x\to+\infty}\frac{1}{e^x} \]

Because \( e^x \to +\infty \), it follows that

\[ \lim_{x\to+\infty}\frac{1}{e^x}=0 \]

Therefore,

\[ \boxed{\lim_{x\to+\infty}xe^{-x}=0} \]

By rewriting the product as a quotient, the original indeterminate form \( \infty \cdot 0 \) is transformed into one that can be evaluated using L'Hôpital's Rule.

Indeterminate Forms \(0^0 \), \(1^\infty \), and \(\infty^0 \)

The indeterminate forms \(0^0\), \(1^\infty\), and \(\infty^0\) arise when evaluating limits of expressions of the form

\[ \lim_{x\to x_0}[f(x)]^{g(x)} \]

where \(f(x)>0\).

More specifically, they occur in the following situations:

  • \(0^0\) if \( \lim_{x\to x_0}f(x)=0 \) and \( \lim_{x\to x_0}g(x)=0 \)
  • \(1^\infty\) if \( \lim_{x\to x_0}f(x)=1 \) and \( \lim_{x\to x_0}g(x)=\pm\infty \)
  • \(\infty^0\) if \( \lim_{x\to x_0}f(x)=\pm\infty \) and \( \lim_{x\to x_0}g(x)=0 \)

The standard approach is to rewrite the power as an exponential function:

\[ [f(x)]^{g(x)}=e^{\ln\!\left(f(x)^{g(x)}\right)}=e^{g(x)\ln f(x)} \]

Explanation. Start with the expression \( [f(x)]^{g(x)} \). Since every positive number can be written as \(x=e^{\ln x}\), the expression can be rewritten as \[ [f(x)]^{g(x)}=e^{\ln\!\left(f(x)^{g(x)}\right)} \] Next, apply one of the properties of logarithms, namely \( \ln(x^y)=y\ln x \), to obtain \[ [f(x)]^{g(x)}=e^{\ln\!\left(f(x)^{g(x)}\right)}=e^{g(x)\ln f(x)} \]

Provided that the limit of the exponent exists, the original limit becomes

\[ \lim_{x\to x_0}[f(x)]^{g(x)}=e^{\left[\lim_{x\to x_0}g(x)\ln f(x)\right]} \]

The problem is now reduced to evaluating the product limit

\[ \lim_{x\to x_0}g(x)\ln f(x) \]

In many cases, this product has the indeterminate form \(0\cdot\infty\).

Once again, rewrite the product as a quotient and apply L'Hôpital's Rule if necessary.

Example

Consider the limit

\[ \lim_{x\to0^+}x^x=0^0 \]

This is an indeterminate form of type \(0^0\). Rewrite the power as

\[ x^x=e^{x\ln x} \]

The limit becomes

\[ \lim_{x\to0^+}e^{x\ln x} \]

Since the exponential function is continuous, the limit can be moved inside the exponent:

\[ e^{\lim_{x\to0^+}x\ln x} \]

So all that remains is to evaluate

\[ \lim_{x\to0^+}x\ln x \]

This is an indeterminate form of type

\[ \lim_{x\to0^+}x\ln x=0\cdot(-\infty) \]

Rewrite the product as a quotient:

\[ x\ln x=\frac{\ln x}{1/x} \]

Then

\[ \lim_{x\to0^+}\frac{\ln x}{1/x}=\frac{-\infty}{\infty} \]

The expression is now in a form where L'Hôpital's Rule applies.

\[ \frac{D_x[\ln x]}{D_x[1/x]}=\frac{\frac1x}{-\frac1{x^2}}=\frac1x\cdot(-x^2)=-x \]

Therefore,

\[ \lim_{x\to0^+}\frac{\ln x}{1/x}=\lim_{x\to0^+}(-x)=0 \]

Hence, the limit of the exponent is

\[ \lim_{x\to0^+}x\ln x=0 \]

However, this is not yet the final answer. It is only the limit of the exponent.

Substitute this result back into the exponential function:

\[ e^{\lim_{x\to0^+}x\ln x}=e^0=1 \]

Therefore, the original limit is

\[ \boxed{\lim_{x\to0^+}x^x=1} \]

Indeterminate Form \( \infty-\infty \)

An expression of the form ∞-∞ can sometimes be transformed into a quotient through appropriate algebraic manipulation. However, there is no single algebraic technique that works in every situation.

Before applying L'Hôpital's Rule, always verify that the transformed expression is algebraically equivalent to the original one and that it has one of the required indeterminate forms, namely 0/0 or ∞/∞.

Example

Let's evaluate the following limit:

\[ \lim_{x \to 0^+} \left( \frac{1}{\sin x} - \frac{3}{x} \right) \]

As \(x \to 0^+\), the two terms both diverge to \(+\infty\), so the expression has the indeterminate form \(+\infty - \infty\).

\[ \lim_{x \to 0^+} \left( \frac{1}{\sin x} - \frac{3}{x} \right) = \infty - \infty \]

To remove the indeterminate form, combine the two fractions into a single rational expression:

\[ \lim_{x \to 0^+} \left( \frac{1}{\sin x} - \frac{3}{x} \right) \]

\[ \lim_{x \to 0^+} \frac{x - 3\sin x}{x\sin x} \]

Now, as \(x \to 0^+\), both the numerator and the denominator approach zero. The limit is therefore of the indeterminate form \(\frac{0}{0}\), so de l'Hôpital's rule can be applied.

\[ \lim_{x \to 0^+} \frac{x - 3\sin x}{x\sin x} = \frac{0}{0} \]

Differentiate the numerator and the denominator:

\[ \frac{D_x[ x - 3\sin x ]}{D_x[x\sin x ]} = \frac{1 - 3 \cos x}{1 \cdot \sin x + x \cos x} = \frac{1 - 3 \cos x}{\sin x + x \cos x} \]

After applying de l'Hôpital's rule, the transformed limit is easy to evaluate and tends to \( -\infty \).

\[ \lim_{x \to 0^+} \frac{1 - 3\cos x}{\sin x + x\cos x} = -\infty \]

Therefore, the original limit has the same value:

\[ \lim_{x \to 0^+} \left( \frac{1}{\sin x} - \frac{3}{x} \right) = -\infty \]

The same approach can be used to evaluate many other limits involving the indeterminate form \(+\infty - \infty\).

And so on.

 
 

Please feel free to point out any errors or typos, or share suggestions to improve these notes. English isn't my first language, so if you notice any mistakes, let me know, and I'll be sure to fix them.

FacebookTwitterLinkedinLinkedin
knowledge base

Derivatives

Theorems

Various Derivatives

Exercises