Educerie
Level

This whole subtopic is higher level. Nothing in it is on an SL paper.

Educerie · IB Diploma · Mathematics: analysis and approaches

Topic 5 Calculus · 5.13 Limits and l'Hôpital's rule

Level
HL only, the whole subtopic. If you are SL, none of this is on your papers.
Themes (key concepts)
approximation, change, patterns. Near the point that matters, every smooth function is approximated by its tangent line or its series, and a limit is decided by which part of the top and the bottom changes fastest.
The question this unit answers
when a limit comes out as 0/0 or ∞/∞, which tells you nothing, how do you find the value it is really heading for?
Where it is examined
Paper 1 (no calculator): "find limx→0 …", usually 4 to 7 marks, often needing l'Hôpital's rule twice, or a Maclaurin series from the formula booklet; sometimes as part (c) of a longer question after a series has been found. Paper 2: a limit read or estimated with a GDC table, then confirmed algebraically. Paper 3: limits as the step that decides the behaviour of a model or a sequence of functions.

What you must be able to do

You must be able toLevelWhat it looks like in the exam
Recognise the indeterminate forms 0/0 and ∞/∞, and know that other results are not indeterminateHL onlyThe first line of every limit answer: substitute, and say what form you get
Use l'Hôpital's rule to evaluate limx→a f(x)/g(x)HL only"Use l'Hôpital's rule to find limx→1 (ln x)/(x² − 1)" (4 marks)
Use l'Hôpital's rule repeatedly, checking the form before each useHL only"Find limx→0 (1 − cos 3x)/x²" (5 marks)
Evaluate limits as x → ∞, and so find horizontal asymptotesHL only"Find limx→∞ x²e−x" or "state the equation of the horizontal asymptote" (3 to 4 marks)
Evaluate limits using Maclaurin seriesHL only"Hence, or otherwise, find limx→0 (sin x − x)/x³" after a series part (3 to 5 marks)
Know and use limθ→0 (sin θ)/θ = 1HL onlyA step inside a longer limit, or a small-angle argument

Before you start

You need the limit idea from SL 5.1 and AHL 5.12: a limit is where a function is heading, not its value at the point. You need to differentiate fluently, including the chain rule (SL 5.6), because l'Hôpital's rule is differentiation used twice at once. Horizontal asymptotes of rational functions (SL 2.8) come back here as limits at infinity. For section 6 you need the Maclaurin series of eˣ, sin x, cos x and ln(1 + x), which are in the formula booklet and taught in full in AHL 5.19; this page only uses them.


1The idea in one paragraph

To find a limit, substitute first. If you get a number, that is the answer. If you get 0/0 or ∞/∞, you have learnt nothing, because the answer depends on how fast the top and the bottom approach 0 or ∞, and substitution cannot see speed. L'Hôpital's rule measures the speeds: differentiate the top, differentiate the bottom, separately, and try the limit again. If it is still 0/0, do it again. The other tool is the Maclaurin series: replace each function by the start of its power series, cancel the lowest power of x, and read the limit off. Both methods work because, close to a point, a smooth function behaves like a simple polynomial.

2Why 0/0 tells you nothing

All three of these limits look like 0/0 when you put x = 0 in, and they have three different answers.

limx→0 3x/x = limx→0 3 = 3
limx→0 x2/x = limx→0 x = 0
limx→0 x/x3 = limx→0 1/x2 = ∞grows without bound: no finite limit

The top and the bottom are both heading for zero, but at different rates, and the rate decides the answer. That is why 0/0 is called an indeterminate form: the form alone does not determine the limit. The same is true of ∞/∞. As x → ∞, 2x/x → 2, x²/x → ∞ and x/x² → 0.

Other results are not indeterminate, and you must not treat them as if they were:

Substituting givesWhat it means
a number over a non-zero numberthat value is the limit; you are finished
a non-zero number over 0the function grows without bound near a: no finite limit
0 over a non-zero numberthe limit is 0
0/0 or ∞/∞indeterminate: use l'Hôpital's rule or a series

The most famous indeterminate limit is the one the guide names. Figure 1 draws y = (sin x)/x. The function has no value at x = 0, but the graph heads steadily for 1 from both sides.

