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
What you must be able to do
| You must be able to | Level | What it looks like in the exam |
|---|---|---|
| Recognise the indeterminate forms 0/0 and ∞/∞, and know that other results are not indeterminate | HL only | The 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 use | HL only | "Find limx→0 (1 − cos 3x)/x²" (5 marks) |
| Evaluate limits as x → ∞, and so find horizontal asymptotes | HL only | "Find limx→∞ x²e−x" or "state the equation of the horizontal asymptote" (3 to 4 marks) |
| Evaluate limits using Maclaurin series | HL 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 θ)/θ = 1 | HL only | A 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.
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 gives | What it means |
|---|---|
| a number over a non-zero number | that value is the limit; you are finished |
| a non-zero number over 0 | the function grows without bound near a: no finite limit |
| 0 over a non-zero number | the 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.
| x | 0.5 | 0.1 | 0.01 |
|---|---|---|---|
| (sin x)/x | 0.958851 | 0.998334 | 0.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
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).
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.
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).
Worked example 4. Find limx→1 (ln x)/(x − 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².
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.
The trap: applying the rule when the form is not indeterminate. Take limx→0 (1 − cos x)/(x² + x).
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².
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).
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).
Which grows faster? L'Hôpital settles the races between the three families of function you know.
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.
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:
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.
Worked example 9. Paper 1. Find limx→0 (x − sin x)/x³.
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⁴.
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.
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.
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.
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
- Substitute first, and write down the form you get.
- Only if it is 0/0 or ∞/∞, write "by l'Hôpital's rule" and differentiate top and bottom separately.
- Keep "lim" on every line until the last.
- Substitute again after each round, and name the form again.
- Stop as soon as the result is a number over a non-zero number.
- 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.
- With series, keep terms up to the power of x in the denominator, then divide every term by it.
- 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.