Skip to content
IB Diploma ProgrammeSL & HL

L'Hôpital's rule

Mathematics: Analysis and Approaches SL & HL Chapter Notes

Last updated November 2026

ShareWhatsAppPost

L'Hôpital's rule notes as a printable PDF.

Read online free. Download a watermarked copy with a free account.

Read the notes

The full L'Hôpital's rule notes as text: skim, search, and jump between subtopics.

~10 min read

1. Spotting an indeterminate form

To find lim_x→ a(f(x))/(g(x)), substitute x = a first. If the answer is a number, you are done.

If you get 0/0, the limit is not yet known. The same is true of (∞)/(∞) as x → ∞. These are the two indeterminate forms in this topic. The limit may still exist.

A value such as 3/0 is not indeterminate. The limit is not finite and l'Hôpital's rule does not apply. A limit that must be finite forces the numerator to 0 when the denominator does. The command term show that needs every step down to the given answer.

0/0 or (±∞)/(±∞)

Worked example 12 marks

The function f is defined as f(x) = (x² + ax + b)/(x + 1), where x ≠ -1 and a, b ∈ Z. First consider the case where lim_x → -1 f(x) is finite.

Show that b = a - 1.

  1. 1

    finite limit only if lim_x → -1(x² + ax +b) = 0 (R1) [1]

  2. 2

    1 - a + b = 0 (A1) [1]

  3. 3

    b = a - 1 (AG)

2. l'Hôpital's rule at a point

When f(a) = g(a) = 0, differentiate the numerator and the denominator separately. Then take the limit again. This is not the quotient rule.

The rule gives lim_θ → 0sinθ/θ = lim_θ → 0cosθ/1 = 1. This is the syllabus's own example.

If the new limit is again a number, that number is the answer. In an exam, write that you attempt to use l'Hôpital's rule, then show both derivatives. Radians are needed here.

lim_x→ a(f(x))/(g(x)) = lim_x→ a(f'(x))/(g'(x))

lim_θ→ 0sinθ/θ = 1

Worked example 12 marks

The function f is defined as f(x) = (x² + ax + b)/(x + 1), where x ≠ -1 and a, b ∈ Z. Consider the case where lim_x → -1 f(x) is finite and b = a - 1.

Find lim_x → -1 f(x) in terms of a.

  1. 1

    attempt to use l'Hôpital's rule or division (M1): lim_x → -1(x² + ax + (a-1))/(x + 1) = lim_x → -1(2x + a)/1 [1]

  2. 2

    lim_x → -1 f(x) = a - 2 (A1) [1]

  3. 3

    Check by division: (x² + ax + (a-1))/(x + 1) = x + (a - 1), which is a - 2 at x = -1.

3. Limits as x tends to infinity

The same rule works when both f(x) → ±∞ and g(x) → ±∞ as x → ∞. Check both go to infinity before you differentiate.

A limit of L as x → ∞ means the graph has the horizontal asymptote y = L. So the rule finds asymptotes as well as limits.

Give the answer as an equation when asked for an asymptote: y = 0, not 0.

lim_x→∞(f(x))/(g(x)) = L ⇒ y = L is a horizontal asymptote

Worked example 14 marks

Do not use a calculator. The function f is defined by f(x) = (ln x)/x for x > 0. Find the equation of the horizontal asymptote of the graph of y = f(x).

  1. 1

    as x → ∞, ln x → ∞ and x → ∞, so the form is (∞)/(∞) (R1) [1]

  2. 2

    attempt to use l'Hôpital's rule: lim_x→∞(1/x)/1 (M1) [1]

  3. 3

    = lim_x→∞1/x = 0 (A1) [1]

  4. 4

    the horizontal asymptote is y = 0 (A1) [1]

4. Using the rule more than once

After one use, look at the new form. If it is still 0/0 or (∞)/(∞), use the rule again.

Write each step as a new limit. Check the form every time. Stop as soon as the form is not indeterminate. Then substitute.

If the new form is a number, do not differentiate again. That gives a wrong answer. Keep the constants: a factor such as the 2 in 2x changes the answer.

limf/g = lim(f')/(g') = lim(f'')/(g'') while the form is still indeterminate

Worked example 14 marks

Do not use a calculator. Find lim_x → 0(e^(x) - 1 - x)/x².

  1. 1

    form is 0/0, so lim_x→ 0(e^(x) - 1 - x)/x² = lim_x→ 0(e^(x) - 1)/2x (M1) [1]

  2. 2

    still 0/0, so use the rule again (R1) [1]

  3. 3

    = lim_x→ 0(e^(x))/2 (M1) [1]

  4. 4

    = 1/2 (A1) [1]

5. Maclaurin series as the other method

The syllabus allows a Maclaurin series instead of l'Hôpital's rule. Replace each function by its series. Cancel. Divide through by the lowest power of x. Then let x → 0.

Keep enough terms. The numerator must not cancel to 0 before the first non-zero term appears.