Figure 1 · y = (sin x)/x Figure 1 · y = (sin x)/x x y 1 −3π −2π −π π 2π 3π hole at (0, 1) Undefined at x = 0, yet the graph closes in on 1 from both sides: lim (sin x)/x = 1. The graph crosses the x-axis at the non-zero multiples of π, where sin x = 0.
Figure 1 · y = (sin x)/x heads for 1 as x → 0
x0.50.10.01
(sin x)/x0.9588510.9983340.999983

limθ→0 (sin θ)/θ = 1, with θ in radians.

In degrees the limit is π/180 instead, which is one of the reasons calculus is done in radians.

3L'Hôpital's rule

L'Hôpital's rule. If f(a) = g(a) = 0, or if f(x) and g(x) both → ±∞, then limx→a f(x)/g(x) = limx→a f′(x)/g′(x), provided the right-hand limit exists (or is ±∞). The same holds with a replaced by ∞.

Differentiate the top and the bottom separately. This is not the quotient rule, and nothing about f/g is being differentiated as a single function.

Why it works. Figure 2 takes f(x) = x³ − 8 and g(x) = x² − 4, which are both zero at x = 2. Close to x = 2, each curve is almost the same as its own tangent line there (the local straightness from SL 5.1). The tangent to f has gradient f′(2) = 12 and the tangent to g has gradient g′(2) = 4, so near 2

f(x) ≈ 12(x − 2) and g(x) ≈ 4(x − 2)
f(x)/g(x) ≈ 12(x − 2) / 4(x − 2) = 12/4 = 3the (x − 2) cancels
Figure 2 · x³ − 8 and x² − 4 near x = 2 Figure 2 · x³ − 8 and x² − 4 near x = 2 x y 1 2 3 −5 5 10 15 f(x) = x³ − 8 tangent to f at 2: 12(x − 2) g(x) = x² − 4 tangent to g at 2: 4(x − 2) both 0 at x = 2 Close to x = 2 each curve hugs its tangent, so f/g ≈ 12(x − 2) ÷ 4(x − 2) = 3.
Figure 2 · Near x = 2, each function looks like its tangent line

The ratio of two quantities that both vanish is the ratio of the rates at which they vanish, and the derivatives are those rates. That is the whole rule.

Worked example 1. Paper 1. Find limx→2 (x³ − 8)/(x² − 4).

substitute x = 2: (8 − 8)/(4 − 4) = 0/0indeterminate, so the rule applies
limx→2 (x3 − 8)/(x2 − 4) = limx→2 3x2/2xl'Hôpital
= 12/4 = 3

Check by factorising: (x − 2)(x² + 2x + 4)/((x − 2)(x + 2)) → 12/4 = 3. The rule and the algebra agree, as they must.

Worked example 2. Show that limx→0 (sin x)/x = 1.

substitute x = 0: 0/0
limx→0 sin x / x = limx→0 cos x / 1 = cos 0 = 1

A fair warning: the derivative of sin x was itself worked out using this very limit, so this is a quick way to reach the value, not an independent proof of it. When a question says "use l'Hôpital's rule", this working earns full marks.

Worked example 3. Paper 1. Find limx→0 (e3x − 1)/ln(1 + x).

substitute x = 0: (1 − 1)/ln 1 = 0/0
= limx→0 3e3x / (1/(1 + x))chain rule on the top
= 3(1) / (1/1) = 3

Worked example 4. Find limx→1 (ln x)/(x − 1).

substitute x = 1: 0/0
= limx→1 (1/x)/1 = 1

4Using the rule more than once

Sometimes one application of the rule gives 0/0 again. Then apply it again, and keep going until substitution gives a definite answer. Before each application, check the form.

Worked example 5. Paper 1. Find limx→0 (1 − cos x)/x².

substitute x = 0: (1 − 1)/0 = 0/0
= limx→0 sin x / 2xl'Hôpital once; substitute: still 0/0
= limx→0 cos x / 2l'Hôpital twice; substitute: 1/2, a number
= 1/2

Figure 3 draws all three stages on one set of axes. They are three different functions, but near x = 0 they all head for the same height, ½. That is what the rule promises: each new quotient has the same limit as the one before.

Figure 3 · Three quotients, one limit Figure 3 · Three quotients, one limit x y −3 −2 −1 1 2 3 1 y = ½ (1 − cos x)/x² sin x / 2x cos x / 2 Three different functions, all heading for ½ at x = 0. Only cos x / 2 can simply be evaluated there.
Figure 3 · Each stage of l'Hôpital's rule has the same limit

