L'Hopital's Rule

When a limit lands on 0/0 or \(\infty/\infty\), the fraction's value hinges on which part gets there faster — and speed is exactly what derivatives measure. L'Hopital's Rule swaps the stuck ratio \(f/g\) for the ratio of derivatives \(f'/g'\).

By the end you'll be able to spot a genuine \(0/0\) or \(\infty/\infty\) form, resolve it by differentiating numerator and denominator separately, and apply the rule again when the first pass is still indeterminate.

Predict: \(\lim_{x \to 0} \sin x / x\) is \(0/0\) — both curves hit the origin. Compare how FAST each heads to 0: the slope of sin x at 0 is \(\cos 0 = 1\), and the slope of x is 1. What ratio should \(\sin x / x\) settle on? Drag x toward 0 and check.

Then shrink the window to zoom in on the origin: watch sin x flatten into its tangent line at 0 until the two curves are indistinguishable — that's why the limit equals the slope ratio \(f'(0)/g'(0) = 1\). Hover or tab to the marked points for exact values.

x = 1.500 · sin x ⁄ x = 0.665 · slope ratio f′(0) ⁄ g′(0) = cos 0 ⁄ 1 = 1.000

Numerator sin x vs. denominator x — both pass through the origin; the limit is the ratio of their slopes there
f(x) = sin x g(x) = x tangent to sin x at 0 (slope 1)

L'Hopital's Rule resolves \(0/0\) and \(\infty/\infty\) limits by replacing the ratio of functions with the ratio of their derivatives — turning a stuck limit into a race of rates.

Formal

Suppose \(\lim_{x \to a} \dfrac{f(x)}{g(x)}\) has the form \(0/0\) or \(\pm\infty/\pm\infty\), with \(f\) and \(g\) differentiable near \(a\) and \(g'(x) \ne 0\) there. Then \[ \lim_{x \to a} \frac{f(x)}{g(x)} = \lim_{x \to a} \frac{f'(x)}{g'(x)}, \] provided the right-hand limit exists (or is \(\pm\infty\)). Two things to read carefully: you differentiate the top and bottom separately — this is not the quotient rule — and the equation only holds when the form is genuinely indeterminate. It also works for one-sided limits and for \(x \to \pm\infty\).

Applied

Think of \(0/0\) as a race to zero: the fraction's fate depends on which function gets there faster, and near the point each function runs at the speed of its tangent line — that's the linearization idea you've already used. The same logic handles growth-rate showdowns at infinity: \(\ln x\) vs. \(x\), or a polynomial vs. \(e^x\). Whenever an engineer or analyst says "\(e^x\) eventually crushes any polynomial," a quick L'Hopital argument is the receipt.

The method, in order

  1. Check the form first. Substitute. Only \(0/0\) or \(\infty/\infty\) qualifies — applying the rule to a determinate form like \(6/4\) manufactures a wrong answer.
  2. Differentiate top and bottom separately. New fraction: \(f'(x)/g'(x)\). Do not use the quotient rule — you're not differentiating the fraction, you're replacing each racer with its speed.
  3. Re-evaluate. If the new limit is a number (or \(\pm\infty\)), you're done. If it's still \(0/0\) or \(\infty/\infty\), apply the rule again.
  4. Other indeterminate forms — \(0 \cdot \infty\), \(\infty - \infty\), \(1^\infty\), \(0^0\), \(\infty^0\) — must first be rewritten (algebraically or with logarithms) into a \(0/0\) or \(\infty/\infty\) quotient.

You've beaten \(0/0\) before, back in the limits chapter — by factoring, rationalizing, or clearing denominators. Those algebraic moves still work and are often faster when a common factor is staring at you. L'Hopital's Rule is the derivative-powered alternative for when algebra stalls: no factoring trick will ever simplify \(\sin x / x\), but differentiating resolves it in one line.

Worked example

Evaluate \(\lim_{x \to 0} \dfrac{\sin x}{x}\). Step 1 — check the form: \(\sin 0 = 0\) and the denominator is 0, so this is \(0/0\). ✓ Step 2 — differentiate separately: the derivative of \(\sin x\) is \(\cos x\); the derivative of \(x\) is \(1\). New limit: \(\lim_{x \to 0} \dfrac{\cos x}{1}\). Step 3 — re-evaluate: \(\cos 0 = 1\), a determinate value. So \(\lim_{x \to 0} \dfrac{\sin x}{x} = \) 1 — exactly the slope ratio you watched the demo settle on.

Your turn

Evaluate \(\lim_{x \to 0} \dfrac{e^x - 1}{x}\). Check the form: \(e^0 - 1 = 0\) and the denominator is 0 — genuinely \(0/0\). ✓ Differentiate separately: the top becomes \(e^x\), the bottom becomes \(1\). Now finish it: \(\lim_{x \to 0} \dfrac{e^x}{1} = \) ____

Reveal the answer

\(e^0 = \) 1. So \(\lim_{x \to 0} \dfrac{e^x - 1}{x} = 1\) — numerator and denominator both leave 0 with slope 1, so they shrink in lockstep, just like \(\sin x\) and \(x\) did in the demo.

More info — why the slope ratio IS the limit

Zoom in on the demo until both curves look straight — that's linearization at work. Near \(x = 0\), \(f(x) \approx f(0) + f'(0)\,x = f'(0)\,x\) (since \(f(0) = 0\) in a \(0/0\) form) and likewise \(g(x) \approx g'(0)\,x\). Their ratio is then \(\dfrac{f'(0)\,x}{g'(0)\,x} = \dfrac{f'(0)}{g'(0)}\) — the \(x\)'s cancel, and only the slopes remain. That's the whole rule in one picture: close to the point, every differentiable function is its tangent line, so the fight between \(f\) and \(g\) is decided by their slopes. (The airtight proof runs through the Mean Value Theorem you met earlier; the OpenStax link in Dive deeper below carries it out.)

