L'Hopital's Rule and the Mistakes Made When Using It
State L'Hopital's rule with all its conditions, apply it to six kinds of limit, and avoid the errors that produce wrong answers.
Key takeaways
- Use the rule only on the forms 0/0 and ∞/∞, after confirming the form by substitution or inspection.
- Differentiate numerator and denominator separately, and never apply the quotient rule here.
- The conclusion holds when the limit of f′/g′ exists or is infinite; if it merely oscillates, the rule tells you nothing.
- Products, differences and powers of indeterminate type must first be rewritten as quotients.
- Algebra or a known limit is often quicker and avoids circular reasoning.
L'Hopital's rule says that when a ratio f(x)/g(x) takes the form 0/0 or ∞/∞, you may often find its limit by differentiating the top and the bottom separately and taking the limit of the new ratio f′(x)/g′(x).
The rule is powerful and short, which is why it gets applied where it does not belong. Its conditions matter. Check them each time, including each time you repeat it.
The statement with its conditions
Let f and g be differentiable near a (they need not be at a itself), with g′(x) ≠ 0 near a. Suppose one of the following holds:
- f(x) → 0 and g(x) → 0 as x → a, or
- g(x) tends to ∞ or −∞ and f(x) does too.
If the limit of f′(x)/g′(x) exists, or is ∞ or −∞, then the limit of f(x)/g(x) equals it. The same statement holds for one-sided limits and for x → ∞ or x → −∞.
The rule is named after Guillaume de l'Hopital, who published it in his 1696 calculus textbook. The result is credited to Johann Bernoulli, who had been paid to teach him and share discoveries. The name is also written L'Hôpital.
Why it works
Take the simplest case: f(a) = g(a) = 0, both derivatives are continuous at a and g′(a) ≠ 0. Near a, each function is close to its tangent line:
f(x) ≈ f′(a)(x − a)
g(x) ≈ g′(a)(x − a)
f(x)/g(x) ≈ f′(a)/g′(a) the factor (x − a) cancels Two quantities heading to zero are compared by the speeds at which they get there. The general proof uses a two-function version of the mean value theorem.
The rule is therefore a statement about derivatives of the two parts, one at a time. The derivative of the quotient as a whole never enters.
Straightforward applications
Example 1. (eˣ − 1)/x as x → 0 has the form 0/0. Differentiating gives eˣ/1 → 1.
Example 2. (eˣ − 1 − x)/x² as x → 0 is 0/0. One application gives (eˣ − 1)/(2x), still 0/0. A second gives eˣ/2 → 1/2.
Example 3. x²/eˣ as x → ∞ is ∞/∞.
x² / eˣ → 2x / eˣ (still ∞/∞)
→ 2 / eˣ → 0 Example 4. ln x / x as x → ∞, where ln is the natural logarithm. The derivative ratio is (1/x)/1 → 0. The logarithm grows more slowly than x.
Check the form before every repeated step. Once the ratio stops being indeterminate, substitute and stop.
Three more worked cases
A repeated angle. For (1 − cos 3x)/x² as x → 0, the form is 0/0. The derivatives give 3 sin 3x/(2x). That is still 0/0, and you can finish with the standard sine limit instead of differentiating again: 3 sin 3x/(2x) = (9/2) × sin 3x/(3x) → 9/2.
A hidden identity. For (tan x − x)/x³ as x → 0:
(tan x − x)/x³
→ (sec² x − 1)/(3x²) differentiate top and bottom
= tan² x/(3x²) since sec² x − 1 = tan² x
= (1/3)(tan x / x)²
→ 1/3 Using the identity saved two further rounds of increasingly messy derivatives.
Different sides. For sin x / x² as x → 0, one step gives cos x/(2x). This is no longer indeterminate: the numerator approaches 1 and the denominator approaches 0. From the right the quotient tends to ∞, and from the left to −∞. So the original does the same, and no two-sided limit exists.
The third case shows why you stop as soon as the form changes. Differentiating cos x/(2x) once more would give −sin x/2, which approaches 0, a completely false answer.
Other indeterminate forms
The rule applies only to quotients, so other forms need rewriting.
Zero times infinity. For x ln x as x → 0⁺, write it as ln x / (1/x), which is −∞/∞. The derivatives give (1/x)/(−1/x²) = −x → 0.
Infinity minus infinity. For 1/x − 1/sin x as x → 0, combine into one fraction:
(sin x − x)/(x sin x) 0/0
→ (cos x − 1)/(sin x + x cos x) 0/0
→ (−sin x)/(2 cos x − x sin x) 0/2
= 0 Powers. For (1 + 3/x)ˣ as x → ∞, the form is 1 to the power ∞. Take the natural logarithm: x ln(1 + 3/x) = ln(1 + 3/x)/(1/x). The derivative ratio simplifies to 3/(1 + 3/x) → 3. The original limit is e³, about 20.1. The forms 0⁰ and ∞⁰ yield to the same logarithm step.
The final exponentiation is easy to forget. The value 3 is the limit of the logarithm. This pattern is tied to the number e.
One more power form
Consider xˣ as x → 0⁺, which has the shape 0⁰. Let y = xˣ, so that ln y = x ln x. The limit of x ln x found above is 0. Because the exponential function is continuous, y = e^(ln y) approaches e⁰ = 1.
At x = 0.01 the value of xˣ is about 0.955, and at x = 0.0001 it is about 0.999, which agrees. The reasoning has three moves: take a logarithm, rewrite the product as a quotient, and exponentiate at the end. Keep a separate name such as y for the original expression so that you do not lose track of which quantity you are finding.
It is tempting to declare that 0⁰ forms always give 1. Many common ones do, but the form is still indeterminate, since other pairs of functions heading to zero can produce different limits.
Mistake 1: using it on a determinate form
Consider (x + 1)/(x + 2) as x → 0. Substitution gives 1/2, and that is the answer. Blindly differentiating gives 1/1 = 1, which is wrong.
The rule's hypothesis failed: neither part approaches 0 or ∞. Writing "0/0" or "∞/∞" next to your first line is a cheap habit that prevents this.
Mistake 2: the quotient rule
The rule asks for f′/g′. Applying the quotient rule computes the derivative of f/g, a different quantity.
For (eˣ − 1)/x, the correct step gives eˣ. The quotient rule gives (x eˣ − eˣ + 1)/x², whose limit at 0 is 1/2, not 1.
Mistake 3: concluding that no limit exists
Take (x + sin x)/x as x → ∞. The form is ∞/∞. The derivative ratio is (1 + cos x)/1, which oscillates between 0 and 2 forever and has no limit.
That does not mean the original has none. Split it: (x + sin x)/x = 1 + sin x / x → 1. The rule works in one direction only. If f′/g′ has a limit, so does f/g with the same value. If f′/g′ has none, you must try something else.
Mistake 4: going in circles
Try x/√(x² + 1) as x → ∞. Differentiating gives 1 divided by x/√(x² + 1), which is √(x² + 1)/x. Differentiate again and you get back x/√(x² + 1). The rule loops.
Algebra finishes it at once. Divide top and bottom by x (positive here) to get 1/√(1 + 1/x²) → 1.
A different circularity concerns sin x / x. Applying the rule requires the derivative of sine, which is usually derived from that same limit. See the squeeze theorem for an independent proof.
Mistake 5: not simplifying
Repeated differentiation can make expressions balloon. Simplify between steps, and pull out factors with known nonzero limits.
For (sin x − x cos x)/x³, one application gives (cos x − cos x + x sin x)/(3x²), which simplifies to sin x/(3x) → 1/3. Without simplifying, you might apply the rule twice more.
The way you arrange a product also matters. For x ln x, moving x to the denominator as 1/x works well. Moving ln x down as 1/(ln x) produces something worse.
Reading the answer for meaning
At infinity, the rule compares growth rates. A limit of 0 for f/g, where both grow without bound, says that g eventually dwarfs f. A limit of ∞ says the opposite. A finite nonzero limit says that the two grow at comparable rates, and the number gives their long-run ratio.
For instance, (3x² + 1)/(x² − x) gives 6x/(2x − 1) and then 6/2 = 3. The two quadratics stay in a ratio that approaches 3, which you could also read from their leading coefficients.
Applied to the exponential, repeated steps explain a famous fact. Take xⁿ/eˣ for a positive whole number n. Each application lowers the power by one and leaves eˣ unchanged. After n steps the numerator is the constant n! and the denominator is still eˣ, so the limit is 0. Every power, however high, is eventually outgrown.
The rule can also be too blunt to show you the rate of approach. It reports the final number, while algebra or a series often reveals how large the remaining error is for a given input. When that matters, as in numerical work, choose the method that keeps the extra information.
When to choose another method
Factoring and conjugates often settle a zero-over-zero limit faster and with less risk. For ratios of polynomials at infinity, compare leading terms.
Power series are often the clearest option near 0. Since eˣ = 1 + x + x²/2 + further terms, the expression (eˣ − 1 − x)/x² is 1/2 plus terms that vanish, and you can see why the answer is 1/2.
A numerical check is worth ten seconds: evaluate the original expression at an input near the target. If your result and the sample disagree badly, revisit the conditions. Very small inputs can suffer rounding error, so use a moderately small one, such as 0.01.