The trap: applying the rule when the form is not indeterminate. Take limx→0 (1 − cos x)/(x² + x).

substitute x = 0: 0/0
= limx→0 sin x / (2x + 1)l'Hôpital; substitute: 0/1 = 0. STOP
= 0

If you carry on and apply the rule again, you get lim cos x/2 = ½, which is wrong. The second quotient was 0/1, which is not indeterminate, so the rule no longer applies. A limit that has become a number is finished.

Worked example 6. Find limx→0 (eˣ − 1 − x)/x².

0/0 → limx→0 (ex − 1)/2xstill 0/0
→ limx→0 ex/2 = 1/2

5Limits at infinity and ∞/∞

The rule works in exactly the same way when x → ∞ and the top and bottom both grow without bound.

Worked example 7. Find the horizontal asymptote of y = (3x² + 1)/(2x² − x).

as x → ∞: ∞/∞
= limx→∞ 6x/(4x − 1)still ∞/∞
= limx→∞ 6/4 = 3/2

So the horizontal asymptote is y = 3/2. For a rational function the SL 2.8 method (divide top and bottom by the highest power of x) is just as quick, and it gives the same answer. L'Hôpital earns its place when the SL method has no grip, as with a logarithm or an exponential mixed in.

Worked example 8. Find limx→∞ (2x + ln x)/(x + 1).

∞/∞ → limx→∞ (2 + 1/x)/1 = 2

Which grows faster? L'Hôpital settles the races between the three families of function you know.

limx→∞ x2/ex → lim 2x/ex → lim 2/ex = 0twice, ∞/∞ each time
limx→∞ ln x / x → lim (1/x)/1 = 0

Each round of the rule lowers the power of x by one but leaves eˣ exactly as it was, so eˣ always wins in the end, whatever the power. The logarithm loses to any positive power of x. As x → ∞:

ln x grows more slowly than any positive power xⁿ, and xⁿ grows more slowly than eˣ.

Figure 4 shows what that means for y = x³e−x, which is x³/eˣ. The power wins at first and the graph climbs to a maximum at x = 3, where y = 27e−3 ≈ 1.34. Then the exponential takes over, and the graph falls to its horizontal asymptote, y = 0.

Figure 4 · y = x³/eˣ Figure 4 · y = x³/eˣ x y 3 5 10 15 0.5 1 1.5 max (3, 27e⁻³ ≈ 1.34) → 0: eˣ wins x³ wins The power grows faster at first, but the exponential overtakes it for good: y = 0 is an asymptote.
Figure 4 · The exponential always wins: x³/eˣ → 0

6Limits from Maclaurin series

The guide allows a second method: replace each function by the start of its Maclaurin series. The formula booklet gives these, for the values of x near 0 that matter here:

ex = 1 + x + x2/2! + x3/3! + …
sin x = x − x3/3! + x5/5! − …
cos x = 1 − x2/2! + x4/4! − …
ln(1 + x) = x − x2/2 + x3/3 − …

Figure 5 shows why this works for sin x. Near 0, sin x is almost exactly x; x − x³/6 is closer still, and stays close for longer. The error in using x is roughly x³/6, and that tiny difference is exactly what the limit below measures.

Figure 5 · sin x against x and x − x³/6 Figure 5 · sin x against x and x − x³/6 x y −2 −1 1 2 3 −2 −1 1 2 y = x y = x − x³/6 y = sin x All three agree near 0. sin x and x differ by about x³/6, so (x − sin x)/x³ → 1/6.
Figure 5 · Near 0, sin x is almost a polynomial

Worked example 9. Paper 1. Find limx→0 (x − sin x)/x³.

x − sin x = x − (x − x3/6 + x5/120 − …) = x3/6 − x5/120 + …
(x − sin x)/x3 = 1/6 − x2/120 + …divide every term by x³
→ 1/6 as x → 0

By l'Hôpital this needs three rounds: (1 − cos x)/3x², then sin x/6x, then cos x/6 → 1/6. Same answer, more steps.

Worked example 10. Find limx→0 (cos x − 1 + x²/2)/x⁴.

cos x − 1 + x2/2 = (1 − x2/2 + x4/24 − …) − 1 + x2/2 = x4/24 − …
÷ x4: 1/24 − … → 1/24

L'Hôpital would need four rounds here. When the rule would have to be used three or more times, the series is almost always quicker.

