IB Maths AA HL Topic 5 — Calculus Paper 1 & 2 HL ~10 min read

l’Hôpital’s Rule

When a limit lim xa f(x)/g(x) gives you the indeterminate form 00 or ±∞±∞, l’Hôpital’s rule lets you replace the quotient by f′(x)/g′(x) and try the limit again. If it’s still indeterminate, you differentiate again — and keep going until the limit settles. Calculation-heavy, mechanical, exam-friendly. Here’s exactly how to drive it.

📘 What you need to know

The rule and why it works geometrically

l’Hôpital’s rule — formula booklet If lim xa f(x)g(x) = 00 or ±∞±∞, then lim xa f(x)g(x) = lim xa f′(x)g′(x)
Why l’Hôpital works — near x = a, curves look like their tangents x y a y = f(x) y = g(x) slope = f ′(a) slope = g ′(a) (a, 0): f(a) = g(a) = 0 f(x)/g(x) ≈ [f ′(a)(x − a)] / [g ′(a)(x − a)] = f ′(a) / g ′(a)   as x → a
Both curves vanish at x = a. Near a, each curve hugs its tangent line, so f(x) ≈ f′(a)(xa) and g(x) ≈ g′(a)(xa). The (xa) factors cancel, leaving f′(a)/g′(a). That’s the rule.

Indeterminate forms — what counts

Direct cases
00  or  ±∞±∞
Apply l’Hôpital straight away: differentiate top and bottom, take the limit.
Hidden cases — rewrite first
0·∞  or  ∞ − ∞
Convert algebraically into 0/0 or ∞/∞, THEN apply l’Hôpital. Example: x·ln x = ln x / (1/x) is now ∞/∞ form.
Forms l’Hôpital does NOT cover directly: 1, 00, ∞0. For these, take ln of the expression, evaluate the limit, then exponentiate back.

Repeated applications — when one differentiation isn’t enough

After differentiating once, if the new quotient f′/g′ still gives an indeterminate form at x = a, differentiate AGAIN — taking the derivative of f′ to get f″, and the derivative of g′ to get g″ — and check the form one more time. The classic x²/ex → ∞/∞ needs two passes; (sin xx)/x³ needs three. Each round requires a fresh form-check before you’re allowed to differentiate again.

🧭 Recipe — applying l’Hôpital’s rule

  1. Check the form: substitute x = a (or take the limit as x → ∞) and confirm you get 0/0 or ±∞/±∞. If not indeterminate, l’Hôpital does NOT apply — go back to algebraic methods.
  2. Convert hidden forms: if you have 0·∞ or ∞−∞, rewrite as a single quotient that is 0/0 or ∞/∞ before differentiating.
  3. Differentiate top and bottom separately: compute f′(x) and g′(x). Do NOT use the quotient rule — top and bottom are independent.
  4. Take the new limit: evaluate lim xa f′(x)/g′(x). If it’s a finite number or ±∞, that’s your answer.
  5. Repeat if still indeterminate: if f′(a)/g′(a) is still 0/0 or ±∞/±∞, differentiate again (now f″, g″) and re-check. Continue until the limit can be evaluated directly.

Worked examples

WE 1

Single application — 0/0

Use l’Hôpital’s rule to evaluate lim x→0 e3x − 12x.

Step 1 — check the form at x = 0: (e⁰ − 1)/(2·0) = (1 − 1)/0 = 0/0 ⟶ indeterminate ✓ Step 2 — differentiate top and bottom separately d/dx (e^(3x) − 1) = 3 e^(3x) d/dx (2x) = 2 Step 3 — take the new limit lim x→0 3e^(3x) / 2 = 3·e⁰ / 2 = 3/2 limit exists — done. lim x→0 e3x − 12x = 32 single application suffices because the new quotient gives 3/2 at x = 0 (no longer indeterminate). Sanity check via series: e^(3x) − 1 ≈ 3x + (3x)²/2 + …, so (e^(3x)−1)/(2x) ≈ 3/2 + 9x/4 + … → 3/2 at x = 0 ✓.
WE 2

Two applications — trig limit, 0/0

Use l’Hôpital’s rule to evaluate lim x→0 1 − cos 2xx².

Step 1 — check the form at x = 0: (1 − cos 0)/0² = (1 − 1)/0 = 0/0 ✓ indeterminate Step 2 — differentiate top and bottom d/dx (1 − cos 2x) = 2 sin 2x d/dx (x²) = 2x Step 3 — new limit lim x→0 (2 sin 2x)/(2x) = (sin 2x)/x at x = 0: sin 0 / 0 = 0/0 ⟶ STILL indeterminate Step 4 — apply l’Hôpital AGAIN d/dx (sin 2x) = 2 cos 2x d/dx (x) = 1 lim x→0 (2 cos 2x)/1 = 2 cos 0 = 2 lim x→0 1 − cos 2xx² = 2 two applications needed. Cross-check via Maclaurin: 1 − cos 2x = 1 − (1 − (2x)²/2! + …) = 2x² − …, so the quotient ≈ 2x²/x² = 2 ✓. Compare with the standard limit (1 − cos x)/x² → 1/2 — the factor of 4 from “2x” inside cos gives the answer 2.
WE 3

