L’Hôpital’s Rule
L’Hôpital’s Rule is a technique for evaluating limits of functions involving quotients. It can be used when direct substitution yields an indeterminate form such as $[0/0]$ or $[\infty/\infty]$. Although being powerful, this rule presents some significant pitfalls and can lead to incorrect results when used indiscriminately.
In this lesson, we will state its definition and work through some practical examples by showing when it can and cannot be applied.
Statement
Let $f, g : (a, b) \to \mathbb{R}$ be two functions with $-\infty \leq a < b \leq + \infty$ such that both functions are differentiable on $(a, b)$ and $g'(x) \neq 0$, $\forall x \in (a, b) \setminus \{ x_0 \}$. Suppose that either: $$ \lim_{x \to x_0} f(x) = \lim_{x \to x_0} g(x) = 0 $$ Or: $$ \lim_{x \to x_0} f(x) = \lim_{x \to x_0} g(x) = \pm \infty $$ Furthermore, suppose that the following limit exists and is finite: $$ \lim_{x \to x_0} \frac{f'(x)}{g'(x)} = L \in \mathbb{R} $$ Then: $$ \lim_{x \to x_0} \frac{f(x)}{g(x)} = L $$
As mentioned above, l’Hôpital’s rule can be generally applied to indeterminate forms such as $[0/0]$,$[\infty/\infty]$ or if it is possible to rewrite the indeterminate form $[0 \cdot \infty]$ as one of the previous expressions.
Also, notice how many conditions must be satisfied for this rule to apply. Before using it, we must carefully verify that all the hypotheses hold.
Good Examples
Let’s start with some examples in which this rule can be used.
Consider the following limit:
$$ \lim_{x \to 0} \frac{\cos(4x) - 1}{4x^2} $$
First, let’s check whether we can apply the rule. We notice that both the numerator and the denominator are differentiable near $x = 0$ and that $\lim_{x \to 0} \cos(4x) - 1 = 0$ as well as $\lim_{x \to 0} 4x^2 = 0$. Thus, we have an indeterminate form of the type $[0/0]$. The derivative of the denominator is $8x$, which is non-zero for $x \neq 0$. We can therefore apply l’Hôpital’s rule, provided that the limit of the resulting quotient exists.
Let’s start by calculating the derivatives of the numerator and the denominator:
$$ \frac{d}{dx} [\cos(4x) -1] = -4 \sin(4x) $$ $$ \frac{d}{dx} [4x^2] = 8x $$
Therefore:
$$ \lim_{x \to 0} \frac{\cos(4x) - 1}{4x^2} \stackrel{H}{=} \lim_{x \to 0} \frac{-4\sin(4x)}{8x} $$
The resulting quotient is still of the type $[0/0]$ and since the hypotheses are once again satisfied, we can apply the rule a second time. Differentiating the numerator and denominator again gives:
$$ \begin{aligned} \lim_{x \to 0} \frac{\cos(4x) - 1}{4x^2} &\stackrel{H}{=} \lim_{x \to 0} \frac{-4\sin(4x)}{8x}\\ &\stackrel{H}{=} \lim_{x \to 0} \frac{-16\cos(4x)}{8}\\ &= \frac{-16}{8} = \boxed{-2} \end{aligned} $$
Let’s now try the following one:
$$ \lim_{x \to +\infty} x \sin \left( \frac{1}{x} \right) $$
We immediately recognize an indeterminate form of the type $[\infty \cdot 0 ]$; therefore, l’Hôpital’s rule cannot be applied directly. We first need to rewrite the expression as a quotient:
$$ \lim_{x \to +\infty} \frac{\sin \left( \frac{1}{x} \right)}{\frac{1}{x}} $$
We now notice that both the numerator and the denominator are differentiable and that both tend to zero as $x \to +\infty$. Additionally, the derivative of the denominator is $-1/x^2$, which is non-zero for every $x > 0$. We can therefore apply the rule:
$$ \begin{aligned} \lim_{x \to +\infty} \frac{\sin \left( \frac{1}{x} \right)}{\frac{1}{x}} &\stackrel{H}{=} \lim_{x \to +\infty} \frac{-\frac{1}{x^2} \cos \left( \frac{1}{x} \right)}{-\frac{1}{x^2}}\\ &= \lim_{x \to +\infty} \cos \left( \frac{1}{x} \right) = \boxed{1} \end{aligned} $$
Bad Examples
Let’s now take a look at a couple of limits for which l’Hôpital’s rule cannot be applied. Consider the following example:
$$ \lim_{x \to 3} \frac{x - 2}{x^2 + 1} $$
If we try to evaluate the limit by direct substitution, we get:
$$ \lim_{x \to 3} \frac{x - 2}{x^2 + 1} = \frac{1}{10} $$
This limit is NOT an indeterminate form. Therefore, we cannot apply l’Hôpital’s rule.
In fact, differentiating the numerator and the denominator and then taking the limit would give:
$$ \lim_{x \to 3} \frac{1}{2x} = \frac{1}{6} $$
which is not the correct value of the original limit.
Finally, consider the following limit:
$$ \lim_{x \to +\infty} \frac{1}{x} $$
The numerator tends to $1$ while the denominator tends to $+\infty$ as $x \to +\infty$, therefore the limit is:
$$ \lim_{x \to +\infty} \frac{1}{x} = 0 $$
Again, this is not an indeterminate form, so l’Hôpital’s rule cannot be applied here. Let’s try applying it anyway. Differentiating the numerator and the denominator would give:
$$ \lim_{x \to +\infty} \frac{0}{1} = 0 $$
Coincidentally, this result is correct. However, since the hypotheses of l’Hôpital’s rule are not satisfied, this application of the rule is NOT justified.