Worked example 11. Paper 1. Find the value of a for which limx→0 (ln(1 + x) − ax)/x² is finite, and find the limit.

ln(1 + x) − ax = (1 − a)x − x2/2 + x3/3 − …
÷ x2: (1 − a)/x − 1/2 + x/3 − …
the (1 − a)/x term grows without bound unless a = 1so a = 1
then the limit is −1/2

This is a question the series answers far more cleanly than the rule, because the series shows you every power of x at once.

7Choosing the method, and other shapes

Figure 6 is the decision in one picture.

Figure 6 · Finding lim f(x)/g(x) Figure 6 · Finding lim f(x)/g(x) Substitute x = a (or let x → ∞) number ÷ non-zero that is the limit non-zero ÷ 0 no finite limit 0/0 or ∞/∞ indeterminate l'Hôpital's rule f′/g′, separately (one or two rounds) Maclaurin series cancel, read off (many rounds, or a k) substitute again Name the form after every substitution. Stop the moment it is a number over a non-zero number.
Figure 6 · How to attack any limit of f(x)/g(x)

A product that is really a quotient. The guide's forms are 0/0 and ∞/∞, but a limit such as limx→0⁺ x ln x (which looks like 0 × (−∞)) can be rewritten as a quotient first, and then the rule applies.

x ln x = ln x / (1/x)now −∞/∞ as x -> 0⁺
→ lim (1/x)/(−1/x2) = lim (−x) = 0

Likewise xe−x = x/eˣ → 0 as x → ∞. The skill is to see the quotient hiding in the product.

8Where marks are lost

Using the quotient rule. L'Hôpital differentiates the top and the bottom separately: f′/g′, not (f′g − fg′)/g².

Not checking the form first. The rule is only valid for 0/0 or ∞/∞. Always write the substitution and name the form; that line carries a mark and saves you from the next mistake.

Applying the rule one time too many. Once substitution gives a number over a non-zero number, stop. Carrying on changes the answer.

Leaving out "lim". Writing (1 − cos x)/x² = sin x/2x is false; the two functions are different. Only their limits are equal, so every line needs "lim".

Treating 1/0 as indeterminate. A non-zero number over zero is not 0/0; the function grows without bound and there is no finite limit.

Degrees. lim (sin θ)/θ = 1 only in radians. The derivatives of sin and cos that the rule uses are radian results too.

Dropping terms from a series too early. In (x − sin x)/x³ the answer lives in the x³ term. Stop the series at x and you get 0/x³, which tells you nothing. Keep terms up to the power of x in the denominator.

Forgetting the chain rule. The derivative of e3x is 3e3x, and of 1 − cos 3x it is 3 sin 3x. A missing inner derivative gives a wrong limit, not just a lost mark.

9Work it right

  1. Substitute first, and write down the form you get.
  2. Only if it is 0/0 or ∞/∞, write "by l'Hôpital's rule" and differentiate top and bottom separately.
  3. Keep "lim" on every line until the last.
  4. Substitute again after each round, and name the form again.
  5. Stop as soon as the result is a number over a non-zero number.
  6. If the rule would need three or more rounds, or a constant has to be chosen to make the limit finite, use the booklet's Maclaurin series instead.
  7. With series, keep terms up to the power of x in the denominator, then divide every term by it.
  8. Check your answer against a quick numerical value if you have a GDC, or against factorising if the functions are polynomials.

10Try it

Marks in brackets. Q1 to Q5 are Paper 1 style (no calculator). Q6 is Paper 2 style.

Q1. Use l'Hôpital's rule to find limx→3 (x² − 9)/ln(x − 2). 4 marks

Q2. Find limx→0 (e2x − 1 − 2x)/(x sin x). 6 marks

Q3.

(a) Find limx→∞ (2x² − 5x)/(4x² + 1). 3 marks

(b) Find limx→∞ x³/eˣ. 3 marks

Q4. Using the Maclaurin series for sin x and cos x, find limx→0 (sin x − x cos x)/x³. 4 marks

Q5. The limit limx→0 (kx − sin 2x)/x³ is finite. Find the value of k and the value of the limit. 5 marks

Q6. Paper 2. Let f(x) = (tan x − x)/x³, x ≠ 0.

(a) Use your GDC to find f(0.1) and f(0.01), giving each to 4 significant figures. 2 marks

(b) Write down a conjecture for limx→0 f(x). 1 mark

