LocusBlog

L'Hopital's rule, its two hypotheses, and the loops it gets stuck in

L’Hopital’s rule turns a limit of a quotient into a limit of the quotient of the derivatives. If $f$ and $g$ are differentiable on an interval around $a$ (except possibly at $a$), if $g'(x) \neq 0$ there, and if

$$\lim_{x \to a} \frac{f(x)}{g(x)} \quad\text{has the form}\quad \frac{0}{0} \quad\text{or}\quad \frac{\pm\infty}{\pm\infty}$$

then

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

provided the limit on the right exists or is $\pm\infty$. The same statement holds for one-sided limits and for $a = \pm\infty$. The name is also written L’Hospital, which is the older French spelling of the same marquis’s name; the two spellings refer to one rule.

Say the operation out loud before using it: differentiate the numerator, and separately differentiate the denominator. This is not the quotient rule. There is no $g^2$ in the denominator and no minus sign anywhere. The two rules look superficially alike and do unrelated jobs, and writing $\frac{f'g - fg'}{g^2}$ here produces a limit that has nothing to do with the question.

The forms, and which ones have to be rewritten first

Only $0/0$ and $\infty/\infty$ are admissible, because the proof is a Cauchy mean-value argument about two functions that collapse together. Every other indeterminate form has to be turned into a quotient of one of those two shapes before the rule is allowed to touch it.

$0 \cdot \infty$ becomes a quotient by moving one factor into the denominator as a reciprocal. For $\lim_{x\to 0^+} x\ln x$, putting $x$ underneath gives $\infty/\infty$:

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

At $x = 10^{-6}$ the original product is $-1.38\times10^{-5}$, heading to zero as promised. Note that the other choice, writing it as $x/(1/\ln x)$, is legal and gets worse each time you differentiate. Pick the arrangement whose derivatives simplify.

$\infty - \infty$ becomes a quotient by combining over a common denominator or rationalising. $0^0$, $\infty^0$ and $1^\infty$ are power forms, and they go through the logarithm: set $L = \lim f^g$, take $\ln$ of both sides to get $\lim g\ln f$, which is a $0\cdot\infty$ form, resolve that, and exponentiate at the end. For $(1+1/x)^x$ as $x \to \infty$ the logarithm is

$$\lim_{x\to\infty}\frac{\ln(1+1/x)}{1/x} = \lim_{x\to\infty}\frac{\frac{-1/x^2}{1+1/x}}{-1/x^2} = \lim_{x\to\infty}\frac{1}{1+1/x} = 1$$

so the original limit is $e^1 = e$. Forgetting to exponentiate leaves you with $1$ instead of $2.71828$, which is the standard way to lose that problem.

Applying it twice

Nothing stops you from using the rule again on the new quotient, as long as the new quotient is itself indeterminate. Check that each time.

$$\lim_{x\to0}\frac{e^x - 1 - x}{x^2}$$

At $x = 0$ the numerator is $1 - 1 - 0 = 0$ and the denominator is $0$, so the rule applies:

$$\lim_{x\to0}\frac{e^x - 1}{2x}$$

That is $0/0$ again. Apply it a second time:

$$\lim_{x\to0}\frac{e^x}{2} = \frac{1}{2}$$

Check it another way. The Taylor expansion $e^x = 1 + x + x^2/2 + x^3/6 + \cdots$ makes the numerator $x^2/2 + x^3/6 + \cdots$, so the quotient is $1/2 + x/6 + \cdots$, which tends to $1/2$ and also predicts how it approaches: slightly above $1/2$ for small positive $x$. Numerically, at $x = 0.01$ the quotient is $0.5016708$, and at $x = 0.001$ it is $0.5001667$. Both sit just above $1/2$ by roughly $x/6$, exactly as the series says.

Using it where it does not apply

The first failure mode is applying the rule to a quotient that is not indeterminate. The rule then returns a number, and the number is usually wrong.

$$\lim_{x\to0}\frac{\sin x + x}{\cos x + x}$$

This looks like a job for L’Hopital, and it is not one. The numerator tends to $0$; the denominator tends to $1$. The form is $0/1$, which is determinate, and the limit is $0$ by direct substitution. Differentiate top and bottom anyway and you get

$$\lim_{x\to0}\frac{\cos x + 1}{1 - \sin x} = \frac{2}{1} = 2$$

Two instead of zero. Evaluating the original expression at $x = 0.001$ gives $0.001998$, so the answer really is heading to zero and the rule really did fabricate a $2$. There is no warning bell inside the algebra. The only defence is the habit of substituting first and confirming the form before writing a single derivative.

The second failure mode is a rule that applies, works, and gets nowhere.

$$\lim_{x\to\infty}\frac{x}{\sqrt{x^2+1}}$$

Both parts go to infinity, so the hypotheses hold. Differentiating gives

$$\lim_{x\to\infty}\frac{1}{x/\sqrt{x^2+1}} = \lim_{x\to\infty}\frac{\sqrt{x^2+1}}{x}$$

which is the original quotient upside down. Apply the rule again and the original comes back. You can do this all afternoon. Nothing is invalid here - the limit on the right does exist - the rule is simply not making progress, because differentiation does not simplify a ratio of things that grow at the same rate.

Algebra settles it in one line. Divide numerator and denominator by $x$, which for $x > 0$ means taking $x$ inside the root as $x^2$:

$$\frac{x}{\sqrt{x^2+1}} = \frac{1}{\sqrt{1 + 1/x^2}} \longrightarrow 1$$

At $x = 1000$ the quotient is $0.9999995$. The two-line rule to take away: if the quotient after differentiating is not visibly simpler than the one before, stop and try algebra.

One more hypothesis is worth naming because it is the one textbooks state and nobody reads. The conclusion requires that $\lim f'/g'$ exist. If it does not, the rule says nothing at all - it does not say the original limit fails to exist. For $\lim_{x\to\infty}\frac{x + \sin x}{x}$ the answer is plainly $1$, since $\sin x/x \to 0$, but the derivative quotient is $1 + \cos x$, which oscillates forever and has no limit. A failed application is not evidence.

L’Hopital’s rule is the standard tool for comparing growth rates, and it is where a course usually settles which of $\ln x$, $x^p$ and $e^x$ wins at infinity. Practise it on L’Hopital’s rule problems, work the algebraic cases alongside it in limits at infinity so the two stay separate in your head, and the study guide section covers the indeterminate forms one at a time.

References