More info — three ways it goes wrong
  • Skipping the form check. On \(\lim_{x \to 2} (x+4)/x^2\), substitution gives \(6/4 = 3/2\) — done. Differentiating anyway yields \(1/(2x) \to 1/4\): plausible-looking and wrong.
  • Reaching for the quotient rule. The rule says \(f'/g'\) — two separate derivatives — not \((f/g)'\). The quotient rule computes a different (correct) thing that doesn't answer this question.
  • Looping forever. Some ratios never simplify under repeated differentiation (try \(\dfrac{e^x + e^{-x}}{e^x - e^{-x}}\) as \(x \to \infty\) — dividing through by \(e^x\) beats differentiating). Sometimes algebra wins; keep both tools on the bench.

Check your understanding

Question 1 of 4

Evaluate \(\lim_{x \to 0} \dfrac{1 - \cos x}{x^2}\).

Question 2 of 4

What goes wrong if you apply L'Hopital's Rule to \(\lim_{x \to 2} \dfrac{x + 4}{x^2}\)?

Question 3 of 4

\(\lim_{x \to 3} \dfrac{x^2 - 9}{x - 3}\) is a \(0/0\) form you first met before derivatives existed. Which statement is correct?

Question 4 of 4

Evaluate \(\lim_{x \to \infty} \dfrac{\ln x}{x}\).

Recap

  • If \(\lim f(x)/g(x)\) is \(0/0\) or \(\infty/\infty\), then \(\lim \dfrac{f(x)}{g(x)} = \lim \dfrac{f'(x)}{g'(x)}\), provided the new limit exists (or is \(\pm\infty\)).
  • Differentiate numerator and denominator separately — never the quotient rule.
  • Check the indeterminate form first: applied to a determinate form, the rule gives wrong answers.
  • If the new ratio is still indeterminate, apply the rule again; rewrite other forms (\(0 \cdot \infty\), \(\infty - \infty\), …) into quotients before starting.
  • Algebraic fixes (factoring, rationalizing) still resolve many \(0/0\) forms — L'Hopital is the tool for when they can't.

Dive deeper

Sources

  • L'Hopital's Rule