L'Hôpital's Rule: Resolving "0/0" and Its Relatives
What is \( \frac{\sin x}{x} \) when \(x = 0\)? Plugging in gives \( \frac00 \), which is meaningless. Yet the limit exists and equals \(1\). L'Hôpital's rule is the most practical tool for limits like this: when numerator and denominator both vanish (or both blow up), compare how fast they change. This post explains the rule, why it works, when it fails, and how to use it for all seven indeterminate forms.
1. What is an indeterminate form?
Many limits can be computed by simply plugging in. But when both \( f(x) \to 0 \) and \( \varphi(x) \to 0 \), the quotient \( \frac{f(x)}{\varphi(x)} \) can tend to anything:
All three are of the "form \( \frac00 \)", yet their limits differ. The form alone doesn't determine the answer; that's why it is called indeterminate. What decides the limit is the race between numerator and denominator: which one goes to zero faster.
L'Hôpital's rule handles the first two directly. The other five are reduced to them by algebra.
2. The rule for \(\frac00\) and \(\frac\infty\infty\)
L'Hôpital's rule
If the functions \(f(x)\) and \(\varphi(x)\) are both infinitely small or both infinitely large as \(x \to a\), that is, if \( \frac{f(x)}{\varphi(x)} \) is an indeterminate expression of the form \( \frac00 \) or \( \frac\infty\infty \) as \(x \to a\), then
\[ \lim_{x\to a}\frac{f(x)}{\varphi(x)} = \lim_{x\to a}\frac{f'(x)}{\varphi'(x)}, \]
provided the limit on the right exists. The rule also holds when \(a = \infty\).
The precise conditions: \(f\) and \(\varphi\) are differentiable near \(a\) (not necessarily at \(a\) itself), and \( \varphi'(x) \ne 0 \) near \(a\). The limit on the right may be finite or infinite.
The key point: differentiate the numerator and the denominator separately. This is not the quotient rule.
If \( \frac{f'}{\varphi'} \) is again of the form \( \frac00 \) or \( \frac\infty\infty \), apply the rule again, as many times as needed (as long as the conditions keep holding).
3. Why it works
Take the case \( \frac00 \) with \( f(a) = \varphi(a) = 0 \). By Cauchy's mean value theorem (previous post), for \(x\) near \(a\):
\[ \frac{f(x)}{\varphi(x)} = \frac{f(x) - f(a)}{\varphi(x) - \varphi(a)} = \frac{f'(\xi)}{\varphi'(\xi)}, \qquad \xi \text{ between } a \text{ and } x. \]
As \( x \to a \), the point \(\xi\), squeezed between \(a\) and \(x\), also tends to \(a\). So if \( \frac{f'}{\varphi'} \) has a limit, \( \frac{f}{\varphi} \) has the same limit. That's the whole proof.
Intuition: near \(a\), both functions are almost linear (the differential): \( f(x) \approx f'(a)(x - a) \), \( \varphi(x) \approx \varphi'(a)(x - a) \). The factor \( (x - a) \) cancels, leaving the ratio of slopes. When two functions both reach zero, what matters is how fast each one is moving when it gets there.
The case \(a = \infty\) is reduced to \(a = 0\) by the substitution \( x = \frac1t \); the case \( \frac\infty\infty \) needs a slightly more careful argument, but the conclusion is the same.
4. Worked examples
Example 1 · The fundamental trigonometric limit
\[ \lim_{x\to 0}\frac{\sin x}{x} \;\left[\tfrac00\right] = \lim_{x\to 0}\frac{\cos x}{1} = 1. \]
(Strictly speaking this is circular, because the derivative of \(\sin x\) was computed using this very limit. Use it as a check, not a proof.)
Example 3 · Three times
\[ \lim_{x\to 0}\frac{x - \sin x}{x^3} = \lim_{x\to 0}\frac{1 - \cos x}{3x^2} = \lim_{x\to 0}\frac{\sin x}{6x} = \frac16. \]
This agrees with the Taylor series method of the post on power series, where \( x - \sin x = \frac{x^3}{6} - \cdots \).
Example 4 · The form \(\frac\infty\infty\)
\[ \lim_{x\to\infty}\frac{\ln x}{x} \;\left[\tfrac\infty\infty\right] = \lim_{x\to\infty}\frac{1/x}{1} = 0. \]
The logarithm grows, but much more slowly than \(x\).
Example 5 · Repeated application
For any natural \(n\),
\[ \lim_{x\to\infty}\frac{x^n}{e^x} = \lim_{x\to\infty}\frac{nx^{n-1}}{e^x} = \cdots = \lim_{x\to\infty}\frac{n!}{e^x} = 0. \]
After \(n\) steps the power has disappeared, while \(e^x\) is unchanged by differentiation. The exponential beats every power.
Example 6 · Simplify between the steps
\[ \lim_{x\to 0}\frac{e^x - e^{-x}}{\sin x} = \lim_{x\to 0}\frac{e^x + e^{-x}}{\cos x} = \frac{2}{1} = 2. \]
In longer problems, cancel common factors and replace factors with known limits (like \( \frac{\sin x}{x} \to 1 \)) between applications. Otherwise the derivatives can grow messier at each step.
5. Common mistakes and limitations
Mistake 1 · Using the rule when the form is not indeterminate
\[ \lim_{x\to 1}\frac{x^2 + 1}{x + 1} = \frac22 = 1. \]
Applying the rule anyway would give \( \lim_{x\to1}\frac{2x}{1} = 2 \), which is wrong. Always check first that you really have \( \frac00 \) or \( \frac\infty\infty \), and check again before every repeated application.
Mistake 2 · Using the quotient rule
The rule is \( \frac{f'}{\varphi'} \), the ratio of the two derivatives. It is not \( \left(\frac f\varphi\right)' = \frac{f'\varphi - f\varphi'}{\varphi^2} \).
Limitation · The limit of \(\frac{f}{\varphi}\) may exist when that of \(\frac{f'}{\varphi'}\) does not
\[ \lim_{x\to\infty}\frac{x + \sin x}{x} = \lim_{x\to\infty}\Big(1 + \frac{\sin x}{x}\Big) = 1. \]
But the rule gives \( \frac{1 + \cos x}{1} \), which oscillates between \(0\) and \(2\) and has no limit. The rule only says: if the right-hand limit exists, the left one equals it. If the right-hand limit does not exist, the rule says nothing, and you must try another method.
Limitation · The rule can go in circles
For \( \lim_{x\to\infty}\frac{\sqrt{x^2 + 1}}{x} \), each application swaps numerator and denominator:
\[ \frac{\sqrt{x^2+1}}{x} \to \frac{x/\sqrt{x^2+1}}{1} = \frac{x}{\sqrt{x^2+1}} \to \frac{\sqrt{x^2+1}}{x} \to \cdots \]
Algebra is quicker: \( \frac{\sqrt{x^2+1}}{x} = \sqrt{1 + \frac1{x^2}} \to 1 \). L'Hôpital's rule is a tool, not a replacement for simplification.
6. The forms \(0\cdot\infty\) and \(\infty - \infty\)
6.1 The form \(0\cdot\infty\)
Rule
If \( \lim_{x\to a}f_1(x) = 0 \) and \( \lim_{x\to a}f_2(x) = \infty \), write the product \( f_1(x)\cdot f_2(x) \) in the form
\[ \frac{f_1(x)}{\dfrac{1}{f_2(x)}} \quad \left(\text{type } \tfrac00\right) \qquad \text{or} \qquad \frac{f_2(x)}{\dfrac{1}{f_1(x)}} \quad \left(\text{type } \tfrac\infty\infty\right), \]
and find the limit as in Section 2.
Which form to choose? The one whose derivatives are simpler. A good rule of thumb: keep the logarithm (or inverse trigonometric function) in the numerator, because its derivative is simple, and move the power into the denominator.
Example 7 · \( \lim_{x\to 0^+} x\ln x \)
Good choice (type \(\frac\infty\infty\)):
\[ \lim_{x\to 0^+}\frac{\ln x}{1/x} = \lim_{x\to 0^+}\frac{1/x}{-1/x^2} = \lim_{x\to 0^+}(-x) = 0. \]
Bad choice (type \(\frac00\)): \( \frac{x}{1/\ln x} \) gives \( \frac{1}{-1/(x\ln^2x)} = -x\ln^2x \), which is more complicated than what we started with. Both choices are legal; only one is useful. The result means: \(x \to 0\) wins against \(\ln x \to -\infty\).
6.2 The form \(\infty - \infty\)
Rule
In the case \( \infty - \infty \), transform \( f_1(x) - f_2(x) \) into
\[ f_1(x)\left[1 - \frac{f_2(x)}{f_1(x)}\right]. \]
If \( \lim_{x\to a}\frac{f_2(x)}{f_1(x)} = 1 \), the indeterminacy has been reduced to the previous case, \( \infty\cdot 0 \).
(If that ratio tends to a number other than \(1\), there is nothing indeterminate left: the bracket tends to a nonzero number and the whole expression tends to \(\pm\infty\).) In practice, two other transformations are often quicker: bringing fractions to a common denominator, or multiplying by a conjugate expression.
Example 8 · Common denominator
\[ \lim_{x\to 0}\left(\frac1x - \frac{1}{\sin x}\right) = \lim_{x\to 0}\frac{\sin x - x}{x\sin x} \;\left[\tfrac00\right] = \lim_{x\to 0}\frac{\cos x - 1}{\sin x + x\cos x} \;\left[\tfrac00\right] = \lim_{x\to 0}\frac{-\sin x}{2\cos x - x\sin x} = 0. \]
Example 9 · Factoring out, as in the book
\( \lim_{x\to\infty}\big(\sqrt{x^2 + x} - x\big) \). Factor out \(x\) (here \( \frac{f_2}{f_1} = \frac{x}{\sqrt{x^2 + x}} \to 1 \)):
\[ x\left[\sqrt{1 + \tfrac1x} - 1\right] = \frac{\sqrt{1 + t} - 1}{t} \quad (t = \tfrac1x \to 0^+) \quad \longrightarrow \quad \lim_{t\to 0}\frac{\frac{1}{2\sqrt{1+t}}}{1} = \frac12. \]
7. The forms \(1^\infty\), \(0^0\) and \(\infty^0\)
These arise for expressions of the form \( [f_1(x)]^{f_2(x)} \), where both the base and the exponent vary.
Rule · Take the logarithm
Put \( y = [f_1(x)]^{f_2(x)} \). Then
\[ \ln y = f_2(x)\ln f_1(x), \]
and in all three cases this is of the form \(0\cdot\infty\):
Find \( \lim\ln y = L \) as in Section 6; then \( \lim y = e^L \).
Don't forget the last step
The most frequent error is to compute \(L = \lim\ln y\) and report \(L\) as the answer. The answer is \( e^L \).
Example 10 · The number \(e\): type \(1^\infty\)
\( y = \big(1 + \frac1x\big)^x \), \( x \to \infty \). Then with \( t = \frac1x \):
\[ \ln y = x\ln\Big(1 + \frac1x\Big) = \frac{\ln(1 + t)}{t} \;\left[\tfrac00\right] \longrightarrow \frac{1/(1 + t)}{1}\Big|_{t\to0} = 1. \]
So \( \lim_{x\to\infty}\big(1 + \frac1x\big)^x = e^1 = e \). The intuitive guess "\(1\) to any power is \(1\)" is wrong: the base approaches \(1\) while the exponent explodes, and they balance at \(e\).
Example 11 · Type \(0^0\)
\( \lim_{x\to 0^+}x^x \): \( \ln y = x\ln x \to 0 \) (Example 7), so \( \lim x^x = e^0 = 1 \).
Example 12 · Type \(\infty^0\)
\( \lim_{x\to\infty}x^{1/x} \): \( \ln y = \frac{\ln x}{x} \to 0 \) (Example 4), so \( \lim x^{1/x} = 1 \).
Example 13 · A less obvious \(1^\infty\)
\( \lim_{x\to 0}(\cos x)^{1/x^2} \):
\[ \ln y = \frac{\ln\cos x}{x^2} \;\left[\tfrac00\right] = \frac{-\operatorname{tg}x}{2x} \longrightarrow -\frac12. \]
So the limit is \( e^{-1/2} = \frac{1}{\sqrt e} \approx 0.607 \).
Every power beats every logarithm (even \(\sqrt[100]{x}\) eventually beats \(\ln x\)), and every exponential beats every power. Once you know this table, many limits can be answered at a glance. The same hierarchy explains the convergence tests from the first posts of the series: why \( \sum\frac{n^{10}}{2^n} \) converges, and why \( \sum\frac{1}{n\ln n} \) diverges more slowly than the harmonic series.
Common denominator: \( \frac{x\ln x - x + 1}{(x - 1)\ln x} \left[\tfrac00\right] \to \frac{\ln x}{\ln x + 1 - \frac1x} \left[\tfrac00\right] \to \frac{1/x}{\frac1x + \frac1{x^2}} \to \frac{1}{2} \).
Problem 6: \( \displaystyle\lim_{x\to\infty}\Big(1 + \frac ax\Big)^x \)
\( \ln y = x\ln\big(1 + \frac ax\big) = \frac{\ln(1 + at)}{t} \) with \(t = \frac1x\), which tends to \(a\). So the limit is \( e^a \).
Problem 7: \( \displaystyle\lim_{x\to 0^+}x^{\sin x} \)
Type \(0^0\): \( \ln y = \sin x\ln x = \frac{\sin x}{x}\cdot x\ln x \to 1\cdot 0 = 0 \). The limit is \( e^0 = 1 \).
Problem 8: Why can't L'Hôpital's rule be used for \( \displaystyle\lim_{x\to\infty}\frac{x - \cos x}{x + \cos x} \)? Find the limit anyway.
The rule gives \( \frac{1 + \sin x}{1 - \sin x} \), which has no limit (and is even undefined where \(\sin x = 1\)). Divide by \(x\) instead: \( \frac{1 - \frac{\cos x}{x}}{1 + \frac{\cos x}{x}} \to 1 \).
Final thoughts
L'Hôpital's rule turns a question about values ("what is \(\frac00\)?") into a question about rates ("which side is changing faster?"). It comes straight from Cauchy's mean value theorem, works for \( \frac00 \) and \( \frac\infty\infty \), and with a little algebra handles the other five indeterminate forms as well. Used carelessly, it gives wrong answers; used with the checklist above, it is the fastest route to most limits you will meet in calculus.