Skip to main content

L’Hôpital’s Rule

Some limits refuse to cooperate. You substitute the value the variable is approaching, and instead of a clean number you get 00\frac{0}{0} or \frac{\infty}{\infty} — expressions that could equal anything. L’Hôpital’s Rule is the elegant escape hatch: when a limit collapses into one of these "indeterminate forms," you can often replace the numerator and denominator with their derivatives and try again. It turns a hopeless-looking limit into a routine calculation, and it is one of the most-used tools in all of calculus.

The rule is powerful precisely because it converts a question about values (which are undefined) into a question about rates of change (which are usually well-behaved). Master it and a whole class of limits — the ones that appear constantly in physics, probability, and analysis — becomes almost mechanical.

Learning Objectives

  • Recognize the indeterminate forms 00\frac{0}{0} and \frac{\infty}{\infty} and state the conditions under which L’Hôpital’s Rule applies.
  • Apply the rule correctly by differentiating numerator and denominator separately (not as a quotient).
  • Handle repeated applications when the first pass yields another indeterminate form.
  • Convert the other indeterminate forms — 0 0 \cdot \infty, \infty - \infty, 00 0^0, 1 1^\infty, 0\infty^0 — into a quotient the rule can handle.
  • Know when the rule fails or does not apply, and pick a better technique.

Quick Answer

L’Hôpital’s Rule says: if limxaf(x)g(x)\lim_{x \to a} \frac{f(x)}{g(x)} gives the indeterminate form 00\frac{0}{0} or \frac{\infty}{\infty}, then

limxaf(x)g(x)=limxaf(x)g(x) \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). You differentiate the top and bottom separately — this is not the quotient rule. If the new limit is still indeterminate, apply the rule again. The point aa may be finite or ±\pm\infty. Other indeterminate forms (0 0\cdot\infty, \infty-\infty, powers) must first be rewritten as a fraction before the rule applies.

Where It Came From

The rule carries the name of the French nobleman Guillaume de l’Hôpital (1661–1704), but the mathematics behind it was not his. In the 1690s, calculus was brand new — Leibniz had published his notation only a few years earlier, and almost no one in France understood it. L’Hôpital, a wealthy and genuinely enthusiastic amateur, wanted to learn. So he hired the brilliant Swiss mathematician Johann Bernoulli to teach him, first in person and then by correspondence.

Crucially, l’Hôpital paid Bernoulli a retainer in exchange for Bernoulli’s mathematical discoveries — with an agreement that l’Hôpital could use them as he wished. In 1696 l’Hôpital published Analyse des Infiniment Petits pour l’Intelligence des Lignes Courbes ("Analysis of the Infinitely Small for the Understanding of Curved Lines"), the first-ever textbook on differential calculus. Inside was the rule for evaluating 00\frac{0}{0} limits. It was Bernoulli’s work, communicated in a 1694 letter, but it appeared under l’Hôpital’s name — and the name stuck.

Why did the rule need to exist at all? The founders of calculus were obsessed with tangent lines, velocities, and areas, and these constantly produced ratios that vanished at the point of interest — the very 00\frac{0}{0} that defines a derivative itself. Mathematicians needed a systematic way to extract the finite value hiding inside a 00\frac{0}{0} expression. Bernoulli’s insight was that the local behavior of ff and gg near the trouble point is governed by their slopes, so the ratio of slopes recovers the true limit. After l’Hôpital died, Bernoulli complained loudly that the discovery was his, and modern historians agree — but by then the name was permanent. Today it is sometimes written "l’Hospital," reflecting the older French spelling before the silent s became a circumflex.

The Core Idea: Why Derivatives Rescue 0/0

Suppose f(a)=0f(a) = 0 and g(a)=0g(a) = 0. Near x=ax = a, the linear approximations are f(x)f(a)(xa)f(x) \approx f'(a)(x-a) and g(x)g(a)(xa)g(x) \approx g'(a)(x-a). Then

f(x)g(x)f(a)(xa)g(a)(xa)=f(a)g(a). \frac{f(x)}{g(x)} \approx \frac{f'(a)(x-a)}{g'(a)(x-a)} = \frac{f'(a)}{g'(a)}.

The common factor (xa)(x-a) cancels, and the ratio of slopes survives. That is the whole intuition: when both functions are pinned to zero at the same point, whichever one is climbing away faster wins, and the derivatives measure exactly that speed. The rigorous proof uses the Cauchy Mean Value Theorem, but this tangent-line picture captures the "why."

