It's the night before a calculus quiz, you plug x = 0 into a limit, and the calculator says 0/0. That isn't an answer; it's a sign the limit is hiding something. L'Hôpital's rule is the tool built for exactly this moment: when a fraction gives 0/0 or ∞/∞, you differentiate the top and the bottom separately and take the limit again. This guide explains what the rule says, why it is true, how to use it step by step on seven different limits, and the mistakes that cost the most marks.
What is L'Hôpital's rule?
L'Hôpital's rule is a shortcut for limits of fractions that land on an indeterminate form. The two forms it handles directly are:
- 0/0: the top and bottom both approach 0
- ∞/∞: the top and bottom both grow without bound (either sign)
In symbols, if f(x) → 0 and g(x) → 0 as x → a (or both go to ±∞), then
lim f(x)/g(x) = lim f′(x)/g′(x)
provided the limit on the right exists or is ±∞. The functions must be differentiable near a, though not necessarily at a itself. The same rule holds for one-sided limits and for limits as x → ±∞. That is the statement in OpenStax Calculus Volume 1, section 4.8, a free university textbook.
Three things in that statement matter more than students expect:
- The form must be 0/0 or ∞/∞. Not 1/0, not 5/0, not 0/∞.
- You differentiate top and bottom separately. f′ over g′, not the derivative of f/g.
- The new limit has to exist (or be infinite). If it bounces around without settling, the rule tells you nothing.
A quick history note
The rule carries the name of Guillaume de l'Hôpital, a French nobleman who published it in 1696 in Analyse des infiniment petits, the first textbook on differential calculus. According to the MacTutor History of Mathematics archive at the University of St Andrews, much of the book's content came from Johann Bernoulli, whom l'Hôpital paid a retainer for his discoveries. So the rule is arguably Bernoulli's.
Why it works
The cleanest explanation uses linear approximation, the idea that a smooth function looks like its tangent line when you zoom in close enough (OpenStax, section 4.2).
Near x = a, the tangent line approximations are:
- f(x) ≈ f(a) + f′(a)(x − a)
- g(x) ≈ g(a) + g′(a)(x − a)
In the 0/0 case, f(a) = 0 and g(a) = 0, so those constant terms drop out:
- f(x)/g(x) ≈ [f′(a)(x − a)] / [g′(a)(x − a)] = f′(a)/g′(a)
The (x − a) factors cancel. In other words, when both functions pass through zero at the same point, their ratio is controlled by how fast each one is moving through zero, and that speed is the derivative. OpenStax uses exactly this argument to motivate the rule before giving the full proof, which relies on Cauchy's mean value theorem.
A picture helps. If the top is crossing zero twice as steeply as the bottom, then just next to x = a the top is about twice the size of the bottom. The ratio heads to 2, even though at x = a itself both are 0.
How to do it step by step
Use the same routine on every limit. Each step points to a worked example below.
1. Substitute first
Plug in the value of a. If you get a real number, you're done and no rule is needed. Skipping this check is the most expensive mistake on tests.
2. Name the form
Write the form down: 0/0, ∞/∞, 0·∞, ∞−∞, 1^∞, 0^0 or ∞^0. Only the first two go straight into the rule.
3. Rewrite other forms as a fraction
Turn a product into a quotient, combine a difference into one fraction, or take the natural log of an exponent form (examples 5 to 7).
4. Differentiate top and bottom separately
Find f′ and g′ as two independent derivatives. No quotient rule.
5. Take the new limit and re-check
Substitute into f′/g′. If it's still 0/0 or ∞/∞, go back to step 4 (example 3). If it settles to a number, that's your answer.
6. Undo any logarithm
If you took a log in step 3, the limit you found is ln y. Exponentiate to get y (example 7).
Seven worked examples
These cover every case you're likely to meet in a first calculus course.
Example 1: the classic 0/0
lim (x → 0) sin x / x
Substitute: sin 0 / 0 = 0/0. Indeterminate, so the rule applies.
Differentiate: (sin x)′ = cos x, and (x)′ = 1.
New limit: lim (x → 0) cos x / 1 = cos 0 = 1.
Example 2: a limit you could also factor
lim (x → 2) (x² − 4)/(x − 2)
Substitute: (4 − 4)/(2 − 2) = 0/0.
Differentiate: 2x over 1. Limit: 2(2) = 4.
Check by factoring: (x − 2)(x + 2)/(x − 2) = x + 2 → 4. Same answer. When factoring is quick, it's often safer on a test because a grader can follow it easily.
Example 3: applying the rule twice
lim (x → 0) (1 − cos x)/x²
Substitute: (1 − 1)/0 = 0/0.
First round: sin x / 2x. Substitute again: 0/0, still indeterminate.
Second round: cos x / 2. Substitute: cos 0 / 2 = 1/2.
Example 4: the ∞/∞ case
lim (x → ∞) ln x / x
Both go to infinity, so the form is ∞/∞.
Differentiate: (1/x) / 1 = 1/x → 0.
This proves something useful: x grows faster than ln x. The same approach shows that eˣ grows faster than any power of x.
Example 5: rewriting 0·∞
lim (x → 0⁺) x ln x
Here x → 0 and ln x → −∞, so the form is 0·∞. The rule doesn't apply yet. Rewrite the product as a fraction:
x ln x = ln x / (1/x), which is now −∞/∞.
Differentiate: (1/x) / (−1/x²) = −x → 0.
Which piece goes in the denominator matters. Putting ln x underneath, as x / (1/ln x), gives a messier derivative. Pick the version whose derivatives simplify.
Example 6: rewriting ∞ − ∞
lim (x → 0⁺) (1/x − 1/sin x)
Both terms blow up, giving ∞ − ∞. Combine into one fraction:
(sin x − x) / (x sin x), which is 0/0.
First round: (cos x − 1) / (sin x + x cos x). Still 0/0.
Second round: (−sin x) / (cos x + cos x − x sin x) → 0/2 = 0.
Example 7: the 1^∞ form
lim (x → ∞) (1 + 1/x)ˣ
The base goes to 1 and the exponent to ∞. For exponent forms (1^∞, 0^0, ∞^0), set y equal to the expression and take the natural log:
ln y = x ln(1 + 1/x) = ln(1 + 1/x) / (1/x), which is 0/0.
Differentiate top and bottom: [(−1/x²)/(1 + 1/x)] / (−1/x²) = 1/(1 + 1/x) → 1.
So ln y → 1, which means y → e¹. The limit is e, the well-known definition of Euler's number.
Common mistakes
Using the rule when the form isn't indeterminate
This is the costliest error. OpenStax gives a sharp example: lim (x → 1) (x² + 5)/(3x + 4). Substituting gives 6/7, a real number. If you differentiate anyway you get 2x/3 → 2/3, which is wrong. Always substitute first.
Using the quotient rule
L'Hôpital's rule is not the derivative of f/g. You take f′ and g′ as two separate derivatives and put one over the other. Writing (f′g − fg′)/g² is a different calculation and leads nowhere here.
Forgetting to rewrite other forms
0·∞ and ∞ − ∞ look like they should be "zero" or "cancel out," but they're indeterminate. Turn them into a single fraction first. For exponents, take a logarithm first.
Getting stuck in a loop
Try lim (x → ∞) √(x² + 1) / x. One round gives x / √(x² + 1), the original upside down. Another round flips it back. The rule never ends. Instead, divide the top and bottom by x: √(1 + 1/x²) / 1 → 1.
Assuming "no limit for f′/g′" means "no limit"
For lim (x → ∞) (x + sin x)/x, the rule gives (1 + cos x)/1, which keeps oscillating between 0 and 2 and has no limit. But the original limit does exist: split it into 1 + (sin x)/x → 1 + 0 = 1. The rule requires the new limit to exist; when it doesn't, the rule is silent, not proof that the answer doesn't exist.
How Calculus can help
When you're working through limits like these, the hardest part is often spotting where your own work went wrong. Calculus lets you snap a photo of a problem or type it in manually, then shows a step-by-step explanation, so you can compare each line with yours and find the exact step where it went wrong. It covers limits and continuity alongside derivatives, integration, series and differential equations. The best way to use it is after you've attempted the problem: work it on paper, then check. For more guides like this, see the Calculus blog, or read how other tools compare in Symbolab vs Mathway and our best math solver apps for iPhone.
Frequently asked questions
When can you use L'Hôpital's rule?
Only when direct substitution gives 0/0 or ∞/∞ (including −∞). Other indeterminate forms such as 0·∞, ∞−∞, 1^∞, 0^0 and ∞^0 must first be rewritten as a fraction or with a logarithm so that they become 0/0 or ∞/∞. If the limit is not indeterminate, the rule gives wrong answers.
Do you use the quotient rule with L'Hôpital's rule?
No. You differentiate the numerator and the denominator separately, as two independent functions. The quotient rule is for differentiating f/g as a whole, which is a different operation. Mixing the two is one of the most common errors on calculus tests.
Can you apply L'Hôpital's rule more than once?
Yes. If f′/g′ still gives 0/0 or ∞/∞, apply the rule again to f″/g″, checking the form each time. A limit such as (1 − cos x)/x² at 0 needs two rounds. Stop as soon as substitution gives a real number or a non-indeterminate form.
What if L'Hôpital's rule keeps going in circles?
Some limits, such as √(x² + 1)/x as x goes to infinity, flip back and forth forever under the rule. When that happens, switch methods: divide the top and bottom by the highest power of x, factor, or use a known limit instead.
Who discovered L'Hôpital's rule?
It is named after the Marquis de l'Hôpital, who published it in 1696 in the first textbook on differential calculus. Historians credit the result to Johann Bernoulli, whom l'Hôpital paid a retainer in exchange for his mathematical discoveries.
Conclusion
L'Hôpital's rule works because two functions crossing zero at the same point are compared by their slopes, and slopes are derivatives. Use it only on 0/0 or ∞/∞, differentiate the top and bottom separately, and re-check the form after every round. Rewrite products, differences and exponent forms into a fraction before you start, and switch methods if the rule loops. Practise the seven examples above until the four-step routine is automatic, and limits stop being the part of the exam you dread.