The two methods must agree. Use one to check the other.

sin x = x - x³/6 + x⁵/120 - ⋯

e^(x) = 1 + x + x²/2 + x³/6 + ⋯

Worked example 14 marks

Do not use a calculator. Use the Maclaurin series for sin x to find lim_x → 0(x - sin x)/x³.

  1. 1

    sin x = x - x³/6 + x⁵/120 - ⋯ (M1) [1]

  2. 2

    x - sin x = x³/6 - x⁵/120 + ⋯ (A1) [1]

  3. 3

    (x - sin x)/x³ = 1/6 - x²/120 + ⋯ (M1) [1]

  4. 4

    as x → 0 the limit is 1/6 (A1) [1]

  5. 5

    Check with l'Hôpital's rule three times: (1 - cos x)/3x² → (sin x)/6x → (cos x)/6 = 1/6.

Recap

  • Substitute first. Only 0/0 and (∞)/(∞) are indeterminate.
  • l'Hôpital's rule: limf/g = lim(f')/(g'). Differentiate the top and bottom separately.
  • lim_θ→0sinθ/θ=1. This is the standard example.
  • A limit L as x→∞ gives the horizontal asymptote y = L.
  • Check the form again after each use. Use the rule again only if it is still indeterminate.
  • A Maclaurin series is the other method. Keep enough terms, then divide by the lowest power.
  • Write the method. A bare answer may earn no marks.

End-of-chapter exercise

Test yourself on the whole chapter. Work through these before moving on.

  1. State which one of the following limits is an indeterminate form. A. lim_x → 0(sin 3x)/x B. lim_x → 0(cos x)/(x + 1) C. lim_x → 0(x + 1)/x D. lim_x → ∞(e^(-x))/x1 mark
    Answer
    1. A: substituting gives 0/0 (A1).
    2. B gives 1/1, a number. C gives 1/0, which is not finite but is not indeterminate. D gives 0/(∞), which tends to 0.

    Trap: Any zero on top or bottom looks indeterminate. Only 0/0 and (∞)/(∞) are.

  2. Do not use a calculator. Use l'Hôpital's rule to find lim_x → 3(x² - 9)/(x - 3).2 marks
    Answer
    1. form is 0/0; attempt to use l'Hôpital's rule: lim_x→32x/1 (M1).
    2. = 6 (A1).

    Trap: Using the quotient rule on the whole fraction gives a different, wrong expression. Differentiate the top and the bottom separately.

  3. Do not use a calculator. Find lim_x → 0(e^(2x) - 1)/x.3 marks
    Answer
    1. form is 0/0; attempt to use l'Hôpital's rule (M1).
    2. lim_x→0(2e^(2x))/1 (A1).
    3. = 2 (A1).

    Trap: The derivative of e^(2x) is 2e^(2x). Forgetting the chain rule gives 1.

  4. A student writes lim_x → 0(cos x)/(x + 1) = lim_x → 0(-sin x)/1 = 0. Explain the error and find the correct limit.3 marks
    Answer
    1. substituting x = 0 gives 1/1, which is not indeterminate (R1).
    2. so l'Hôpital's rule must not be used (R1).
    3. lim_x→0(cos x)/(x+1) = (cos 0)/(0 + 1) = 1 (A1).

    Trap: The rule is only for 0/0 or (∞)/(∞). Check the form before differentiating.

  5. Do not use a calculator. Find lim_x → ∞x²/(e^(x)).4 marks
    Answer
    1. form is (∞)/(∞); attempt to use l'Hôpital's rule: lim_x→∞2x/(e^(x)) (M1).
    2. still (∞)/(∞), so use the rule again (R1).
    3. lim_x→∞2/(e^(x)) (A1).
    4. = 0 (A1).

    Trap: Stopping at 2x/(e^(x)) gives no answer. That form is still (∞)/(∞), so use the rule again.

  6. Do not use a calculator. Find lim_x → 0(1 - cos x)/x². You may use lim_x→0(sin x)/x = 1.4 marks
    Answer
    1. form is 0/0; attempt to use l'Hôpital's rule: lim_x→0(sin x)/2x (M1).
    2. still 0/0, so use the rule again (R1).
    3. lim_x→0(cos x)/2 (A1).
    4. = 1/2 (A1).

    Trap: Dropping the 2 from 2x gives 1. The constant stays in the limit.

  7. Do not use a calculator. Use the Maclaurin series for e^(x) to find lim_x → 0(e^(x) - 1 - x - 1/2x²)/x³.4 marks
    Answer
    1. e^(x) = 1 + x + x²/2 + x³/6 + x⁴/24 + ⋯ (M1).
    2. numerator = x³/6 + x⁴/24 + ⋯ (A1).
    3. divide by x³: 1/6 + x/24 + ⋯ (M1).
    4. limit = 1/6 (A1).

    Trap: Stopping the series at x² makes the numerator 0. You need the x³ term.

  8. Do not use a calculator. The function f is defined by f(x) = (ln x)/(√x) for x > 0. Find the equation of the horizontal asymptote of the graph of y = f(x).5 marks
    Answer
    1. form is (∞)/(∞) (R1).
    2. attempt to use l'Hôpital's rule: lim_x→∞(1/x)/(1/(2√x)) (M1).
    3. = lim_x→∞(2√x)/x = lim_x→∞2/(√x) (A1).
    4. = 0 (A1).
    5. the asymptote is y = 0 (A1).

    Trap: The command term asks for an equation. Giving 0 alone loses the last mark. Also, the derivative of √x is 1/(2√x), not 1/(√x).

  9. Do not use a calculator. The function g is defined by g(x) = (xcos x - sin x)/x³ for x ≠ 0 and g(0) = k. Determine the value of k for which g is continuous at x = 0.6 marks
    Answer
    1. at x = 0 the form is 0/0 (R1).
    2. attempt to use l'Hôpital's rule; product rule: d/dx(xcos x) = cos x - xsin x (M1).
    3. numerator derivative = cos x - xsin x - cos x = -xsin x (A1).
    4. lim_x→0(-xsin x)/3x² = lim_x→0(-(sin x)/3x) (A1).
    5. = -1/3 (A1).
    6. continuous, so k = lim_x→0 g(x) = -1/3 (A1).

    Trap: Differentiating xcos x as -sin x misses the product rule, so the numerator derivative is wrong from the first step.

  10. Do not use a calculator. The function f is defined by f(x) = (e^(x) - 1 - ax)/x² for x ≠ 0, where a ∈ R. Consider the case where lim_x → 0 f(x) is finite. (a) Determine the value of a. [3] (b) Find lim_x → 0 f(x). [2] (c) Verify your answer to (b) using the Maclaurin series for e^(x). [2]7 marks
    Answer
    1. (a)
    2. form is 0/0; attempt to use l'Hôpital's rule: lim_x→0(e^(x) - a)/2x (M1).
    3. the denominator tends to 0, so a finite limit needs lim_x→0(e^(x) - a) = 0, that is 1 - a = 0 (R1).
    4. a = 1 (A1).
    5. (b)
    6. still 0/0; use the rule again: lim_x→0(e^(x))/2 (M1).
    7. = 1/2 (A1).
    8. (c)
    9. e^(x) - 1 - x = x²/2 + x³/6 + ⋯ (M1).
    10. (e^(x) - 1 - x)/x² = 1/2 + x/6 + ⋯, which tends to 1/2 (A1).

    Trap: With a ≠ 1 the limit after one step is (1 - a)/0, which is not finite. The value of a comes from the condition, not from the rule alone.