Worked Example: the 0/0 form

Evaluate limx0sinxx\lim_{x \to 0} \dfrac{\sin x}{x}.

Substituting x=0x = 0 gives sin00=00\frac{\sin 0}{0} = \frac{0}{0} — indeterminate, so the rule applies. Differentiate top and bottom separately:

limx0sinxx=limx0cosx1=cos01=1. \lim_{x \to 0} \frac{\sin x}{x} = \lim_{x \to 0} \frac{\cos x}{1} = \frac{\cos 0}{1} = 1.

The answer is 1 1. (Note: this famous limit is often used to define ddxsinx\frac{d}{dx}\sin x, so using L’Hôpital here is slightly circular — but it illustrates the mechanics perfectly.)

Applying the Rule More Than Once

If after one application the limit is still 00\frac{0}{0} or \frac{\infty}{\infty}, simply differentiate again. Each pass must be re-checked: the moment the form becomes determinate, stop and substitute.

Worked Example: repeated application

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

Substituting gives 110=00\frac{1 - 1}{0} = \frac{0}{0}. Apply the rule:

limx01cosxx2=limx0sinx2x. \lim_{x \to 0} \frac{1 - \cos x}{x^2} = \lim_{x \to 0} \frac{\sin x}{2x}.

This is again 00\frac{0}{0}, so apply the rule a second time:

limx0sinx2x=limx0cosx2=12. \lim_{x \to 0} \frac{\sin x}{2x} = \lim_{x \to 0} \frac{\cos x}{2} = \frac{1}{2}.

The answer is 12\frac{1}{2}.

Worked Example: the ∞/∞ form

Evaluate limxx2ex\lim_{x \to \infty} \dfrac{x^2}{e^x}.

As xx \to \infty, both top and bottom go to \infty, giving \frac{\infty}{\infty}. Apply the rule:

limxx2ex=limx2xex. \lim_{x \to \infty} \frac{x^2}{e^x} = \lim_{x \to \infty} \frac{2x}{e^x}.

Still \frac{\infty}{\infty}; apply again:

limx2xex=limx2ex=0. \lim_{x \to \infty} \frac{2x}{e^x} = \lim_{x \to \infty} \frac{2}{e^x} = 0.

The answer is 0 0. This confirms the important fact that exponentials dominate polynomials: no matter how large the power of xx, exe^x eventually overwhelms it.

Taming the Other Indeterminate Forms

L’Hôpital’s Rule only accepts 00\frac{0}{0} and \frac{\infty}{\infty}. Every other indeterminate form must be algebraically rewritten into one of these before the rule can touch it.

The product form 0 0 \cdot \infty: rewrite the product as a fraction. If f0f \to 0 and gg \to \infty, then fg=f1/gfg = \dfrac{f}{1/g} (a 00\frac{0}{0} form) or g1/f\dfrac{g}{1/f} (an \frac{\infty}{\infty} form).

Worked Example: 0 · ∞

Evaluate limx0+xlnx\lim_{x \to 0^+} x \ln x.

Here x0x \to 0 and lnx\ln x \to -\infty, so this is 0() 0 \cdot (-\infty). Rewrite as a quotient:

limx0+xlnx=limx0+lnx1/x=. \lim_{x \to 0^+} x \ln x = \lim_{x \to 0^+} \frac{\ln x}{1/x} = \frac{-\infty}{\infty}.

Now apply the rule. The derivative of lnx\ln x is 1x\frac{1}{x}; the derivative of x1x^{-1} is x2-x^{-2}:

limx0+1/x1/x2=limx0+(x)=0. \lim_{x \to 0^+} \frac{1/x}{-1/x^2} = \lim_{x \to 0^+} \left(-x\right) = 0.

The answer is 0 0.

The difference form \infty - \infty: combine into a single fraction (common denominator) first.

The power forms 00 0^0, 1 1^\infty, 0\infty^0: take the natural logarithm. If y=f(x)g(x)y = f(x)^{g(x)}, then lny=g(x)lnf(x)\ln y = g(x)\ln f(x), which is a 0 0\cdot\infty product; solve for limlny=L\lim \ln y = L, then the original limit is eLe^L.

Worked Example: 1^∞

Evaluate limx(1+1x)x\lim_{x \to \infty} \left(1 + \dfrac{1}{x}\right)^x.

Substituting gives 1 1^\infty. Let y=(1+1x)xy = \left(1 + \frac{1}{x}\right)^x, so

