Skip to content
AI360Xpert
Beta

L Hopital Rule for Zero over Zero

When a limit stalls at 0 over 0 or infinity over infinity, differentiate the top and bottom separately and try the limit again.

Sine x and x both pinch to 0 at the origin with slopes 1 and 1: zooming in, the ratio of heights matches the ratio of slopes, so the stalled 0 over 0 limit resolves to 1 over 1
Sine x and x both pinch to 0 at the origin with slopes 1 and 1: zooming in, the ratio of heights matches the ratio of slopes, so the stalled 0 over 0 limit resolves to 1 over 1

Why Does This Exist?

Limits of ratios stall constantly: softmax temperature limits, normalized weight ratios, rate comparisons of two vanishing losses, and the definition of the derivative itself are all 0/0 forms. Algebra rescues the factorable ones, but transcendental ratios like sin⁡x/x\sin x / x do not factor. This rule differentiates through the stalemate, converting an impossible evaluation into a routine one, and it generalizes to the ∞/∞\infty/\infty races that compare growth rates of competing terms.

Limits and continuity defines limits and names the indeterminate forms. This page is the workhorse for the two most common ones.

The one idea you need first

An indeterminate form 0/0 or ∞/∞\infty/\infty is a stalled limit, not an answer: two quantities race to zero (or infinity) and the limit asks who wins proportionally. Near the point, each function behaves like its tangent line, so the ratio of heights approaches the ratio of slopes. Differentiating top and bottom separately captures exactly that.

Think of It Like This

Two runners photo-finishing at zero

Two runners both cross the finish line at nearly the same instant and you must judge their relative speed from a photo taken at the line: both positions read ~0, useless. But their stride angles in the photo, the derivatives, reveal who arrived faster. L'Hôpital reads the strides when the positions tie.

One caution from the same picture: if the strides also tie, you need a closer look (differentiate again), and if the runners were never tied at all, stride comparison answers a question nobody asked. The tie, the indeterminate form, is what licenses the move.

How It Actually Works

If f(a)=g(a)=0f(a) = g(a) = 0 (or both run to ±∞\pm\infty) with g′≠0g' \neq 0 near aa:

lim⁡x→af(x)g(x)=lim⁡x→af′(x)g′(x)\lim_{x \to a} \frac{f(x)}{g(x)} = \lim_{x \to a} \frac{f'(x)}{g'(x)}

In plain words: differentiate the top, differentiate the bottom, separately, not as a quotient, then retry the limit. If the new ratio still stalls at 0/0 or ∞/∞\infty/\infty, apply again. If it resolves, stop: the rule never continues past a determinate form.

Worked example

Resolve lim⁡x→0sin⁡xx\lim_{x \to 0} \frac{\sin x}{x}. At x=0x = 0: 0/00/0, stalled, rule licensed.

Differentiate separately: top sin⁡x→cos⁡x\sin x \to \cos x, bottom x→1x \to 1. Retry:

lim⁡x→0cos⁡x1=11=1\lim_{x \to 0} \frac{\cos x}{1} = \frac{1}{1} = 1

Resolved: the limit is 1. Check numerically: sin⁡(0.01)/0.01≈0.00999983/0.01≈0.999983\sin(0.01)/0.01 \approx 0.00999983/0.01 \approx 0.999983, homing in on 1 as promised. A second classic: lim⁡x→0(ex−1)/x\lim_{x\to 0}(e^x - 1)/x gives ex/1→1e^x/1 \to 1 in one round.

Watch Out For

Applying the rule to a form that is not indeterminate

The symptom is a correct limit corrupted: lim⁡x→0(x+1)/x\lim_{x\to 0}(x + 1)/x is 1/0+=+∞1/0^+ = +\infty, but blind differentiation gives 1/1=11/1 = 1, flat wrong. The rule's license is exclusively 0/0 or ∞/∞\infty/\infty; anything else (including 1/01/0, 0/50/5, ∞/3\infty/3) evaluates directly. Always classify the form first: plug in, read the form, and only then decide. No stall, no L'Hôpital.

Differentiating past the resolution

After one round resolves the limit, a second round answers a different question and can unresolve it: differentiating cos⁡x/1\cos x / 1 again gives −sin⁡x/0-\sin x / 0, garbage manufactured from a finished answer. The symptom is a limit that "alternates forever" between forms. Recheck the form after every round and stop at the first determinate value. If rounds cycle (as with exe^x ratios at infinity), switch tools: compare growth rates or factor dominant terms instead.

The Quick Version

  • L'Hôpital applies only to 0/0 or ∞/∞\infty/\infty forms, differentiating top and bottom separately.
  • lim⁡x→0sin⁡x/x=1\lim_{x\to 0}\sin x/x = 1 in one round: cos⁡0/1=1\cos 0/1 = 1.
  • Recheck the form after every round; repeat only while still indeterminate.
  • Never use the quotient rule here: top and bottom differentiate independently.
  • Non-indeterminate forms evaluate directly; the rule would corrupt them.
  • Cycling ratios want growth-rate comparison, not endless rounds.