Say this, not that

Wording that loses the mark, against the wording the mark scheme credits.

Loses the markGets the mark
The limit is 0/0, so it does not existThe form is 0/0, so attempt to use l'Hôpital's rule or division
Differentiate (x²+ax+b)/(x+1) with the quotient rulelim(2x+a)/1, differentiating the numerator and denominator separately
A finite limit needs x + 1 = 0A finite limit needs lim_x→-1(x²+ax+b)=0
lim_x→-1f(x)=2x+alim_x→-1f(x) = a-2, with x = -1 substituted

Frequently asked questions

When can I use l'Hôpital's rule to find a limit?
Only when substitution gives 0/0 or (∞)/(∞), which are the indeterminate forms. Substitute first, and if you get a number you are done. A value such as 3/0 is not indeterminate, and l'Hôpital's rule does not apply.
How do I apply l'Hôpital's rule?
Differentiate the numerator and the denominator separately, not with the quotient rule, then take the limit again. For example lim_θ→0sinθ/θ = lim_θ→0cosθ/1 = 1. Radians are needed here.
What do I do if l'Hôpital's rule still gives 0/0 after one use?
Look at the new form and use the rule again if it is still indeterminate. Stop as soon as the form is not indeterminate, then substitute. Do not differentiate again once you have a number, and keep constants such as the 2 in 2x.
How do I find a horizontal asymptote using a limit as x tends to infinity?
A limit L as x→∞ means the graph has the horizontal asymptote y=L. Check that both f(x) and g(x) go to infinity before you differentiate. Give the answer as an equation, such as y=0, not just 0.
Can I use a Maclaurin series instead of l'Hôpital's rule?
Yes, the syllabus allows it. Replace each function by its series, cancel, and divide through by the lowest power of x. Then let x→0. Keep enough terms so that the numerator does not cancel to 0 before the first non-zero term appears.
Why is it wrong to differentiate a limit before checking its form?
The rule is only for 0/0 or (∞)/(∞). Any zero on the top or bottom looks indeterminate, but only these two forms qualify. Check the form before differentiating, or you get a wrong limit such as 0 for lim_x → 0(cos x)/(x + 1).

Free notes are just the start.

Unlock every Workbook and Chapter at a Glance, and generate your own worksheets and predicted papers.

Explore plans

Related chapters