13 L’Hôpital’s Rule
13.1 Motivation: Indeterminate Forms Revisited
In Section 5.1, we encountered indeterminate forms such as \frac{0}{0} when computing limits. We resolved these using algebraic manipulations—factoring, rationalizing, or trigonometric identities. While effective for elementary functions, these methods become cumbersome or intractable for more complex expressions.
Consider the limit \lim_{x \to 0} \frac{e^x - 1 - x}{x^2}.
Direct substitution yields \frac{0}{0}. Factoring is not obvious, and algebraic techniques offer no clear path forward. Yet this limit arises naturally when studying the error in linear approximations of the exponential function.
L’Hôpital’s Rule provides a systematic method for evaluating such limits by comparing the differentials df_x and dg_x at nearby points. Recall from Section 8.5 that the differential df_a(h) = f'(a)h is a linear functional measuring the approximate change in f. When both f and g vanish at a, their ratio is indeterminate, but the ratio of their rates of change—that is, the ratio \frac{df_x(1)}{dg_x(1)} = \frac{f'(x)}{g'(x)}—may have a well-defined limit.
Named after Guillaume de l’Hôpital (1661–1704), who published it in the first differential calculus textbook, the rule was actually discovered by Johann Bernoulli.
13.2 The Theorem
Theorem 13.1 (L’Hôpital’s Rule (0/0 Form)) Let f and g be differentiable functions on an open interval I containing a, except possibly at a itself. Suppose
- \lim_{x \to a} f(x) = 0 and \lim_{x \to a} g(x) = 0
- dg_x \neq 0 for all x \in I with x \neq a (equivalently, g'(x) \neq 0)
- \lim_{x \to a} \frac{df_x(1)}{dg_x(1)} = L (equivalently, \lim_{x \to a} \frac{f'(x)}{g'(x)} = L)
Then \lim_{x \to a} \frac{f(x)}{g(x)} = L.
Remark. The rule also holds for x \to \infty, and for the indeterminate form \frac{\infty}{\infty}, with appropriate modifications to the hypotheses.
The rigorous proof relies on a generalized version of the Mean Value Theorem called Cauchy’s Mean Value Theorem, which states that under suitable conditions, there exists c between a and x such that \frac{f(x) - f(a)}{g(x) - g(a)} = \frac{f'(c)}{g'(c)}.
Since f(a) = g(a) = 0 (by the limit conditions), this reduces to \frac{f(x)}{g(x)} = \frac{f'(c)}{g'(c)}.
As x \to a, we have c \to a, and if \frac{f'(c)}{g'(c)} \to L, then \frac{f(x)}{g(x)} \to L. The full proof requires careful handling of the limit process and is omitted here. \square
13.2.0.1 Example
Evaluate \lim_{x \to 0} \frac{\sin x}{x}.
Solution. Direct substitution gives \frac{0}{0}. Apply L’Hôpital’s Rule: \lim_{x \to 0} \frac{\sin x}{x} = \lim_{x \to 0} \frac{(\sin x)'}{(x)'} = \lim_{x \to 0} \frac{\cos x}{1} = \cos 0 = 1.
This confirms the limit established in Theorem 5.6 through geometric arguments.
Connection to Differentials: At each x \neq 0, we have d(\sin x)_x = \cos x \cdot h and dx_x = 1 \cdot h. The ratio of differentials evaluated at h=1 is \frac{d(\sin x)_x(1)}{dx_x(1)} = \cos x, which approaches 1 as x \to 0. :::
Example 13.1 (Exponential Linear Approximation Error) Evaluate \lim_{x \to 0} \frac{e^x - 1 - x}{x^2}.
Solution. We have \frac{0}{0}. Applying L’Hôpital’s Rule, \lim_{x \to 0} \frac{e^x - 1 - x}{x^2} = \lim_{x \to 0} \frac{e^x - 1}{2x}.
This is still \frac{0}{0}, so we apply the rule again: \lim_{x \to 0} \frac{e^x - 1}{2x} = \lim_{x \to 0} \frac{e^x}{2} = \frac{1}{2}.
Thus the original limit equals \frac{1}{2}.
The error in the linear approximation e^x \approx 1 + x is approximately \frac{x^2}{2} for small x, consistent with the second-order term in the Taylor expansion of e^x.
Example 13.2 (Logarithm Derivative Check) Evaluate \lim_{x \to 1} \frac{\ln x}{x - 1}.
Solution. Direct substitution yields \frac{0}{0}. Applying L’Hôpital’s Rule, \lim_{x \to 1} \frac{\ln x}{x - 1} = \lim_{x \to 1} \frac{1/x}{1} = \frac{1}{1} = 1.
This limit represents the derivative of \ln x at x = 1, as expected from the definition of the derivative.
13.3 The \frac{\infty}{\infty} Form
L’Hôpital’s Rule also applies when both numerator and denominator approach infinity. Though the functions themselves grow unbounded, their relative rates of change—encoded in the ratio of differentials—may stabilize.
Theorem 13.2 (L’Hôpital’s Rule (∞/∞ Form)) Let f and g be differentiable on an interval (a, \infty). Suppose
- \lim_{x \to \infty} f(x) = \infty and \lim_{x \to \infty} g(x) = \infty
- dg_x \neq 0 for all sufficiently large x (equivalently, g'(x) \neq 0)
- \lim_{x \to \infty} \frac{df_x(1)}{dg_x(1)} = L (equivalently, \lim_{x \to \infty} \frac{f'(x)}{g'(x)} = L)
Then \lim_{x \to \infty} \frac{f(x)}{g(x)} = L.
The same holds for x \to a where a is finite.
Example 13.3 (Polynomial vs Exponential) Evaluate \lim_{x \to \infty} \frac{x^2}{e^x}.
Solution. Both numerator and denominator approach infinity. Applying L’Hôpital’s Rule, \lim_{x \to \infty} \frac{x^2}{e^x} = \lim_{x \to \infty} \frac{2x}{e^x}.
This is still \frac{\infty}{\infty}. Apply the rule again: \lim_{x \to \infty} \frac{2x}{e^x} = \lim_{x \to \infty} \frac{2}{e^x} = 0.
Exponential growth dominates polynomial growth. No matter the degree of the polynomial, e^x grows faster.
Example 13.4 (Logarithm vs Linear Growth) Evaluate \lim_{x \to \infty} \frac{\ln x}{x}.
Solution. This has the form \frac{\infty}{\infty}. Applying L’Hôpital’s Rule, \lim_{x \to \infty} \frac{\ln x}{x} = \lim_{x \to \infty} \frac{1/x}{1} = \lim_{x \to \infty} \frac{1}{x} = 0.
Logarithmic growth is slower than any positive power of x.
13.4 Other Indeterminate Forms
Beyond \frac{0}{0} and \frac{\infty}{\infty}, several other forms are indeterminate: 0 \cdot \infty, \infty - \infty, 0^0, 1^\infty, and \infty^0. These can often be transformed into a form suitable for L’Hôpital’s Rule through algebraic manipulation.
13.4.1 The Form 0 \cdot \infty
If \lim_{x \to a} f(x) = 0 and \lim_{x \to a} g(x) = \infty, then \lim_{x \to a} f(x) g(x) is indeterminate. Rewrite it as f(x) g(x) = \frac{f(x)}{1/g(x)} \quad \text{or} \quad \frac{g(x)}{1/f(x)}, converting to \frac{0}{0} or \frac{\infty}{\infty}.
Example 13.5 (Limit of x \ln x) Evaluate \lim_{x \to 0^+} x \ln x (Section 6.6.2).
Solution. As x \to 0^+, we have x \to 0 and \ln x \to -\infty, giving the form 0 \cdot (-\infty). Rewrite: x \ln x = \frac{\ln x}{1/x}.
This has the form \frac{-\infty}{\infty}. Applying L’Hôpital’s Rule, \lim_{x \to 0^+} \frac{\ln x}{1/x} = \lim_{x \to 0^+} \frac{1/x}{-1/x^2} = \lim_{x \to 0^+} \frac{x^2}{-x} = \lim_{x \to 0^+} (-x) = 0.
Thus \lim_{x \to 0^+} x \ln x = 0.
13.4.2 The Forms 1^\infty, 0^0, \infty^0
For limits of the form \lim_{x \to a} [f(x)]^{g(x)} where the base and exponent lead to an indeterminate form, take the logarithm: \ln\left([f(x)]^{g(x)}\right) = g(x) \ln f(x).
Evaluate the limit of g(x) \ln f(x) (often reducing to 0 \cdot \infty), then exponentiate the result.
Example 13.6 (Limit of x^x) Evaluate \lim_{x \to 0^+} x^x.
Solution. As x \to 0^+, this has the form 0^0. Let y = x^x. Then \ln y = x \ln x.
From Example 6, \lim_{x \to 0^+} x \ln x = 0. Therefore, \lim_{x \to 0^+} \ln y = 0 \implies \lim_{x \to 0^+} y = e^0 = 1.
Thus \lim_{x \to 0^+} x^x = 1.
13.5 Common Pitfalls and Cautions
13.5.1 When L’Hôpital’s Rule Does NOT Apply
The rule requires the limit of \frac{f'(x)}{g'(x)} to exist. If this limit does not exist, the rule gives no information.
13.5.1.1 Example
Consider \lim_{x \to \infty} \frac{x + \sin x}{x}.
Direct evaluation gives \frac{\infty}{\infty}. Applying L’Hôpital’s Rule, \lim_{x \to \infty} \frac{x + \sin x}{x} \stackrel{?}{=} \lim_{x \to \infty} \frac{1 + \cos x}{1}.
But \lim_{x \to \infty} (1 + \cos x) does not exist—it oscillates between 0 and 2. The rule fails.
Correct approach: Factor out x: \lim_{x \to \infty} \frac{x + \sin x}{x} = \lim_{x \to \infty} \left(1 + \frac{\sin x}{x}\right) = 1 + 0 = 1.
13.5.2 Repeated Application
L’Hôpital’s Rule may be applied repeatedly, but only if each application yields an indeterminate form. Stop when the limit can be evaluated directly.
13.5.3 Derivatives Must Exist
The rule assumes f' and g' exist near a (except possibly at a). If the derivatives fail to exist, the rule does not apply.
13.6 Growth Rate Hierarchies
One of the most important applications of L’Hôpital’s Rule is establishing the hierarchy of growth rates for elementary functions. These results, stated in Section 6.1, formalize the intuition that logarithms grow slower than polynomials, which grow slower than exponentials.
We now prove these fundamental relationships rigorously.
Theorem 13.3 (Standard Growth Rates) As x \to \infty:
For a > b > 0: x^a \gg x^b (that is, \lim_{x \to \infty} \frac{x^b}{x^a} = 0).
For any n \in \mathbb{N}: e^x \gg x^n (that is, \lim_{x \to \infty} \frac{x^n}{e^x} = 0).
For any a > 0: x^a \gg \ln x (that is, \lim_{x \to \infty} \frac{\ln x}{x^a} = 0).
- Let a > b > 0. We must show \lim_{x \to \infty} \frac{x^b}{x^a} = 0.
Simplify: \frac{x^b}{x^a} = x^{b-a} = \frac{1}{x^{a-b}}.
Since a - b > 0, we have x^{a-b} \to \infty as x \to \infty, so \lim_{x \to \infty} \frac{1}{x^{a-b}} = 0.
- Let n \in \mathbb{N}. We must show \lim_{x \to \infty} \frac{x^n}{e^x} = 0.
This has the form \frac{\infty}{\infty}. Apply L’Hôpital’s Rule: \lim_{x \to \infty} \frac{x^n}{e^x} = \lim_{x \to \infty} \frac{nx^{n-1}}{e^x}.
This is still \frac{\infty}{\infty}. Apply the rule again, \lim_{x \to \infty} \frac{nx^{n-1}}{e^x} = \lim_{x \to \infty} \frac{n(n-1)x^{n-2}}{e^x}.
Continue applying L’Hôpital’s Rule. After n applications, the numerator becomes the constant n!, while the denominator remains e^x: \lim_{x \to \infty} \frac{x^n}{e^x} = \lim_{x \to \infty} \frac{n!}{e^x} = 0.
Thus the exponential function e^x dominates any polynomial x^n.
- Let a > 0. We must show \lim_{x \to \infty} \frac{\ln x}{x^a} = 0.
This has the form \frac{\infty}{\infty}. Apply L’Hôpital’s Rule: \lim_{x \to \infty} \frac{\ln x}{x^a} = \lim_{x \to \infty} \frac{(\ln x)'}{(x^a)'} = \lim_{x \to \infty} \frac{1/x}{ax^{a-1}}.
Simplify: \lim_{x \to \infty} \frac{1/x}{ax^{a-1}} = \lim_{x \to \infty} \frac{1}{ax^a} = 0.
Thus the logarithm grows slower than any positive power of x. \square
13.6.1 Consequences and Extensions
These three results establish the fundamental growth hierarchy:
\ln x \ll x^a \ll x^b \ll e^x \quad \text{for } 0 < a < b.
More generally, we can establish a complete ordering:
\log(\log x) \ll \ln x \ll x^{1/n} \ll x \ll x \ln x \ll x^2 \ll x^n \ll e^x \ll e^{x^2} \ll e^{e^x}.
Example 13.7 (Comparing Growth Rates) Show that \lim_{x \to \infty} \frac{x^{100}}{e^{0.01x}} = 0.
Solution. Let u = 0.01x. As x \to \infty, we have u \to \infty and x = 100u. Thus: \frac{x^{100}}{e^{0.01x}} = \frac{(100u)^{100}}{e^u} = 100^{100} \cdot \frac{u^{100}}{e^u}.
By Part 2 of Theorem 13.3, \lim_{u \to \infty} \frac{u^{100}}{e^u} = 0, so \lim_{x \to \infty} \frac{x^{100}}{e^{0.01x}} = 100^{100} \cdot 0 = 0.
Even with a very large polynomial degree and a small exponential coefficient, the exponential dominates.
Example 13.8 (Logarithm vs. Root) Show that \lim_{x \to \infty} \frac{\ln x}{\sqrt{x}} = 0.
Solution. Apply Part 3 of Theorem 13.3 with a = 1/2: \lim_{x \to \infty} \frac{\ln x}{x^{1/2}} = 0.
Thus even a very slow-growing power function (square root) dominates the logarithm.
:::{#exm-iterated-logarithms} ### Iterated Logarithms
We can extend the hierarchy to iterated functions. For instance, \ln(\ln x) grows even slower than \ln x.
Show that \lim_{x \to \infty} \frac{\ln(\ln x)}{\ln x} = 0.
Solution. Let u = \ln x. As x \to \infty, we have u \to \infty. Then: \frac{\ln(\ln x)}{\ln x} = \frac{\ln u}{u}.
By Part 3 of Theorem 13.3 (with a = 1), \lim_{u \to \infty} \frac{\ln u}{u} = 0.
Thus \ln(\ln x) = o(\ln x) as x \to \infty.