L’Hôpital’s Rule

L’Hôpital’s rule says that if lim f(x)/g(x) has the indeterminate form 0/0 or ∞/∞ and lim f′(x)/g′(x) exists (or is infinite), then lim f(x)/g(x) = lim f′(x)/g′(x). In brief: limx→0 (ex − 1)/x is 0/0, and the derivatives give ex/1 → 1. Other indeterminate forms (0 · ∞, ∞ − ∞, 1∞, 00, ∞0) are first transformed into a quotient.

The rule replaces algebraic tricks with differentiation: instead of factoring or multiplying by conjugates, you differentiate the numerator and the denominator separately. It does not apply to every limit, and it is not a derivative of the quotient. This guide states the rule with conditions, shows how to apply it repeatedly, explains how to convert the other indeterminate forms, covers the cases where it fails and gives a table of forms and strategies.

What does the rule say?

Let f and g be differentiable near a (except possibly at a), with g′(x) ≠ 0 near a. If limx→a f(x) = limx→a g(x) = 0, or both limits are ±∞, and the limit limx→a f′(x)/g′(x) exists (finite or infinite), then

limx→a f(x)/g(x) = limx→a f′(x)/g′(x).

The same holds for one-sided limits and for x → ±∞. The rule is based on the Cauchy mean value theorem. Near a, f(x) ≈ f′(a)(x − a) and g(x) ≈ g′(a)(x − a), so the ratio of the functions behaves like the ratio of their rates of change.

Worked examples with 0/0 and ∞/∞

Example 1

limx→0 sin x/x: 0/0. Derivatives: cos x/1 → 1. (But note that sin x/x → 1 is used to derive (sin x)′ = cos x, so using the rule here is circular in a first course.)

Example 2

limx→2 (x3 − 8)/(x2 − 4): 0/0. Derivatives: 3x2/(2x) → 12/4 = 3. Check by factoring: (x − 2)(x2 + 2x + 4)/((x − 2)(x + 2)) → 12/4 = 3 ✓.

2435

Example 3: applying the rule twice

limx→0 (ex − 1 − x)/x2: 0/0. First: (ex − 1)/(2x), again 0/0. Second: ex/2 → 1/2.

Example 4

limx→0 (1 − cos x)/x2: first sin x/(2x) → 1/2 (0/0 again, and either the standard limit or a second application gives cos x/2 → 1/2).

Example 5: ∞/∞

limx→∞ ln x/x: derivatives (1/x)/1 = 1/x → 0. And limx→∞ x3/ex: three applications give 6/ex → 0. In general, an exponential beats any power, and a power beats a logarithm.

246eˣx³

Example 6

limx→∞ (3x2 + 5x)/(2x2 − 1): ∞/∞. Derivatives: (6x + 5)/(4x), again ∞/∞; second: 6/4 = 3/2. Dividing by x2 gives the same answer more quickly.

Example 7

limx→1 (ln x)/(x − 1): 0/0, so (1/x)/1 → 1.

How do you handle other indeterminate forms?

0 · ∞: rewrite as a quotient

limx→0⁺ x ln x: 0 · (−∞). Write ln x/(1/x): (−∞)/∞. Derivatives: (1/x)/(−1/x2) = −x → 0. So x ln x → 0.

∞ − ∞: combine into a fraction

limx→0⁺ (1/x − 1/sin x) = lim (sin x − x)/(x sin x): 0/0. Derivatives: (cos x − 1)/(sin x + x cos x), still 0/0; again: −sin x/(2cos x − x sin x) → 0/2 = 0.

1∞, 00, ∞0: take logarithms

If y = f(x)g(x), then ln y = g(x) ln f(x), which has the form 0 · ∞. Find lim ln y = L, then lim y = eL.

Example 8

limx→0⁺ xx (00): ln y = x ln x → 0, so y → e0 = 1.

Example 9

limx→∞ (1 + 1/x)x (1∞): ln y = x ln(1 + 1/x) = ln(1 + 1/x)/(1/x), 0/0. Derivatives: [(−1/x2)/(1 + 1/x)]/(−1/x2) = 1/(1 + 1/x) → 1. So y → e.

Example 10

limx→0⁺ (sin x)x: ln y = x ln sin x = (ln sin x)/(1/x), (−∞)/∞. Derivatives: (cos x/sin x)/(−1/x2) = −x2 cos x/sin x → 0 (since x/sin x → 1 and x cos x → 0). So y → 1.

Example 11

limx→∞ x1/x (∞0): ln y = (ln x)/x → 0, so y → 1.

When does the rule fail or not apply?

Indeterminate forms and strategies

Indeterminate forms, how to convert them and examples
Form Conversion Example Limit
0/0apply the rule directly(ex − 1)/x, x → 01
∞/∞apply the rule directlyln x/x, x → ∞0
0 · ∞write f · g as f/(1/g)x ln x, x → 0⁺0
∞ − ∞common denominator or conjugate1/x − 1/sin x, x → 0⁺0
1∞take ln, then 0 · ∞(1 + 1/x)x, x → ∞e
00take lnxx, x → 0⁺1
∞0take lnx1/x, x → ∞1

Where does the rule come from?

The rule is named after Guillaume de l’Hôpital, who published it in 1696 in the first calculus textbook, Analyse des infiniment petits. The result is due to Johann Bernoulli, who had taught calculus to l’Hôpital and was paid for his lessons, with an agreement that l’Hôpital could use his discoveries. Bernoulli’s authorship was later documented from his letters, and in some countries the rule is called the Bernoulli–l’Hôpital rule.

102012

Where is it used?

The rule is used to prove the growth hierarchy of functions, to find asymptotic behaviour and to evaluate limits in physics and economics, such as the limit of an average rate when the interval shrinks. In numerical analysis, it is a way to understand the loss of precision in expressions like (ex − 1)/x for small x. In statistics, limits of ratios of tail probabilities are computed with it.

Which mistakes are common?

Using the quotient rule

Differentiate the numerator and the denominator separately. Do not differentiate the quotient f/g.

Using the rule when the form is not indeterminate

Substitute first. If the limit is a number or ±∞ (like 5/0), the rule does not apply.

Concluding when f′/g′ has no limit

Then the rule says nothing about f/g. Try another method.

Forgetting to convert other forms

For 0 · ∞ or 1∞, first rewrite the expression so that the rule applies.