L'Hopital's Rule

What is the limit of sin⁡x−xx3\frac{\sin x - x}{x^3} as x→0x \to 0? Direct substitution gives the meaningless expression 00\frac{0}{0}. Yet the limit exists and equals a specific number. Calculus students meet dozens of such quotients. These are ratios of functions that both vanish, or both blow up, at the same point. They need a systematic way to extract the true limiting behavior. That behavior hides behind the symbol 0/00/0 or ∞/∞\infty/\infty. L'Hôpital's Rule answers this by trading the limit of a ratio for the limit of a ratio of derivatives. It converts an algebraic indeterminacy into a differentiation problem. The rule matters because it efficiently bridges two things. It links the local linear behavior of functions, captured by derivatives, to their limiting ratios. It explains, for instance, why polynomial growth is dominated by exponential growth. It also explains why sin⁡xx→1\frac{\sin x}{x} \to 1. It underlies the derivation of many Taylor coefficients and asymptotic expansions. Despite its computational fame, the rule is not a trick. It is a genuine theorem with precise hypotheses. Misapplying it is one of the most common errors in undergraduate analysis. Such errors include differentiating a quotient that is not indeterminate. They also include failing to check that the derivative quotient's limit exists. The proof rests entirely on the Cauchy Mean Value Theorem. This is itself a generalization of the ordinary Mean Value Theorem. The idea is simple. A ratio of increments f(x)−f(a)g(x)−g(a)\frac{f(x) - f(a)}{g(x) - g(a)} can be rewritten via Cauchy's theorem. It becomes a ratio of derivatives evaluated at some intermediate point. Passing to the limit as x→ax \to a squeezes that intermediate point toward aa as well. Continuity of the argument then transfers the limit of f′/g′f'/g' back to the limit of f/gf/g. This article gives the full statement and proof of L'Hôpital's Rule. It covers both the 0/00/0 and ∞/∞\infty/\infty forms, at finite points and at infinity. It includes worked examples that expose the rule's subtleties. It also gives a counterexample showing why differentiability of gg with g′≠0g' \neq 0 is essential. Finally, it discusses how the rule foreshadows the more powerful local approximation machinery of Taylor's Theorem.

Key takeaways
  • L'Hôpital's Rule converts lim⁡fg\lim \frac{f}{g} of indeterminate form 00\frac00 or ∞∞\frac{\infty}{\infty} into lim⁡f′g′\lim \frac{f'}{g'}, provided the latter limit exists.
  • The proof uses only the Cauchy Mean Value Theorem — no new machinery is required.
  • The rule is an if-then, not an if-and-only-if: the derivative ratio can fail to have a limit even when the original ratio does.
  • Both one-sided and two-sided versions hold, at finite points and as x→±∞x \to \pm\infty, with essentially the same proof.
  • The hypothesis g′(x)≠0g'(x) \neq 0 near the limit point is not cosmetic — dropping it produces genuine counterexamples.
  • Key idea: near a point where both f,g→0f,g \to 0 (or both →∞\to \infty), the ratio of the functions is governed by the ratio of their instantaneous rates of change.

Where this lives today

L'Hôpital's Rule is a workhorse throughout analysis and its applications. In Taylor's Theorem and asymptotic analysis, it is used to justify formal manipulations of remainder terms and to compute the leading-order behavior of functions defined by power series or integrals, foreshadowing techniques like Big-O comparison of growth rates. In probability and statistics, it appears in computing limiting forms of likelihood ratios and in deriving continuity of density functions at boundary parameter values (e.g., limits of the Poisson or Gamma family as a shape parameter approaches a degenerate value). In physics and engineering, indeterminate-form limits arise constantly in taking limits of physical models — for instance the small-angle or high-frequency limits of transfer functions in circuit theory, or the classical limit of quantum mechanical expressions as ℏ→0\hbar \to 0. In computer science and numerical analysis, understanding growth-rate comparisons (polynomial vs. logarithmic vs. exponential) that L'Hôpital's Rule formally certifies underlies algorithmic complexity arguments. In cryptography and complexity theory, asymptotic comparisons of function growth (e.g., subexponential vs. exponential hardness) rely on exactly the kind of limit reasoning L'Hôpital's Rule makes rigorous.

Ask the tutor: Can you walk me through why the ∞/∞\infty/\infty proof needs a fixed reference point yy instead of using aa directly, the way the 0/00/0 proof does?

DefinitionIndeterminate form and L'Hôpital setup

Let a∈R∪{−∞,+∞}a \in \mathbb{R} \cup \{-\infty, +\infty\}, and let f,gf, g be real-valued functions differentiable on an open interval II with endpoint aa (i.e. I=(a,b)I = (a, b) or I=(b,a)I=(b,a), or a punctured neighborhood of aa if aa is finite), such that g′(x)≠0g'(x) \neq 0 for all x∈Ix \in I. We say lim⁡x→af(x)g(x)\lim_{x\to a} \frac{f(x)}{g(x)} is an indeterminate form of type 00\frac{0}{0} if