lny=xln ⁣(1+1x)=ln(1+1x)1/x, \ln y = x \ln\!\left(1 + \frac{1}{x}\right) = \frac{\ln\left(1 + \frac{1}{x}\right)}{1/x},

which is 00\frac{0}{0} as xx \to \infty. Applying the rule (using the chain rule on the top):

limx11+1/x(1x2)1x2=limx11+1x=1. \lim_{x \to \infty} \frac{\frac{1}{1 + 1/x} \cdot \left(-\frac{1}{x^2}\right)}{-\frac{1}{x^2}} = \lim_{x \to \infty} \frac{1}{1 + \frac{1}{x}} = 1.

So limlny=1\lim \ln y = 1, which means the original limit is e1=ee^1 = e. This is the classic definition of Euler’s number e2.71828e \approx 2.71828.

Real-World Applications

  • Physics — small-angle and limiting behavior: Limits like sinθθ1\frac{\sin\theta}{\theta} \to 1 justify the small-angle approximations used in pendulum motion, optics, and wave mechanics.
  • Probability and statistics: Deriving the exponential limit (1+rn)ner\left(1 + \frac{r}{n}\right)^n \to e^r underlies continuous compounding and the Poisson approximation to the binomial distribution.
  • Engineering — asymptotic analysis: Comparing growth rates of algorithms or signal decay (x2ex0\frac{x^2}{e^x} \to 0) tells engineers which term dominates as inputs get large.
  • Economics/finance: Continuous compound interest, A=PertA = Pe^{rt}, comes directly from the 1 1^\infty limit above.
  • Numerical stability: Recognizing a removable 00\frac{0}{0} (e.g., ex1x\frac{e^x - 1}{x} near 0 0) lets programmers replace an unstable formula with its limiting value to avoid catastrophic cancellation.

Common Mistakes

  1. Using the quotient rule instead of differentiating separately. Misconception: "Take the derivative of fg\frac{f}{g}." Why wrong: L’Hôpital’s Rule replaces the fraction with fg\frac{f'}{g'} — the numerator’s derivative over the denominator’s derivative — NOT the derivative of the whole quotient. Correction: Differentiate ff and gg independently: f(x)g(x)\frac{f'(x)}{g'(x)}.

  2. Applying the rule when the form is not indeterminate. Misconception: "It’s a limit of a fraction, so use L’Hôpital." Why wrong: If substitution gives, say, 20\frac{2}{0} or 53\frac{5}{3}, the rule does not apply and will give a false answer. For example limx0cosxx2\lim_{x\to 0}\frac{\cos x}{x^2} is 10\frac{1}{0}, not indeterminate — the limit is ++\infty, and differentiating would be nonsense. Correction: Always check the form is exactly 00\frac{0}{0} or \frac{\infty}{\infty} first.

  3. Forgetting to re-check after each application, or continuing past a determinate answer. Misconception: "Keep differentiating until it looks simple." Why wrong: Once the form becomes determinate you must substitute; differentiating further changes the value. Correction: Re-evaluate the form after every pass and stop the instant it is no longer indeterminate.

Comparison and Connections

L’Hôpital’s Rule is one of several ways to crack a stubborn limit. It is powerful but not always the fastest, and occasionally it does not work at all (when fg\frac{f'}{g'} oscillates without settling).

TechniqueBest forLimitation
L’Hôpital’s Rule00\frac{0}{0}, \frac{\infty}{\infty} where derivatives are easyNeeds an indeterminate form; can loop forever
Algebraic simplification (factor/cancel)Rational functions with a common factorOnly for factorable expressions
Multiplying by conjugateLimits with roots, \infty - \inftySpecific to radical forms
Taylor/Maclaurin seriesAny smooth function; reveals whyRequires knowing the series
Squeeze theoremOscillating factors like xsin(1/x)x\sin(1/x)Needs good bounding functions

A deep connection: L’Hôpital’s Rule and Taylor series agree because both are statements about local approximation. For 1cosxx2\frac{1-\cos x}{x^2}, the series cosx=1x22+\cos x = 1 - \frac{x^2}{2} + \cdots gives x2/2x2=12\frac{x^2/2}{x^2} = \frac12 instantly — the same answer, no differentiation loop.

Practice Questions

Recall

State the two indeterminate forms to which L’Hôpital’s Rule applies directly, and write the rule as an equation.

Answer: The forms 00\frac{0}{0} and \frac{\infty}{\infty}. The rule: limxaf(x)g(x)=limxaf(x)g(x)\lim_{x\to a}\frac{f(x)}{g(x)} = \lim_{x\to a}\frac{f'(x)}{g'(x)} when the left side is one of those forms and the right side exists.

