L'Hôpital's rule
Statement
Let \( -\infty \le a \lt b \le +\infty \), and let \( f, g : (a,b) \to \mathbb{R} \) be differentiable at every point of \( (a,b) \), with \( g'(x) \neq 0 \) for all \( x \in (a,b) \). Suppose the limit \[ \lim_{x \to a^{+}} \frac{f'(x)}{g'(x)} = L \] exists in the extended real line, \( L \in \mathbb{R} \cup \{-\infty, +\infty\} \). Assume further that one of the following holds: (i) \( f(x) \to 0 \) and \( g(x) \to 0 \) as \( x \to a^{+} \) (the \( 0/0 \) form), or (ii) \( g(x) \to +\infty \) or \( g(x) \to -\infty \) as \( x \to a^{+} \) — note that in case (ii) no hypothesis at all is placed on the behaviour of \( f \). Then \( g(x) \neq 0 \) on some interval \( (a, c_0) \), so the quotient \( f/g \) is defined there, and \[ \lim_{x \to a^{+}} \frac{f(x)}{g(x)} = L. \] The mirror statement holds for \( x \to b^{-} \), and the two-sided version at an interior point follows by combining the two one-sided statements. Since \( a = -\infty \) and \( b = +\infty \) are permitted, limits at infinity are covered by the same theorem.
Why it matters
Limits of the form \( 0/0 \) and \( \ast/\infty \) are exactly the ones that the algebra of limits cannot touch: the limit laws for quotients require the denominator's limit to be finite and nonzero. Yet these indeterminate forms are the forms that matter — every derivative is itself a \( 0/0 \) limit. L'Hôpital's rule converts such a limit into a limit of derivatives, which is very often simpler, and it may be iterated as long as the hypotheses keep holding.
Structurally, the theorem is the Cauchy mean value theorem put to work: it says that the local linear (first-order) behaviour of \( f \) and \( g \) controls the limit of their ratio. It is also a cautionary tale in hypothesis-checking — nearly every hypothesis, when dropped, admits a famous counterexample, which makes it one of the best training grounds in a first analysis course for reading a theorem exactly as stated.
Hypotheses
Proof
Throughout, \( a \lt x \lt y \lt b \) denote points of \( (a,b) \); we prove the statement for \( x \to a^{+} \), the case \( x \to b^{-} \) being symmetric. In case (ii) we assume \( g \to +\infty \); if \( g \to -\infty \), replace \( g \) by \( -g \) and \( L \) by \( -L \) and apply the result proved.
Result
Reading. When a limit of a quotient is genuinely indeterminate, you may pass to the quotient of derivatives — provided that new limit actually exists (finitely or infinitely). The traffic is one-way: information flows from \( f'/g' \) to \( f/g \), never back.
Scope. One-sided limits at any \( a \in [-\infty, +\infty] \), hence also two-sided limits at interior points; \( L \) may be \( \pm\infty \); real-valued functions only. In the \( \infty \)-case only \( |g| \to \infty \) is required, with no condition on \( f \). The rule may be iterated, re-verifying all hypotheses at each stage. It fails for complex- or vector-valued \( f \).
Corollaries & converses
- Limit of the derivative. If \( f \) is continuous at \( a \), differentiable on a punctured neighbourhood, and \( \lim_{x \to a} f'(x) = L \in \mathbb{R} \) exists, then \( f'(a) \) exists and equals \( L \): apply the rule to \( \frac{f(x) - f(a)}{x - a} \) (a \( 0/0 \) form with \( g' = 1 \)). Consequence: a derivative can have no removable discontinuity.
- Comparison scale. \( \ln x = o(x^{\alpha}) \) and \( x^{\alpha} = o(e^{\beta x}) \) as \( x \to +\infty \) for all \( \alpha, \beta \gt 0 \) — each is one application (or an induction) of the \( \infty \)-case.
- Discrete analogue. The Stolz–Cesàro theorem: if \( (b_n) \) is strictly monotone and unbounded and \( \frac{a_{n+1} - a_n}{b_{n+1} - b_n} \to L \), then \( \frac{a_n}{b_n} \to L \). Same skeleton, with the mean value theorem replaced by a summation-by-parts estimate.
- Other indeterminate forms for free. \( 0 \cdot \infty \), \( \infty - \infty \), \( 0^0 \), \( 1^{\infty} \), \( \infty^0 \) all reduce to \( 0/0 \) or \( \ast/\infty \) by algebra and logarithms; the rule then applies to the reduced form.
- The converse is false. \( \lim f/g \) may exist while \( \lim f'/g' \) does not: \( f(x) = x^2 \sin(1/x) \), \( g(x) = x \) at \( 0 \) gives \( f/g \to 0 \) but \( f'/g' = 2x\sin(1/x) - \cos(1/x) \) divergent. Existence of \( \lim f/g \) never licenses any conclusion about \( \lim f'/g' \).
Fails without
- No indeterminate form: \( \lim_{x \to 0} \frac{x}{x+1} = 0 \), but differentiating top and bottom gives \( \frac{1}{1} \to 1 \). The rule applied to a determinate form produces garbage, not merely "no information".
- \( g' \) vanishing arbitrarily close to the limit point: with \( f(x) = x + \sin x \cos x \) and \( g(x) = e^{\sin x}(x + \sin x \cos x) \) as \( x \to +\infty \), the derivative quotient \( \frac{f'}{g'} = \frac{2 e^{-\sin x}\cos x}{x + \sin x \cos x + 2 \cos x} \to 0 \) wherever defined, yet \( \frac{f}{g} = e^{-\sin x} \) oscillates in \( [e^{-1}, e] \) and has no limit. Both are \( \to \infty \), both differentiable everywhere; only the hypothesis \( g' \neq 0 \) fails (at each zero of \( \cos x \)).
- Complex values: \( f(x) = x \), \( g(x) = x + x^2 e^{i/x^2} \) on \( (0,1) \): here \( f/g \to 1 \) but \( f'/g' \to 0 \) as \( x \to 0^{+} \). The mean value equality has no complex-valued analogue, and the proof collapses with it.
Common errors
- Rule of first resort. Differentiating without first verifying an indeterminate form — the single most common way to convert a correct limit into a wrong one (see \( x/(x+1) \) above).
- Circular reasoning. "Proving" \( \lim_{x \to 0} \frac{\sin x}{x} = 1 \) by the rule: differentiating \( \sin \) presupposes \( (\sin)'(0) = \lim_{x \to 0} \frac{\sin x}{x} \), the very limit in question. The rule is valid there; the proof is circular.
- Illegitimate converse. Concluding "\( \lim f/g \) does not exist" because \( \lim f'/g' \) does not exist. The theorem is a one-way implication; when \( f'/g' \) oscillates, the rule says nothing.
- Quotient rule contamination. Computing \( \left( \frac{f}{g} \right)' \) instead of \( \frac{f'}{g'} \). The rule differentiates numerator and denominator separately.
- Iterating on autopilot. Applying the rule a second or third time without rechecking indeterminacy at each stage: \( \frac{1 - \cos x}{x^2} \to \frac{\sin x}{2x} \to \frac{\cos x}{2} \) is fine, but one differentiation too many past a determinate stage is the first error in disguise.
- Bad rearrangement of \( 0 \cdot \infty \). For \( \lim_{x \to \infty} x e^{-x} \), writing \( \frac{e^{-x}}{1/x} \) leads in circles; writing \( \frac{x}{e^{x}} \) finishes in one step. The rule permits either reduction; only one is useful.
Discussion
The rule is a monument to seventeenth-century academic economics. It appeared in 1696 in the Analyse des infiniment petits of Guillaume de l'Hôpital, Marquis de Sainte-Mesme — the first calculus textbook ever printed — but the mathematics was Johann Bernoulli's. Under a private arrangement of 1694, l'Hôpital paid Bernoulli a retainer for his discoveries and the right to use them; correspondence published in 1922 confirmed that the "rule" was among the purchased goods. Bernoulli's own version, and the early textbook tradition, treated only the \( 0/0 \) case at a finite point; the modern statement in full extended-real generality is essentially due to the rigorisation of analysis after Cauchy, whose mean value theorem (1823) is the engine of every correct proof.
Seen structurally, the theorem is almost nothing but the Cauchy mean value theorem: the entire content of the proof is that a difference quotient \( \frac{f(x)-f(y)}{g(x)-g(y)} \) is an exact value of \( f'/g' \), so bounds on the latter transfer to the former, and a limit bookkeeping argument (Steps 3, 8, 9) converts eventual bounds into a limit. This explains both the power and the fragility of the rule: everything that makes the CMVT true — real values, differentiability on an interval, \( g' \neq 0 \) so that quotients are defined — is non-negotiable, and each failure mode in the list above traces back to a specific broken gear in the CMVT.
In practice, professional analysts often reach past the rule to Taylor's theorem with Peano remainder, which is strictly more informative: expanding \( x - \sin x = \frac{x^3}{6} + o(x^3) \) does not merely evaluate \( \lim \frac{x - \sin x}{x^3} \) but exhibits the full asymptotic order, and it never risks the oscillation pathologies of the derivative quotient. The rule remains the tool of choice when derivatives simplify a quotient but expansions are awkward — logarithmic and exponential comparisons like \( \ln x / x^{\alpha} \) — and its discrete sibling, Stolz–Cesàro, plays the same role for sequences that lack derivatives altogether. Common misconceptions. The rule is not an equivalence: \( \lim f'/g' \) existing is sufficient, never necessary, for \( \lim f/g \) to exist. It does not require \( f \to \infty \) in the \( \infty \)-case. And it says nothing at the point \( a \) itself — no continuity or even definition of \( f, g \) at \( a \) is assumed.
The strong form proved above — case (ii) assuming only \( |g| \to \infty \) — is sharper than most first-course statements and is where the proof earns its keep: Step 6 never mentions \( f \), so a bounded, wildly oscillating numerator is handled with no extra work, and one obtains gratis such statements as \( \frac{\sin x + \ln x}{x} \to 0 \). The failure over \( \mathbb{C} \) is equally instructive: for complex- (or vector-) valued \( f \) the mean value theorem survives only as the inequality \( |f(y) - f(x)| \le (y-x) \sup_{t} |f'(t)| \), and an inequality cannot force the Cauchy quotient to be a value of \( f'/g' \). Rudin's counterexample \( g(x) = x + x^2 e^{i/x^2} \) exploits exactly this: \( g' \) is enormous (of order \( 1/x \)) on average directions that cancel in \( g \) itself. Finally, Darboux's theorem (Step 2) quietly explains a small mystery: the hypothesis "\( g' \neq 0 \)" secretly implies \( g' \) has one sign, so \( g \) is a strictly monotone reparametrisation of the interval — the rule is, in this light, a change-of-variables statement about limits along monotone clocks.
Worked examples
Example 1. Evaluate \( \displaystyle \lim_{x \to 0} \frac{x - \sin x}{x^3} \).
Reading. Three legal iterations of the rule, with the indeterminate form and \( g' \neq 0 \) re-verified before each; the chain of conditional equalities is discharged backwards once the final determinate limit is reached.
Scope. Equivalently, \( \sin x = x - \frac{x^3}{6} + o(x^3) \) — the rule recovers the cubic Taylor coefficient of \( \sin \).
Example 2. Evaluate \( \displaystyle \lim_{x \to 0^{+}} x^{x} \).
Reading. A \( 0^0 \) form tamed in the canonical way: exponentiate, reduce to a quotient with \( |g| \to \infty \), apply the rule once, and return through the continuous exponential.
Scope. The same template evaluates every \( 0^0 \), \( 1^{\infty} \), \( \infty^0 \) form: the rule acts on \( \ln \) of the expression.
Problems
- Evaluate \( \displaystyle \lim_{x \to 0} \frac{e^{x} - 1 - x}{x^{2}} \).
Solution
As \( x \to 0 \), numerator and denominator both tend to \( 0 \), and \( (x^2)' = 2x \neq 0 \) for \( x \neq 0 \). One application of the rule gives, conditionally, \[ \lim_{x \to 0} \frac{e^{x} - 1 - x}{x^{2}} = \lim_{x \to 0} \frac{e^{x} - 1}{2x}, \] which is again \( 0/0 \) with \( (2x)' = 2 \neq 0 \). A second application gives \[ \lim_{x \to 0} \frac{e^{x} - 1}{2x} = \lim_{x \to 0} \frac{e^{x}}{2} = \frac{1}{2} \] by continuity of \( \exp \). The final limit exists, so both conditional applications are validated, and the answer is \( \frac{1}{2} \). (Check: \( e^{x} = 1 + x + \frac{x^2}{2} + o(x^2) \).)
- Let \( \alpha \gt 0 \). Evaluate \( \displaystyle \lim_{x \to 0^{+}} x^{\alpha} \ln x \).
Solution
Write \( x^{\alpha} \ln x = \dfrac{\ln x}{x^{-\alpha}} \). As \( x \to 0^{+} \), \( g(x) = x^{-\alpha} \to +\infty \), so case (ii) applies (no condition on the numerator is needed). On \( (0,1) \), \( g'(x) = -\alpha x^{-\alpha - 1} \neq 0 \), and \[ \frac{f'(x)}{g'(x)} = \frac{1/x}{-\alpha x^{-\alpha-1}} = -\frac{x^{\alpha}}{\alpha} \;\longrightarrow\; 0. \] By the rule, \( \lim_{x \to 0^{+}} x^{\alpha} \ln x = 0 \): every positive power of \( x \) beats the logarithm at the origin.
- Evaluate \( \displaystyle \lim_{x \to +\infty} x \left( \frac{\pi}{2} - \arctan x \right) \).
Solution
This is a \( \infty \cdot 0 \) form; write it as \[ \frac{\frac{\pi}{2} - \arctan x}{1/x}, \] a \( 0/0 \) form as \( x \to +\infty \) (the theorem allows \( b = +\infty \) directly). On \( (1, \infty) \), \( g(x) = 1/x \) has \( g'(x) = -1/x^2 \neq 0 \), and \[ \frac{f'(x)}{g'(x)} = \frac{-\dfrac{1}{1 + x^{2}}}{-\dfrac{1}{x^{2}}} = \frac{x^{2}}{1 + x^{2}} \;\longrightarrow\; 1. \] Hence the limit is \( 1 \); equivalently \( \frac{\pi}{2} - \arctan x \sim \frac{1}{x} \) as \( x \to +\infty \).
- Evaluate \( \displaystyle \lim_{x \to 0} \left( \frac{1}{x} - \frac{1}{e^{x} - 1} \right) \).
Solution
An \( \infty - \infty \) form; combine over a common denominator: \[ \frac{1}{x} - \frac{1}{e^{x} - 1} = \frac{e^{x} - 1 - x}{x \left( e^{x} - 1 \right)}. \] Both numerator and denominator tend to \( 0 \). The denominator's derivative is \( e^{x} - 1 + x e^{x} \), which is nonzero for small \( x \neq 0 \) (it is \( \sim 2x \), positive for small \( x \gt 0 \), negative for small \( x \lt 0 \)). First application: \[ \lim_{x \to 0} \frac{e^{x} - 1 - x}{x(e^{x} - 1)} = \lim_{x \to 0} \frac{e^{x} - 1}{e^{x} - 1 + x e^{x}}, \] again \( 0/0 \); the new denominator's derivative is \( 2e^{x} + x e^{x} = e^{x}(2 + x) \neq 0 \) near \( 0 \). Second application: \[ \lim_{x \to 0} \frac{e^{x} - 1}{e^{x} - 1 + x e^{x}} = \lim_{x \to 0} \frac{e^{x}}{e^{x}(2 + x)} = \lim_{x \to 0} \frac{1}{2 + x} = \frac{1}{2}. \] The final limit exists, discharging both conditional steps; the answer is \( \frac{1}{2} \).
- (Theory.) Let \( f : [a, b) \to \mathbb{R} \) be continuous, differentiable on \( (a,b) \), and suppose \( \lim_{x \to a^{+}} f'(x) = L \in \mathbb{R} \) exists. Prove that the right-hand derivative \( f'_{+}(a) \) exists and equals \( L \). Deduce that a derivative cannot have a removable or jump discontinuity.
Solution
Apply L'Hôpital's rule on \( (a, b) \) to \[ F(x) = f(x) - f(a), \qquad G(x) = x - a. \] Both are differentiable on \( (a,b) \); \( G'(x) = 1 \neq 0 \); and \( F(x) \to 0 \), \( G(x) \to 0 \) as \( x \to a^{+} \) (for \( F \) this uses the continuity of \( f \) at \( a \)). The derivative quotient is \[ \frac{F'(x)}{G'(x)} = f'(x) \;\longrightarrow\; L \] by hypothesis. Hence by the rule (case (i)), \[ f'_{+}(a) = \lim_{x \to a^{+}} \frac{f(x) - f(a)}{x - a} = \lim_{x \to a^{+}} \frac{F(x)}{G(x)} = L. \] Consequently, if \( f \) is differentiable on an open interval containing \( a \) and \( \lim_{x \to a} f'(x) \) exists, that limit must equal \( f'(a) \): applying the above from both sides, \( f'_{+}(a) = f'_{-}(a) = \lim_{x \to a} f'(x) \). So \( f' \) cannot have a removable discontinuity (the limit exists but differs from the value) nor a jump (both one-sided limits exist but differ) — any discontinuity of a derivative is essential: at least one one-sided limit of \( f' \) fails to exist, as for \( f(x) = x^{2} \sin(1/x) \), \( f(0) = 0 \), at the origin. This is consistent with Darboux's theorem, which already forbids derivatives from jumping past intermediate values.