lim⁡x→af(x)=0andlim⁡x→ag(x)=0,\lim_{x \to a} f(x) = 0 \qquad \text{and} \qquad \lim_{x \to a} g(x) = 0,

and of type ∞∞\frac{\infty}{\infty} if

lim⁡x→a∣g(x)∣=+∞\lim_{x \to a} |g(x)| = +\infty

(with no condition required on ff beyond differentiability). In either case, the naive substitution f(a)/g(a)f(a)/g(a) is undefined or meaningless, and the value of the limit — if it exists — is not determined by the individual limits of ff and gg alone.

Intuition

The core picture is a race between two quantities that both shrink to zero (or both grow without bound) as x→ax \to a. What matters is not how small (or large) ff and gg individually are, but their relative rate of approach to 00 or ∞\infty. Derivatives measure instantaneous rate of change, so it is natural that the ratio of derivatives should predict the ratio of the functions themselves — at least locally, near aa. Geometrically, think of the parametric curve t↦(g(t),f(t))t \mapsto (g(t), f(t)) in the plane, traced as tt moves toward aa. If both coordinates tend to 00, the curve approaches the origin, and f(x)g(x)\frac{f(x)}{g(x)} is the slope of the secant line from the origin to the point (g(x),f(x))(g(x), f(x)). The Cauchy Mean Value Theorem says this secant slope equals the slope f′(c)/g′(c)f'(c)/g'(c) of the curve's velocity vector at some intermediate parameter cc between aa and xx. As x→ax \to a, the point cc is squeezed toward aa too, so if f′/g′f'/g' has a limit LL at aa, the secant slope is forced toward LL as well.

Figure
The Cauchy curve (g(t),f(t))(g(t), f(t)) approaching the origin, with secant slope equal to a derivative-ratio slope at an intermediate point
g(t) f(t) 0 x → (g(x), f(x)) secant slope = f(x)/g(x) c (intermediate point) tangent slope = f'(c)/g'(c) as x → a: c → a, secant slope → f'(c)/g'(c) → L

Statement and Proof

TheoremL'Hôpital's Rule, 00\frac00 form, finite aa