Understanding

Explain why limx0x+1x\lim_{x\to 0}\frac{x+1}{x} should not be evaluated with L’Hôpital’s Rule.

Answer: Substituting gives 10\frac{1}{0}, which is not an indeterminate form — it is a determinate infinite limit. The rule requires 00\frac{0}{0} or \frac{\infty}{\infty}. (The actual limit does not exist as a two-sided limit: it is ++\infty from the right and -\infty from the left.)

Application

Evaluate limx0ex1xx2\lim_{x \to 0} \dfrac{e^x - 1 - x}{x^2}.

Answer: Form is 00\frac{0}{0}. First pass: limex12x\lim \frac{e^x - 1}{2x}, still 00\frac{0}{0}. Second pass: limex2=12\lim \frac{e^x}{2} = \frac{1}{2}.

Analysis

Show that L’Hôpital’s Rule fails to resolve limxx+sinxx\lim_{x\to\infty}\dfrac{x + \sin x}{x}, and find the true limit another way.

Answer: The form is \frac{\infty}{\infty}. Applying the rule gives limx1+cosx1\lim_{x\to\infty}\frac{1 + \cos x}{1}, which oscillates and has no limit — so the rule is inconclusive. But directly, x+sinxx=1+sinxx\frac{x+\sin x}{x} = 1 + \frac{\sin x}{x}, and since sinxx0\frac{\sin x}{x} \to 0 (squeeze theorem, as sinx1|\sin x| \le 1), the true limit is 1 1. This shows the rule’s conclusion requires the new limit to exist.

FAQ

Is it "L’Hôpital" or "L’Hospital"? Both refer to the same person. The older French spelling was "l’Hospital"; the silent s later became a circumflex accent, giving "l’Hôpital." You will see either in textbooks.

Can I use the rule for one-sided limits? Yes. It works for xa+x \to a^+, xax \to a^-, xax \to a, and x±x \to \pm\infty, as long as the appropriate one-sided indeterminate form holds.

What if applying the rule keeps giving me the same or a harder expression? That is a signal to switch methods. Some limits loop forever (e.g., limxexe2x+1\lim_{x\to\infty}\frac{e^x}{\sqrt{e^{2x}+1}} cycles). Try algebra, a substitution, or a Taylor series instead.

Do I need ff and gg to be defined at aa? No — they only need to be differentiable near aa (with g(x)0g'(x) \neq 0 nearby), and to produce the indeterminate form as xax \to a. The functions need not even be defined at aa itself.

Why can’t I just plug in and call 00\frac{0}{0} equal to zero or one? Because 00\frac{0}{0} is genuinely undetermined — different pairs of functions approaching zero give different ratios (sinxx1\frac{\sin x}{x}\to 1 but x2x0\frac{x^2}{x}\to 0). The whole point of the rule is that the rates at which they approach zero decide the answer.

Does the rule work if only one of top or bottom goes to zero? No. Both must go to 0 0 (or both to ±\pm\infty). If only the numerator goes to 0 0, the limit is just 0 0; if only the denominator does, the limit is infinite. Neither is indeterminate.

Quick Revision

  • Applies only to 00\frac{0}{0} and \frac{\infty}{\infty}. Check the form first, every time.
  • Rule: limfg=limfg\lim \frac{f}{g} = \lim \frac{f'}{g'} — differentiate top and bottom separately, not as a quotient.
  • Re-check the form after each application; stop as soon as it is determinate.
  • 0 0\cdot\infty: rewrite as f1/g\frac{f}{1/g}. \infty-\infty: combine over a common denominator.
  • 00 0^0, 1 1^\infty, 0\infty^0: take ln\ln, evaluate limlny=L\lim \ln y = L, then answer is eLe^L.
  • Key results: sinxx1\frac{\sin x}{x}\to 1; x2ex0\frac{x^2}{e^x}\to 0; (1+1x)xe\left(1+\frac1x\right)^x \to e.
  • If fg\frac{f'}{g'} does not exist (e.g. oscillates), the rule is inconclusive — use another method.

Prerequisites

  • Taylor and Maclaurin Series (local polynomial approximation — an alternative route to the same limits)
  • Continuity and the Mean Value Theorem (the theoretical foundation of the rule)

Next Topics

  • Improper Integrals (where \frac{\infty}{\infty} reasoning reappears)
  • Sequences and Series Convergence (growth-rate comparisons)