Limit at infinity — ∞/∞ form

Use l’Hôpital’s rule to evaluate lim x→∞ x²ex.

Step 1 — check the form as x → ∞: x² → ∞, e^x → ∞ ⟶ ∞/∞ indeterminate ✓ Step 2 — differentiate top and bottom d/dx (x²) = 2x d/dx (e^x) = e^x Step 3 — new limit lim x→∞ 2x / e^x still ∞/∞ ⟶ apply l’Hôpital again Step 4 — differentiate again d/dx (2x) = 2 d/dx (e^x) = e^x lim x→∞ 2 / e^x = 2/∞ = 0 lim x→∞ x²ex = 0 classic “exponential beats polynomial” result. By induction, lim x→∞ x^n / e^x = 0 for ANY positive integer n — keep applying l’Hôpital until the polynomial reduces to a constant, while e^x stays e^x. This generalises to ANY polynomial divided by ANY exponential going to infinity.
WE 4

Three applications — a classic case

Use l’Hôpital’s rule to evaluate lim x→0 sin xxx³.

Step 1 — check the form at x = 0: (0 − 0)/0 = 0/0 ✓ Step 2 — first differentiation d/dx (sin x − x) = cos x − 1; d/dx (x³) = 3x² at x = 0: (1 − 1)/0 = 0/0 ⟶ STILL indeterminate Step 3 — second differentiation d/dx (cos x − 1) = −sin x; d/dx (3x²) = 6x at x = 0: 0/0 ⟶ STILL indeterminate Step 4 — third differentiation d/dx (−sin x) = −cos x; d/dx (6x) = 6 at x = 0: (−cos 0)/6 = −1/6 ✓ exists lim x→0 sin xxx³ = −16 three applications because the numerator’s zero is “third-order”: sin x − x = −x³/6 + x⁵/120 − … vanishes to order x³ at 0. Via Maclaurin: (sin x − x)/x³ ≈ (−x³/6)/x³ = −1/6 ✓. The general lesson: the number of applications matches the order of the zero in the numerator (when the denominator is a single power).
WE 5

Limit at a finite a ≠ 0

Use l’Hôpital’s rule to evaluate lim x→2 x³ − 8x² − 4.

Step 1 — check the form (NOT at 0!) at x = 2: (8 − 8)/(4 − 4) = 0/0 ✓ Step 2 — differentiate top and bottom d/dx (x³ − 8) = 3x² d/dx (x² − 4) = 2x Step 3 — new limit at x = 2 lim x→2 3x² / 2x = 3(2)² / [2(2)] = 12/4 = 3 lim x→2 x³ − 8x² − 4 = 3 algebraic cross-check: factor — (x³ − 8) = (x − 2)(x² + 2x + 4); (x² − 4) = (x − 2)(x + 2). Cancel (x − 2): quotient → (x² + 2x + 4)/(x + 2) → (4 + 4 + 4)/4 = 12/4 = 3 ✓. Either method works; l’Hôpital is faster when factoring is hard.
WE 6

Hidden form — 0·∞ rewritten as ∞/∞

Use l’Hôpital’s rule to evaluate lim x→0+ x ln x.

Step 1 — identify the indeterminate form as x → 0⁺: x → 0, ln x → −∞ ⟶ 0 · (−∞) ⟶ NOT a direct l’Hôpital form Step 2 — rewrite as a quotient x ln x = (ln x) / (1/x) as x → 0⁺: ln x → −∞, 1/x → +∞ ⟶ −∞/∞ ✓ now l’Hôpital applies Step 3 — differentiate top and bottom d/dx (ln x) = 1/x d/dx (1/x) = −1/x² Step 4 — simplify and take limit (1/x) / (−1/x²) = (1/x) · (−x²) = −x lim x→0⁺ (−x) = 0 lim x→0+ x ln x = 0 key trick: 0·∞ becomes 0/0 or ∞/∞ by putting one factor in the denominator (use 1/x or 1/f(x) for whichever is easier to differentiate). Here putting ln x on top and 1/x on bottom gave the simpler algebra. Same idea works for limits like x² · e^(−x) → 0 and √x · ln x → 0.

💡 Top tips

⚠ Common mistakes

Up next: Limits using Maclaurin Series. The same indeterminate-form limits can often be cracked faster by substituting Maclaurin series for f(x) and g(x), then simplifying. For many limits you can read off the answer just by looking at the leading terms — no repeated differentiation required. This is the final note of the Calculus topic.

Need help with Calculus?

Get 1-on-1 help from an IB examiner who knows exactly what Paper 1 & 2 are looking for.

Book Free Session →