Let a∈Ra \in \mathbb{R} and let II be an open interval with aa as its left or right endpoint (so I=(a,b)I = (a,b) or I=(c,a)I = (c,a)). Suppose: 1. f,gf, g are differentiable on II, with g′(x)≠0g'(x) \neq 0 for every x∈Ix \in I; 2. lim⁡x→af(x)=0\displaystyle\lim_{x \to a} f(x) = 0 and lim⁡x→ag(x)=0\displaystyle\lim_{x \to a} g(x) = 0 (the one-sided limit through II); 3. lim⁡x→af′(x)g′(x)=L\displaystyle\lim_{x \to a} \frac{f'(x)}{g'(x)} = L exists, where L∈R∪{−∞,+∞}L \in \mathbb{R} \cup \{-\infty, +\infty\}. Then

lim⁡x→af(x)g(x)=L.\lim_{x \to a} \frac{f(x)}{g(x)} = L.
Proof

We argue for I=(a,b)I = (a,b), so the limit is x→a+x \to a^+; the case I=(c,a)I = (c,a) (limit x→a−x \to a^-) is identical with inequalities reversed.

Step 1: Extend f,gf,g continuously to aa. Define f(a):=0f(a) := 0 and g(a):=0g(a) := 0. By hypothesis (2), these definitions make ff and gg continuous at aa from the right, since lim⁡x→a+f(x)=0=f(a)\lim_{x\to a^+} f(x) = 0 = f(a) and likewise for gg. On [a,b)∩I∪{a}[a, b) \cap I \cup \{a\}, ff and gg are now continuous on [a,x][a, x] and differentiable on (a,x)(a,x) for every x∈(a,b)x \in (a,b).

Step 2: g(x)≠0g(x) \neq 0 for xx near aa, x≠ax \neq a. Suppose for contradiction g(x0)=0g(x_0) = 0 for some x0∈(a,b)x_0 \in (a,b). Since also g(a)=0g(a) = 0, Rolle's Theorem (a special case of the Mean Value Theorem, applied on [a,x0][a,x_0]) gives some ξ∈(a,x0)\xi \in (a, x_0) with g′(ξ)=0g'(\xi) = 0, contradicting hypothesis (1). Hence g(x)≠0g(x) \neq 0 for all x∈(a,b)x \in (a, b), and the ratio f(x)/g(x)f(x)/g(x) is defined throughout (a,b)(a,b).

Step 3: Apply the Cauchy Mean Value Theorem on [a,x][a,x]. Fix x∈(a,b)x \in (a,b). On the interval [a,x][a,x], ff and gg are continuous (Step 1) and differentiable on (a,x)(a,x), and g′g' never vanishes on (a,x)(a,x). By the Cauchy Mean Value Theorem, there exists cx∈(a,x)c_x \in (a,x) such that

(f(x)−f(a))g′(cx)=(g(x)−g(a))f′(cx).\bigl(f(x) - f(a)\bigr) g'(c_x) = \bigl(g(x) - g(a)\bigr) f'(c_x).

Since f(a)=g(a)=0f(a) = g(a) = 0 and g(x)≠0g(x) \neq 0, g′(cx)≠0g'(c_x) \neq 0, we may divide to get

f(x)g(x)=f′(cx)g′(cx),cx∈(a,x).\frac{f(x)}{g(x)} = \frac{f'(c_x)}{g'(c_x)}, \qquad c_x \in (a,x).

This holds for every x∈(a,b)x \in (a,b); the point cxc_x depends on xx but always lies strictly between aa and xx.

Step 4: Pass to the limit x→a+x \to a^+. Fix ε>0\varepsilon > 0. Because lim⁡t→a+f′(t)g′(t)=L\lim_{t \to a^+} \frac{f'(t)}{g'(t)} = L, there exists δ>0\delta > 0 (with (a,a+δ)⊂I(a, a+\delta) \subset I) such that

0<t−a<δ  ⟹  ∣f′(t)g′(t)−L∣<ε0 < t - a < \delta \implies \left| \frac{f'(t)}{g'(t)} - L \right| < \varepsilon

(if LL is finite; if L=+∞L = +\infty, replace this with: for every MM there is δ\delta such that 0<t−a<δ⇒f′(t)/g′(t)>M0 < t-a<\delta \Rightarrow f'(t)/g'(t) > M, and argue symmetrically — see the remark below). Now for any xx with 0<x−a<δ0 < x - a < \delta, we have cx∈(a,x)c_x \in (a,x), so 0<cx−a<x−a<δ0 < c_x - a < x - a < \delta. By Step 3 and the choice of δ\delta,

∣f(x)g(x)−L∣=∣f′(cx)g′(cx)−L∣<ε.\left| \frac{f(x)}{g(x)} - L \right| = \left| \frac{f'(c_x)}{g'(c_x)} - L \right| < \varepsilon.

Since ε>0\varepsilon > 0 was arbitrary, this proves lim⁡x→a+f(x)g(x)=L\displaystyle\lim_{x \to a^+} \frac{f(x)}{g(x)} = L when LL is finite.

Step 5: The case L=±∞L = \pm\infty. Suppose L=+∞L = +\infty. Given M∈RM \in \mathbb{R}, choose δ>0\delta > 0 so that 0<t−a<δ  ⟹  f′(t)/g′(t)>M0 < t - a < \delta \implies f'(t)/g'(t) > M. For xx with 0<x−a<δ0 < x-a < \delta, Step 3 gives cx∈(a,x)⊂(a,a+δ)c_x \in (a,x) \subset (a, a+\delta), so

f(x)g(x)=f′(cx)g′(cx)>M.\frac{f(x)}{g(x)} = \frac{f'(c_x)}{g'(c_x)} > M.

Hence f(x)/g(x)→+∞f(x)/g(x) \to +\infty as x→a+x \to a^+. The case L=−∞L = -\infty is symmetric (using << instead of >>). This completes the proof of the one-sided rule. The two-sided statement (limit as x→ax \to a, with II a punctured neighborhood of aa) follows by applying the one-sided result separately from the left and from the right, and noting both one-sided limits equal LL, hence the two-sided limit is LL (using the standard fact that a two-sided limit exists and equals LL iff both one-sided limits exist and equal LL). ■\blacksquare

∎
TheoremL'Hôpital's Rule, ∞∞\frac{\infty}{\infty} form, finite aa

Let a∈Ra \in \mathbb{R}, and let I=(a,b)I = (a,b). Suppose: 1. f,gf,g are differentiable on II with g′(x)≠0g'(x) \neq 0 for all x∈Ix \in I; 2. lim⁡x→a+∣g(x)∣=+∞\displaystyle\lim_{x \to a^+} |g(x)| = +\infty; 3. lim⁡x→a+f′(x)g′(x)=L\displaystyle\lim_{x \to a^+} \frac{f'(x)}{g'(x)} = L exists, L∈R∪{±∞}L \in \mathbb{R} \cup \{\pm\infty\}. Then lim⁡x→a+f(x)g(x)=L\displaystyle\lim_{x \to a^+} \frac{f(x)}{g(x)} = L.

Proof

We prove the case LL finite; the infinite cases follow by the same one-sided inequality argument as Step 5 above, applied to the estimate constructed below. Fix ε>0\varepsilon > 0. By hypothesis (3), choose δ1>0\delta_1 > 0 with (a,a+δ1)⊂I(a, a+\delta_1) \subset I such that

0<t−a<δ1  ⟹  ∣f′(t)g′(t)−L∣<ε2.(∗)0 < t - a < \delta_1 \implies \left| \frac{f'(t)}{g'(t)} - L \right| < \frac{\varepsilon}{2}. \tag{$\ast$}

Fix a reference point y:=a+δ1/2∈(a,a+δ1)y := a + \delta_1/2 \in (a, a+\delta_1). For any x∈(a,y)x \in (a, y), apply the Cauchy Mean Value Theorem on [x,y][x,y]: since g′g' never vanishes on I⊃[x,y]I \supset [x,y], as in the previous proof g(x)≠g(y)g(x) \neq g(y) (else Rolle's theorem would give a zero of g′g' in (x,y)(x,y)), and there is cx∈(x,y)⊂(a,a+δ1)c_x \in (x,y) \subset (a, a+\delta_1) with

f(x)−f(y)g(x)−g(y)=f′(cx)g′(cx).\frac{f(x) - f(y)}{g(x) - g(y)} = \frac{f'(c_x)}{g'(c_x)}.

By (∗)(\ast), since cx∈(a,a+δ1)c_x \in (a, a+\delta_1),

∣f(x)−f(y)g(x)−g(y)−L∣<ε2.(∗∗)\left| \frac{f(x)-f(y)}{g(x)-g(y)} - L \right| < \frac{\varepsilon}{2}. \tag{$\ast\ast$}

Now algebraically rewrite, for xx close enough to aa that g(x)≠0g(x) \neq 0 (possible since ∣g(x)∣→∞|g(x)|\to\infty as x→a+x\to a^+, so g(x)≠0g(x) \ne 0 eventually):

f(x)g(x)=f(x)−f(y)g(x)−g(y)⋅1−g(y)/g(x)1−f(y)/f(x)⋅f(x)/g(x)⋯\frac{f(x)}{g(x)} = \frac{f(x)-f(y)}{g(x)-g(y)} \cdot \frac{1 - g(y)/g(x)}{1 - f(y)/f(x) \cdot f(x)/g(x)}\cdots

— rather than expand this awkwardly, we isolate directly. Write

f(x)g(x)−L=[f(x)−f(y)g(x)−g(y)−L]⋅1−g(y)/g(x)1  +  [f(x)−f(y)g(x)−g(y)]⋅g(y)/g(x)1  −  f(y)g(x)⋅g(x)g(x)⋯\frac{f(x)}{g(x)} - L = \left[\frac{f(x)-f(y)}{g(x)-g(y)} - L\right]\cdot\frac{1 - g(y)/g(x)}{1} \;+\; \left[\frac{f(x)-f(y)}{g(x)-g(y)}\right]\cdot\frac{g(y)/g(x)} {1}\; -\;\frac{f(y)}{g(x)}\cdot\frac{g(x)}{g(x)}\cdots

We redo this cleanly. From

f(x)−f(y)=f′(cx)g′(cx)(g(x)−g(y)),f(x) - f(y) = \frac{f'(c_x)}{g'(c_x)}\bigl(g(x) - g(y)\bigr),

divide both sides by g(x)g(x) (nonzero for xx near aa):

f(x)g(x)=f(y)g(x)+f′(cx)g′(cx)(1−g(y)g(x)).\frac{f(x)}{g(x)} = \frac{f(y)}{g(x)} + \frac{f'(c_x)}{g'(c_x)}\left(1 - \frac{g(y)}{g(x)}\right).

Subtract LL from both sides and use (∗∗)(\ast\ast)-type bound f′(cx)g′(cx)=L+η(x)\frac{f'(c_x)}{g'(c_x)} = L + \eta(x) with ∣η(x)∣<ε/2|\eta(x)| < \varepsilon/2 (this is exactly (∗)(\ast) since cx∈(a,a+δ1)c_x \in (a,a+\delta_1)):

f(x)g(x)−L=f(y)g(x)+(L+η(x))(1−g(y)g(x))−L=f(y)g(x)−L⋅g(y)g(x)+η(x)(1−g(y)g(x)).\frac{f(x)}{g(x)} - L = \frac{f(y)}{g(x)} + \left(L+\eta(x)\right)\left(1 - \frac{g(y)}{g(x)}\right) - L = \frac{f(y)}{g(x)} - L\cdot\frac{g(y)}{g(x)} + \eta(x)\left(1 - \frac{g(y)}{g(x)}\right).

Since yy (hence f(y),g(y)f(y), g(y)) is now a fixed constant and ∣g(x)∣→∞|g(x)| \to \infty as x→a+x \to a^+, the quantities f(y)g(x)→0\frac{f(y)}{g(x)} \to 0 and g(y)g(x)→0\frac{g(y)}{g(x)} \to 0 as x→a+x \to a^+. Choose δ2∈(0,y−a)\delta_2 \in (0, y - a) small enough that for 0<x−a<δ20 < x - a< \delta_2:

∣f(y)g(x)∣<ε4,∣L⋅g(y)g(x)∣<ε8(1+∣L∣)−1⋅(1+∣L∣)=:(bounded by ε/8),\left|\frac{f(y)}{g(x)}\right| < \frac{\varepsilon}{4}, \qquad \left|L\cdot\frac{g(y)}{g(x)}\right| < \frac{\varepsilon}{8}(1+|L|)^{-1}\cdot(1+|L|) =: \text{(bounded by } \varepsilon/8),

concretely: pick δ2\delta_2 so that both ∣f(y)/g(x)∣<ε/4|f(y)/g(x)| < \varepsilon/4 and ∣g(y)/g(x)∣<ε4(1+∣L∣)|g(y)/g(x)| < \dfrac{\varepsilon}{4(1+|L|)} hold. Then also ∣η(x)(1−g(y)/g(x))∣≤ε2(1+ε4(1+∣L∣))≤ε2⋅2=ε|\eta(x)(1 - g(y)/g(x))| \le \frac{\varepsilon}{2}\left(1 + \frac{\varepsilon}{4(1+|L|)}\right) \le \frac{\varepsilon}{2}\cdot 2 = \varepsilon once ε≤4(1+∣L∣)\varepsilon \le 4(1+|L|), which we may assume by shrinking ε\varepsilon if necessary at the start (limits are unaffected). Combining all three terms with the triangle inequality, for 0<x−a<δ20 < x-a<\delta_2:

∣f(x)g(x)−L∣≤ε4+∣L∣ε4(1+∣L∣)+η-term<ε\left|\frac{f(x)}{g(x)} - L\right| \le \frac{\varepsilon}{4} + \frac{|L|\varepsilon}{4(1+|L|)} + \eta\text{-term} < \varepsilon

after absorbing constants (formally: given any ε′>0\varepsilon'>0, run the argument with ε=ε′/3\varepsilon = \varepsilon'/3 scaled appropriately in each of the three error budgets — the mechanism is that each of the three terms is made <ε′/3<\varepsilon'/3 independently, which is achievable since two terms vanish as x→a+x\to a^+ with y,f(y),g(y),Ly,f(y),g(y),L fixed, and the third is controlled by hypothesis (3)). Hence lim⁡x→a+f(x)g(x)=L\displaystyle\lim_{x\to a^+}\frac{f(x)}{g(x)} = L. ■\blacksquare

∎
CorollaryBehavior at infinity

All versions above (the 00\frac00 and ∞∞\frac{\infty}{\infty} forms) hold with aa replaced by +∞+\infty or −∞-\infty, i.e. for f,gf,g differentiable on (N,∞)(N, \infty) with g′≠0g' \neq 0 there, if f,g→0f,g \to 0 (or ∣g∣→∞|g|\to\infty) as x→∞x\to\infty and f′/g′→Lf'/g' \to L, then f/g→Lf/g \to L.

Proof

Substitute x=1/tx = 1/t, t→0+t \to 0^+. Define F(t)=f(1/t)F(t) = f(1/t), G(t)=g(1/t)G(t) = g(1/t) for t∈(0,1/N)t \in (0, 1/N). By the chain rule, FF and GG are differentiable with

F′(t)=−1t2f′(1/t),G′(t)=−1t2g′(1/t),F'(t) = -\frac{1}{t^2} f'(1/t), \qquad G'(t) = -\frac{1}{t^2} g'(1/t),

so G′(t)≠0G'(t) \ne 0 (since g′(1/t)≠0g'(1/t) \ne 0), and

F′(t)G′(t)=f′(1/t)g′(1/t)→t→0+L,\frac{F'(t)}{G'(t)} = \frac{f'(1/t)}{g'(1/t)} \xrightarrow[t \to 0^+]{} L,

because 1/t→∞1/t \to \infty as t→0+t \to 0^+. Also F(t)=f(1/t)→0F(t) = f(1/t) \to 0 (resp. ∣G(t)∣→∞|G(t)|\to\infty) as t→0+t\to 0^+ exactly when f(x)→0f(x)\to 0 (resp. ∣g(x)∣→∞|g(x)|\to\infty) as x→∞x \to \infty. So F,GF,G satisfy the hypotheses of the finite-aa theorem at a=0+a=0^+, giving

lim⁡t→0+F(t)G(t)=L,\lim_{t\to 0^+}\frac{F(t)}{G(t)} = L,

i.e. lim⁡x→∞f(x)/g(x)=L\lim_{x\to\infty} f(x)/g(x) = L, since F(t)/G(t)=f(1/t)/g(1/t)=f(x)/g(x)F(t)/G(t) = f(1/t)/g(1/t) = f(x)/g(x) under x=1/tx=1/t. ■\blacksquare

∎

Worked examples

Example 1 (a 0/00/0 form requiring two applications, asymmetric functions). Evaluate

lim⁡x→0e3x−1−3xxsin⁡x.\lim_{x \to 0} \frac{e^{3x} - 1 - 3x}{x\sin x}.

Setup. As x→0x \to 0: numerator →e0−1−0=0\to e^0 - 1 - 0 = 0; denominator →0⋅0=0\to 0 \cdot 0 = 0. This is 00\frac00. Let f(x)=e3x−1−3xf(x) = e^{3x}-1-3x, g(x)=xsin⁡xg(x) = x\sin x. Both are differentiable near 00 (in fact entire), and we must check g′(x)≠0g'(x) \ne 0 near 00, x≠0x\ne 0.

f′(x)=3e3x−3,g′(x)=sin⁡x+xcos⁡x.f'(x) = 3e^{3x} - 3, \qquad g'(x) = \sin x + x\cos x.

At x=0x=0: f′(0)=0f'(0) = 0, g′(0)=0g'(0) = 0. So f′(x)/g′(x)f'(x)/g'(x) is again 0/00/0 as x→0x\to 0 — L'Hôpital applies again, but first we must confirm g′(x)≠0g'(x)\ne 0 on a punctured neighborhood of 00 to legitimately form the ratio f′/g′f'/g' there. For small x≠0x \ne 0, g′(x)=sin⁡x+xcos⁡xg'(x) = \sin x + x\cos x; near 00, sin⁡x≈x\sin x \approx x and xcos⁡x≈xx\cos x \approx x, so g′(x)≈2x≠0g'(x) \approx 2x \ne 0 for small x≠0x\ne 0 — rigorously, g′(x)/x→2g'(x)/x \to 2 as x→0x\to0 (since sin⁡x/x→1\sin x/x \to 1 and cos⁡x→1\cos x \to 1), so there is δ>0\delta>0 with g′(x)≠0g'(x)\ne 0 for 0<∣x∣<δ0<|x|<\delta. Differentiate again:

f′′(x)=9e3x,g′′(x)=cos⁡x+cos⁡x−xsin⁡x=2cos⁡x−xsin⁡x.f''(x) = 9e^{3x}, \qquad g''(x) = \cos x + \cos x - x\sin x = 2\cos x - x \sin x.

Now f′′(0)=9f''(0) = 9 and g′′(0)=2g''(0) = 2, and g′′g'' is continuous with g′′(0)=2≠0g''(0) = 2 \ne 0, so g′′(x)≠0g''(x) \ne 0 on some neighborhood of 00 by continuity. Hence

lim⁡x→0f′′(x)g′′(x)=92,\lim_{x\to 0} \frac{f''(x)}{g''(x)} = \frac{9}{2},

by continuity of f′′,g′′f'', g'' at 00 (direct substitution, no indeterminacy). By L'Hôpital applied to f′/g′f'/g' (both →0\to 0, ratio of second derivatives has a limit), lim⁡x→0f′(x)/g′(x)=9/2\lim_{x\to0} f'(x)/g'(x) = 9/2. Applying L'Hôpital once more to f/gf/g (both →0\to 0, and f′/g′f'/g' has the limit just found), we conclude

lim⁡x→0e3x−1−3xxsin⁡x=92.\lim_{x\to0}\frac{e^{3x}-1-3x}{x\sin x} = \frac{9}{2}.

Sanity check via Taylor series (foreshadowing Taylor's Theorem): e3x−1−3x=9x22+O(x3)e^{3x}-1-3x = \frac{9x^2}{2}+O(x^3) and xsin⁡x=x2+O(x4)x\sin x = x^2 + O(x^4), giving ratio →9/2 x2x2=92\to \frac{9/2\,x^2}{x^2} = \frac{9}{2}. Matches.

Example 2 (∞/∞\infty/\infty form with a logarithm and a power, asymmetric). Evaluate

lim⁡x→∞ln⁡(x2+5x)x.\lim_{x \to \infty} \frac{\ln(x^2 + 5x)}{\sqrt{x}}.

Setup. As x→∞x\to\infty: numerator ln⁡(x2+5x)→∞\ln(x^2+5x) \to \infty, denominator x→∞\sqrt x \to \infty. This is ∞/∞\infty/\infty on I=(1,∞)I = (1,\infty) say. Let f(x)=ln⁡(x2+5x)f(x) = \ln(x^2+5x), g(x)=x=x1/2g(x) = \sqrt{x} = x^{1/2}, both differentiable on (1,∞)(1,\infty), and

g′(x)=12x≠0for all x>1.g'(x) = \frac{1}{2\sqrt x} \ne 0 \quad \text{for all } x>1.

Compute

f′(x)=2x+5x2+5x,f′(x)g′(x)=2x+5x2+5x⋅2x=2x(2x+5)x2+5x=4x3/2+10xx2+5x.f'(x) = \frac{2x+5}{x^2+5x}, \qquad \frac{f'(x)}{g'(x)} = \frac{2x+5}{x^2+5x}\cdot 2\sqrt x = \frac{2\sqrt x (2x+5)}{x^2+5x} = \frac{4x^{3/2} + 10\sqrt x}{x^2+5x}.

Divide numerator and denominator by x2x^2:

f′(x)g′(x)=4x−1/2+10x−3/21+5/x→x→∞0+01+0=0.\frac{f'(x)}{g'(x)} = \frac{4x^{-1/2} + 10x^{-3/2}}{1+5/x} \xrightarrow[x\to\infty]{} \frac{0+0}{1+0} = 0.

Since this limit exists (and equals 00), the ∞/∞\infty/\infty theorem gives

lim⁡x→∞ln⁡(x2+5x)x=0.\lim_{x\to\infty} \frac{\ln(x^2+5x)}{\sqrt x} = 0.

This matches the general heuristic that logarithms grow strictly slower than any positive power of xx.

CounterexampleWhy g′(x)≠0g'(x) \neq 0 near aa cannot be dropped

Consider, near a=0a = 0, the functions

f(x)=x+x2sin⁡(1x),g(x)=sin⁡x,f(x) = x + x^2 \sin\left(\frac{1}{x}\right), \qquad g(x) = \sin x,

for x≠0x \ne 0, and f(0)=g(0)=0f(0) = g(0) = 0. Both are differentiable everywhere (including at 00, via the standard ε\varepsilon–δ\delta check that the x2sin⁡(1/x)x^2\sin(1/x) term has derivative 00 at the origin), and f(x)→0f(x) \to 0, g(x)→0g(x)\to 0 as x→0x\to0, so f/gf/g is a genuine 0/00/0 form. Now compute

f′(x)=1+2xsin⁡(1x)−cos⁡(1x),g′(x)=cos⁡x.f'(x) = 1 + 2x\sin\left(\frac1x\right) - \cos\left(\frac1x\right), \qquad g'(x) = \cos x.

Note g′(x)=cos⁡x≠0g'(x) = \cos x \ne 0 for xx near 00 (indeed cos⁡0=1\cos 0 = 1), so this particular pair actually satisfies L'Hôpital's hypothesis on g′≠0g'\ne0 — but the point of this example is a different, subtler failure: the ratio f′(x)/g′(x)f'(x)/g'(x) has no limit as x→0x\to 0, because of the oscillating term −cos⁡(1/x)-\cos(1/x) in f′(x)f'(x), which has no limit as x→0x \to 0 (it oscillates between −1-1 and 11 infinitely often in every neighborhood of 00). Thus

f′(x)g′(x)=1+2xsin⁡(1/x)−cos⁡(1/x)cos⁡x\frac{f'(x)}{g'(x)} = \frac{1+2x\sin(1/x) - \cos(1/x)}{\cos x}

does not converge as x→0x \to 0 (along xn=12nπ→0x_n = \frac{1}{2n\pi}\to0 it tends to 1−11=0\frac{1-1}{1}=0, but along xn=1(2n+1)π→0x_n = \frac{1}{(2n+1)\pi}\to 0 it tends to 1+11=2\frac{1+1}{1}=2 — two different subsequential limits). Yet the original limit does exist: since ∣sin⁡(1/x)∣≤1|\sin(1/x)|\le 1,

f(x)g(x)=x+x2sin⁡(1/x)sin⁡x=xsin⁡x(1+xsin⁡(1/x))→x→01⋅(1+0)=1,\frac{f(x)}{g(x)} = \frac{x + x^2\sin(1/x)}{\sin x} = \frac{x}{\sin x}\left(1 + x\sin(1/x)\right) \xrightarrow[x\to0]{} 1 \cdot (1 + 0) = 1,

using xsin⁡x→1\frac{x}{\sin x}\to 1 and ∣xsin⁡(1/x)∣≤∣x∣→0|x \sin(1/x)| \le |x| \to 0. This shows the hypothesis "lim⁡f′/g′\lim f'/g' exists" in L'Hôpital's theorem is not merely a technical convenience: the theorem's converse is false. A quotient f/gf/g can have a perfectly good limit while f′/g′f'/g' has none at all. The rule is a one-directional implication, and applying it "backwards" (assuming f/gf/g has no limit because f′/g′f'/g' doesn't) is a logical error.

Scope, edge cases & common traps

SituationStatus
f,g→0f,g \to 0 or ∣g∣→∞|g|\to \infty, and lim⁡f′/g′\lim f'/g' existsL'Hôpital applies; conclusion holds by the theorem
f,g→0f,g \to 0, but lim⁡f′/g′\lim f'/g' does not existRule gives no information; f/gf/g may still converge (see counterexample) or diverge
g′(x)=0g'(x) = 0 at points arbitrarily close to aaHypotheses fail; ratio f′/g′f'/g' may be undefined near aa — cannot apply the theorem as stated
Ratio is not actually indeterminate (e.g. f(a)≠0f(a)\ne 0)Do not apply L'Hôpital — differentiating changes the problem and gives a wrong answer
Need to apply the rule repeatedlyLegal only if at each stage the new ratio is again a genuine 0/00/0 or ∞/∞\infty/\infty form and the new g′g' is nonzero near aa
a=±∞a = \pm\inftyHandled by the substitution x=1/tx=1/t corollary; same conclusion

The mathematician behind it

Origins · 1 minGuillaume François Antoine, Marquis de l'Hôpital and how this was discovered
GF
Guillaume François Antoine, Marquis de l'Hôpital
1661–1704 · Paris, court of Louis XIV

A French nobleman and mathematician who studied under Johann Bernoulli, l'Hôpital published Analyse des Infiniment Petits pour l'Intelligence des Lignes Courbes (1696), the first calculus textbook. It contained the rule that now bears his name, though the underlying result was communicated to him by Johann Bernoulli under a paid contractual arrangement — a fact only fully documented centuries later from surviving correspondence.

History
- 1661 — Guillaume de l'Hôpital born in Paris to a noble family.
- 1691–1692 — l'Hôpital pays Johann Bernoulli for private calculus lessons and the rights to Bernoulli's mathematical discoveries.
- 1696 — l'Hôpital publishes Analyse des Infiniment Petits, containing the rule for evaluating 0/00/0 limits, crediting no one else by name.
- 1704 — l'Hôpital dies; Bernoulli later claims authorship of the rule, a claim later substantiated by discovered letters.
- 19th–20th century — the rule is placed on rigorous footing via the Cauchy Mean Value Theorem, its modern proof mechanism.
Does L'Hôpital's Rule work for 0⋅∞0 \cdot \infty, ∞−∞\infty - \infty, 000^0, or 1∞1^\infty forms?

Not directly — these forms must first be algebraically rewritten as a 0/00/0 or ∞/∞\infty/\infty quotient. For 0⋅∞0\cdot\infty: write f⋅g=f1/gf\cdot g = \frac{f}{1/g} (a 0/00/0 form) or g1/f\frac{g}{1/f} (∞/∞\infty/\infty). For ∞−∞\infty - \infty: combine over a common denominator to produce a single fraction, which often becomes 0/00/0. For 00,∞0,1∞0^0, \infty^0, 1^\infty: take logarithms, since ln⁡(fg)=gln⁡f\ln(f^g) = g\ln f reduces to a 0⋅∞0\cdot\infty or similar form, then exponentiate the resulting limit at the end. In every case, L'Hôpital's Rule itself is applied only after the expression has genuinely been reduced to a 0/00/0 or ∞/∞\infty/\infty ratio of differentiable functions.

Can I apply L'Hôpital's Rule more than once in a row?

Yes, provided that at each stage the new ratio is again a genuine indeterminate form of type 0/00/0 or ∞/∞\infty/\infty, and the new denominator's derivative is nonzero near the limit point. Each application is a separate invocation of the full theorem with its own hypotheses re-verified; it is not automatic that differentiating twice more is valid just because it was valid once. If at some stage the ratio is no longer indeterminate, stop and evaluate directly by substitution.

What if lim⁡f′/g′\lim f'/g' does not exist — does that mean lim⁡f/g\lim f/g does not exist either?

No. This is exactly the content of the counterexample in this article: the implication in L'Hôpital's Rule runs only in one direction, from lim⁡f′/g′\lim f'/g' existing to lim⁡f/g\lim f/g existing (with equal value). If f′/g′f'/g' has no limit, the theorem simply gives no information about f/gf/g, which may still converge, diverge to infinity, or oscillate — determined by other methods such as direct estimation, squeeze theorems, or series expansions.

Why does the proof need the Cauchy Mean Value Theorem instead of two separate applications of the ordinary Mean Value Theorem?

Applying the ordinary Mean Value Theorem to ff and gg separately gives f(x)−f(a)=f′(c1)(x−a)f(x)-f(a) = f'(c_1)(x-a) and g(x)−g(a)=g′(c2)(x−a)g(x)-g(a) = g'(c_2)(x-a) for possibly different points c1≠c2c_1 \ne c_2. Dividing gives f(x)−f(a)g(x)−g(a)=f′(c1)g′(c2)\frac{f(x)-f(a)}{g(x)-g(a)} = \frac{f'(c_1)}{g'(c_2)}, a ratio at two different points, which does not converge to f′(c)/g′(c)f'(c)/g'(c) at any single cc in general. The Cauchy Mean Value Theorem produces a single common point cc satisfying (f(x)−f(a))g′(c)=(g(x)−g(a))f′(c)(f(x)-f(a))g'(c) = (g(x)-g(a))f'(c), which is exactly what is needed to identify the secant slope with a single derivative ratio.

Does L'Hôpital's Rule assume f′f' and g′g' are continuous?

No — the theorem as proved here requires only that ff and gg are differentiable on the interval (not that f′,g′f',g' are continuous), because the Cauchy Mean Value Theorem itself requires only differentiability, not continuous differentiability. This is a genuine strength of the rule: it can be applied even to functions whose derivatives are discontinuous, as long as the stated hypotheses (g′≠0g'\ne0, and lim⁡f′/g′\lim f'/g' exists) hold.

How does this rule relate to Taylor's Theorem?

Both tools extract limiting or local behavior from derivative information. L'Hôpital's Rule handles a single limit of a ratio using one or finitely many derivatives; Taylor's Theorem goes further, approximating a function by a polynomial built from all its derivatives up to some order, with an explicit remainder term. In fact, many L'Hôpital-style limits (as in Worked Example 1) can be recomputed instantly once Taylor expansions of sin⁡x\sin x, exe^x, etc. are known, because the ratio of leading-order Taylor terms reproduces exactly the L'Hôpital limit — the two techniques are complementary views of the same local linear (and higher-order) approximation idea.

Is there a version of the rule where aa itself can be +∞+\infty and the form is ∞/∞\infty/\infty simultaneously?

Yes — this is precisely the corollary proved above, obtained by combining the substitution x=1/tx = 1/t (reducing x→∞x\to\infty to t→0+t \to 0^+) with the finite-point ∞/∞\infty/\infty theorem. The chain rule shows the derivative ratio transforms correctly under this substitution, since the extra factor −1/t2-1/t^2 introduced in both F′(t)F'(t) and G′(t)G'(t) cancels in the quotient F′(t)/G′(t)=f′(1/t)/g′(1/t)F'(t)/G'(t) = f'(1/t)/g'(1/t).

Before this

Where this leads