(c) Using d/dx(tan x) = sec²x and the identity sec²x = 1 + tan²x, use l'Hôpital's rule to prove your conjecture. You may use limx→0 (tan x)/x = 1. 3 marks

11In one breath

Substitute first: a number over a non-zero number is the answer, a non-zero number over zero means no finite limit, and only 0/0 and ∞/∞ are indeterminate, because the answer depends on how fast the top and bottom move. L'Hôpital's rule: in those two cases, lim f/g = lim f′/g′, with top and bottom differentiated separately, never the quotient rule; it works because near the point each function looks like its tangent. Check the form before every round and stop the moment it is determinate. lim (sin θ)/θ = 1 in radians. As x → ∞ the same rule finds horizontal asymptotes and shows ln x ≪ xⁿ ≪ eˣ. Or replace functions by their booklet Maclaurin series, keep terms up to the denominator's power, divide and read off the limit; that is quicker when the rule would need three or more rounds, or when a constant must be chosen to make the limit finite.


Answers

Q1. Substituting x = 3 gives (9 − 9)/ln 1 = 0/0. By l'Hôpital's rule, limx→3 2x/(1/(x − 2)) = limx→3 2x(x − 2) = 6 × 1 = 6. R1 for showing the 0/0 form, M1 for differentiating top and bottom separately, A1 for 2x and 1/(x − 2), A1 for 6.

Q2. At x = 0: (1 − 1 − 0)/(0) = 0/0. By l'Hôpital: lim (2e2x − 2)/(sin x + x cos x), which at x = 0 is 0/0 again. Apply again: lim 4e2x/(2 cos x − x sin x) = 4/2 = 2. (Series check: e2x − 1 − 2x ≈ 2x² and x sin x ≈ x², so the ratio → 2.) R1 for the first 0/0, M1 A1 for the first derivatives (product rule on the bottom), R1 for noting 0/0 again, M1 for the second application, A1 for 2.

Q3. (a) ∞/∞, so lim (4x − 5)/(8x) is still ∞/∞; again: lim 4/8 = 1/2. Dividing top and bottom by x² also gives (2 − 5/x)/(4 + 1/x²) → 2/4 = 1/2. M1 for a valid method, A1 for the intermediate step, A1 for 1/2.

(b) ∞/∞ three times: x³/eˣ → 3x²/eˣ → 6x/eˣ → 6/eˣ → 0. M1 for l'Hôpital with ∞/∞ stated, A1 for at least two correct rounds, A1 for 0. An answer of 0 with no working scores at most A1.

Q4. sin x = x − x³/6 + …, and x cos x = x(1 − x²/2 + …) = x − x³/2 + …. So sin x − x cos x = (−1/6 + 1/2)x³ + … = x³/3 + …, and dividing by x³ gives 1/3 + (terms in x) → 1/3. M1 for substituting both series, A1 for x cos x = x − x³/2 + …, A1 for x³/3 as the leading term, A1 for 1/3.

Q5. sin 2x = 2x − (2x)³/6 + … = 2x − 4x³/3 + …. So kx − sin 2x = (k − 2)x + 4x³/3 − …, and dividing by x³ gives (k − 2)/x² + 4/3 − …. The first term grows without bound unless k = 2, and then the limit is 4/3. M1 for the series of sin 2x with 2x substituted, A1 for 2x − 4x³/3, M1 for dividing by x³ and considering the 1/x² term, A1 for k = 2, A1 for 4/3. A solution by l'Hôpital that argues the first round needs k − 2 = 0 for 0/0 is equally valid.

Q6. (a) f(0.1) = 0.3347, f(0.01) = 0.3333. A1 each.

(b) limx→0 f(x) = 1/3. A1.

(c) At x = 0 the form is 0/0. By l'Hôpital: lim (sec²x − 1)/(3x²) = lim tan²x/(3x²) = (1/3) × (lim (tan x)/x)² = (1/3) × 1² = 1/3, which proves the conjecture. M1 for differentiating top and bottom, M1 for using sec²x − 1 = tan²x, A1 for 1/3 with the given limit quoted. A second and third round of l'Hôpital instead of the identity is also accepted if done correctly.


Educerie · written from the published IB Diploma Programme Mathematics: analysis and approaches guide, first assessment 2021, section 5.13 Limits and l'Hôpital's rule. Original text, examples and questions. Diagrams drawn by Educerie. Last reviewed 25 September 2026.

Mocks: in the future, hold tight!