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.12 Continuity, differentiability and first principles
What you must be able to do
| You must be able to | Level | What it looks like in the exam |
|---|---|---|
| Say what a limit is, and read one from a graph or a formula | HL only | "Write down limx→2 f(x)" (1 to 2 marks), often where f(2) is undefined |
| Say whether a sequence, a series or a function converges or diverges, and to what | HL only | "Find the limit of uₙ as n → ∞", or the sum to infinity of a geometric series (2 to 3 marks) |
| Explain informally what it means for a function to be continuous at a point | HL only | Not tested directly; used to justify a graph or a piecewise model |
| Explain informally what it means for a function to be differentiable at a point, and why a corner is not | HL only | Not tested directly; why the modulus function has no derivative at 0 turns up in Paper 3 |
| Differentiate a polynomial from first principles | HL only | "Use differentiation from first principles to show that the derivative of 2x³ − x is 6x² − 1" (5 marks) |
| Find higher derivatives and use the notations dⁿy/dxⁿ and f⁽ⁿ⁾(x) | HL only | "Find f‴(x)" (2 marks), or "prove by induction that f⁽ⁿ⁾(x) = …" (7 marks) |
Before you start
You need SL 5.1, where a derivative was introduced as the gradient of a tangent and the limit of chord gradients, and the SL rules for differentiating xⁿ, eˣ, sin x and products (SL 5.3, 5.6). You need to expand (x + h)² and (x + h)³, or any (x + h)ⁿ with the binomial theorem (SL 1.9), and the sum to infinity of a geometric series (SL 1.8). The last section uses proof by mathematical induction (AHL 1.15). The formula booklet gives the first-principles definition, so the marks are for using it well.
1The idea in one paragraph
A limit is the value a function gets closer and closer to as its input approaches some number, whether or not the function is defined at that number. A function is continuous at a point if its graph passes through that point without a break, and differentiable there if the graph is also smooth, so that it has one clear tangent. The derivative itself is a limit: the gradient of a chord from x to x + h, as the gap h shrinks to zero. Writing that limit out and simplifying it is differentiation from first principles, and it is how every rule you have learnt is proved. Differentiate the result again and you have the second derivative, again and the third, and so on: the higher derivatives.
2Limits: where a function is heading
The function f(x) = (x² − 4)/(x − 2) is not defined at x = 2, because the denominator is zero there. Yet you can still ask what happens near 2. Factorise the top: (x − 2)(x + 2)/(x − 2) = x + 2 for every x except 2. So close to 2, f(x) is close to 4.
| x | 1.9 | 1.99 | 1.999 | 2 | 2.001 | 2.01 | 2.1 |
|---|---|---|---|---|---|---|---|
| f(x) | 3.9 | 3.99 | 3.999 | undefined | 4.001 | 4.01 | 4.1 |
We write this as
limx→a f(x) = L means f(x) can be made as close to L as you like by taking x close enough to a, from either side, but not equal to a.
So limx→2 (x² − 4)/(x − 2) = 4. Figure 1 draws it: a straight line with a single point missing, a hole, and the line heading straight for the hole from both sides.
Three things follow from the definition.
The value at a does not matter. The limit looks at x near a, never at x = a. The function can be undefined there (as here), or defined as something else entirely, and the limit is unchanged.
Both sides must agree. The notation x → a⁻ means x approaches a from below, and x → a⁺ from above. These are the one-sided limits. The limit exists only if the two one-sided limits exist and are equal.
A limit must be a finite number. If f(x) grows without bound as x → a, as 1/(x − 1)² does as x → 1, you may write "f(x) → ∞", but the limit does not exist. That is the first meaning of the word diverge.
3Convergence and divergence
Convergence means settling down to one finite value. Divergence means anything else: growing without bound, or never settling at all. The words apply to three kinds of object, and the guide wants all three.
A function as x → ∞. f(x) = 2 + 1/x converges to 2 as x → ∞: the 1/x part shrinks to nothing. That limit is the horizontal asymptote y = 2 from SL 2.8. By contrast x² diverges (it grows without bound), and sin x diverges by oscillating: it keeps sweeping between −1 and 1 and never settles on one value. Figure 2 shows the three behaviours side by side.
A sequence. The sequence uₙ = (n + 1)/n has terms 2, 1.5, 1.33…, 1.25, … and uₙ = 1 + 1/n → 1, so it converges to 1. The sequence 1, −1, 1, −1, … diverges by oscillation.
A series. A series converges if its partial sums Sₙ converge. You have met the key case already in SL 1.8: a geometric series converges exactly when |r| < 1, and then
S∞ = u₁/(1 − r), for |r| < 1.
Figure 3 plots the partial sums of 1 + ½ + ¼ + … creeping up towards 2, and the partial sums of 1 + 1.1 + 1.21 + … running away.
A derivative is a convergence question too: as h shrinks, the chord gradients form a list of numbers, and if that list converges, its limit is the derivative.
4Continuity at a point
Informally, a function is continuous at x = a if you can draw its graph through that point without lifting your pen. Written as conditions, all three of these must hold:
- f(a) is defined;
- limx→a f(x) exists (the two one-sided limits agree);
- the limit equals the value: limx→a f(x) = f(a).
Each condition can fail on its own, and each failure has a picture. Figure 4 draws all three.
- A jump. A taxi fare of €4 for the first 3 km and €7 after that jumps at x = 3. The left limit is 4, the right limit is 7, so the limit does not exist and condition 2 fails.
- A hole. f(x) = (x² − 4)/(x − 2) from section 2 has a limit of 4 at x = 2 but no value there, so condition 1 fails. Define f(2) = 4 and the hole is filled; define f(2) = 1 and condition 3 fails instead.
- An infinite break. f(x) = 1/(x − 1) has a vertical asymptote at x = 1. There is no value and no finite limit.
Polynomials, eˣ, sin x and cos x are continuous everywhere. Rational functions, ln x and tan x are continuous at every point of their domains; the breaks come where they are not defined.
5Differentiability at a point
A function is differentiable at x = a if it has a derivative there: the limit
exists, with the same value whether h approaches 0 from above or below. Geometrically, the graph has a single, non-vertical tangent at that point. If you zoom in far enough on a differentiable function, it looks like a straight line.
Differentiable implies continuous. If a graph has a break, there is no tangent at the break. But the converse is false, and this is the conceptual point the guide makes: a function can be continuous everywhere and still fail to be differentiable at some points. Figure 5 shows the two ways it happens.
A corner. f(x) = |x| is continuous at 0: you draw the V in one stroke. But the chord gradients disagree from the two sides.
Zoom in on the corner and it stays a corner, however far you go.
A vertical tangent. f(x) = ∛x is continuous and smooth-looking at 0, but the curve stands vertically there. The chord gradient is ∛h/h = 1/∛(h²), which grows without bound as h → 0. A vertical line has no gradient, so f′(0) does not exist.
A cusp, where a curve comes to a sharp point with both halves vertical, fails for both reasons at once.
6Differentiation from first principles
This is the part of 5.12 that is examined by name. The formula booklet gives it:
f′(x) = limh→0 (f(x + h) − f(x))/h
Read it as a picture first. Figure 6 takes y = x² and the point P(3, 9). Q is a second point on the curve, h to the right of P. The chord PQ has gradient (f(3 + h) − f(3))/h. As h shrinks, Q slides down the curve towards P, and the chord swings round towards the tangent.
The numbers do the same thing:
| h | 1 | 0.1 | 0.01 | 0.001 |
|---|---|---|---|---|
| chord gradient ((3 + h)² − 9)/h | 7 | 6.1 | 6.01 | 6.001 |
The chord gradients converge to 6, so the gradient of the tangent at P is 6. A table never proves a limit, though; it only suggests one. The proof is algebra, done for a general x so that you get the whole gradient function at once.
The method, always in this order. Write f(x + h). Subtract f(x): every term without an h must cancel. Divide by h: every remaining term has at least one factor h, so this is legal. Only now let h → 0.
Worked example 1. Paper 1. Use differentiation from first principles to find the derivative of f(x) = 3x² − 5x.
The answer agrees with the power rule, which is the point: the power rule is a shortcut for exactly this calculation.
Worked example 2. Paper 1. Show from first principles that the derivative of f(x) = 2x³ − x + 4 is 6x² − 1.
Notice where each term went. The constant 4 cancelled in the subtraction, which is why a constant differentiates to zero. The −x left a −h, which became −1 after dividing, which is why a linear term differentiates to its coefficient.
The power rule, proved. The same argument works for xⁿ with any positive integer n, and it is a short, satisfying use of the binomial theorem.
The guide limits first-principles questions to polynomials. You will not be asked to do sin x or eˣ this way.
7Higher derivatives
The derivative f′(x) is itself a function, so it can be differentiated. The result is the second derivative, and you keep going for the third, fourth and beyond. You need two notations.
| Derivative | Function notation | Leibniz notation |
|---|---|---|
| first | f′(x) | dy/dx |
| second | f″(x) | d²y/dx² |
| third | f‴(x) | d³y/dx³ |
| nth | f⁽ⁿ⁾(x) | dⁿy/dxⁿ |
In f⁽ⁿ⁾(x) the brackets round n are essential: f⁽³⁾(x) is the third derivative, while f³(x) would mean f(x) cubed. In d²y/dx² the 2 sits on the d on top and on the x underneath, because it is "d by dx, twice" applied to y.
For a polynomial, each derivative lowers the degree by one, so the derivatives eventually reach zero. Figure 7 draws f(x) = x³ − 3x and its first three derivatives: a cubic, a parabola, a line and a constant. The next derivative is 0 for every x.
Other functions never run out, and they produce patterns.
Spotting the pattern is not proving it. A pattern for f⁽ⁿ⁾(x) that holds for n = 1, 2, 3 might fail at n = 50. The guide links this section to proof by induction (AHL 1.15), and that is the standard Section B question: find the first few derivatives, conjecture the nth, then prove it.
Worked example 3. Paper 1, Section B. Let f(x) = xeˣ. Prove by induction that f⁽ⁿ⁾(x) = (x + n)eˣ for all n ∈ ℤ⁺.
Then write the conclusion in full, because it carries a mark: since the result is true for n = 1, and true for n = k + 1 whenever it is true for n = k, it is true for all n ∈ ℤ⁺ by mathematical induction.
Higher derivatives are not only for proofs: f″ gives concavity (SL 5.7) and acceleration (SL 5.9), and Maclaurin series (AHL 5.19) are built from the derivatives at 0.
8Where marks are lost
Letting h → 0 before dividing by h. Put h = 0 straight into (f(x + h) − f(x))/h and you get 0/0, which is meaningless. Simplify and divide first; take the limit last.
Dropping "lim" from the working. Writing (f(x + h) − f(x))/h = 6x − 5 is false: the left side is 6x + 3h − 5. The limit sign must be written on the line where h disappears, or the final mark goes.
Expanding (x + h)³ as x³ + h³. The middle terms 3x²h and 3xh² are the ones that produce the derivative. Expand with the binomial theorem every time.
Terms that do not cancel. After subtracting f(x), every term must contain h. If an x² or a constant is still there, there is an algebra slip above it; go back before dividing.
Using the power rule when the question says first principles. A correct derivative with no first-principles working scores zero, because the method is what is being assessed.
Thinking a limit is the value at the point. limx→2 (x² − 4)/(x − 2) = 4 even though the function has no value at 2. The limit is about approach, not arrival.
Assuming continuous means differentiable. |x| is continuous at 0 and has no derivative there. A corner, a cusp or a vertical tangent all stop differentiability without breaking the graph.
Writing f³(x) for the third derivative. Use f‴(x) or f⁽³⁾(x), with the brackets. f³(x) means [f(x)]³.
9Work it right
- Quote the definition f′(x) = limh→0 (f(x + h) − f(x))/h as your first line; it earns the method mark.
- Write f(x + h) in full, with brackets, before expanding anything.
- Expand, subtract f(x), and check that every surviving term contains h.
- Divide by h, and say that h ≠ 0 when you do.
- Carry "limh→0" on every line until the h-terms vanish, then write the derivative.
- In a "show that", end on exactly the expression given in the question.
- For an nth-derivative induction, write the base case, the assumption for n = k, the step to n = k + 1 with the working visible, and the full concluding sentence.
- Use f⁽ⁿ⁾ or dⁿy/dxⁿ, never fⁿ, for a higher derivative.
10Try it
Marks in brackets. Q1 to Q3 and Q5 are Paper 1 style (no calculator). Q4 is an understanding check rather than an exam question, since the guide says continuity and differentiability are not tested directly. Q6 is Paper 2 style.
Q1. Use differentiation from first principles to show that the derivative of f(x) = 2x² − 3x is f′(x) = 4x − 3. 4 marks
Q2. Let f(x) = x³ − 4x² + 1.
(a) Use differentiation from first principles to find f′(x). 5 marks
(b) Hence find the gradient of the curve y = f(x) at the point where x = 2. 1 mark
Q3.
(a) Find limx→∞ (3x + 1)/(x − 2). 2 marks
(b) Describe the behaviour of g(x) = 1/(x − 1)² as x → 1, and state whether limx→1 g(x) exists. 1 mark
(c) Determine whether the series 1 + 2/3 + 4/9 + 8/27 + … converges. If it does, find its sum. 2 marks
Q4. Let f(x) = |x − 2| + 1.
(a) Explain why f is continuous at x = 2. 1 mark
(b) Simplify (f(2 + h) − f(2))/h separately for h > 0 and for h < 0, and hence explain why f is not differentiable at x = 2. 3 marks
Q5. Let f(x) = xe−x.
(a) Find f′(x) and f″(x). 3 marks
(b) Prove by mathematical induction that f⁽ⁿ⁾(x) = (−1)ⁿ(x − n)e−x for all n ∈ ℤ⁺. 7 marks
Q6. Paper 2. Let f(x) = x⁴.
(a) Find the gradient of the chord from (1, f(1)) to (1 + h, f(1 + h)) for h = 0.1, 0.01 and 0.001, giving each to 4 significant figures. 2 marks
(b) Show that ((1 + h)⁴ − 1)/h = 4 + 6h + 4h² + h³, and hence write down f′(1). 3 marks
11In one breath
A limit is where f(x) is heading as x approaches a, from both sides, whatever happens at a itself; it must be a finite number, or the function diverges there. Sequences, series and functions converge when they settle on one finite value and diverge when they grow without bound or oscillate; a geometric series converges exactly when |r| < 1, to u₁/(1 − r). A function is continuous at a if f(a) exists, the limit exists, and the two are equal: no hole, no jump, no asymptote. It is differentiable at a if the chord-gradient limit exists from both sides, so the graph is smooth with one non-vertical tangent; differentiable means continuous, but |x| at 0 shows continuous does not mean differentiable. From first principles, f′(x) = limh→0 (f(x + h) − f(x))/h: expand f(x + h), subtract f(x), divide by h, then let h → 0, writing "lim" all the way. Differentiate again for f″(x) = d²y/dx², and on to f⁽ⁿ⁾(x) = dⁿy/dxⁿ; conjecture a pattern from the first few, then prove it by induction.
Answers
Q1. f′(x) = limh→0 (f(x + h) − f(x))/h. f(x + h) = 2(x + h)² − 3(x + h) = 2x² + 4xh + 2h² − 3x − 3h. Subtracting f(x): 4xh + 2h² − 3h. Dividing by h: 4x + 2h − 3. So f′(x) = limh→0 (4x + 2h − 3) = 4x − 3. M1 for the definition with their f(x + h) substituted, A1 for a correct expansion, M1 for subtracting f(x) and dividing by h, A1 for taking the limit to reach 4x − 3 with "lim" written. The power rule alone scores 0.
Q2. (a) f(x + h) = (x + h)³ − 4(x + h)² + 1 = x³ + 3x²h + 3xh² + h³ − 4x² − 8xh − 4h² + 1. Subtracting f(x): 3x²h + 3xh² + h³ − 8xh − 4h². Dividing by h: 3x² + 3xh + h² − 8x − 4h. Letting h → 0: f′(x) = 3x² − 8x. M1 for the definition, A1 for expanding (x + h)³ correctly, A1 for expanding −4(x + h)², M1 for subtracting and dividing by h, A1 for 3x² − 8x after the limit.
(b) f′(2) = 3(4) − 8(2) = −4. A1. Follow-through from their f′(x).
Q3. (a) Divide top and bottom by x: (3 + 1/x)/(1 − 2/x) → 3/1 = 3. M1 for dividing through by x or an equivalent argument, A1 for 3.
(b) As x → 1 from either side, (x − 1)² is small and positive, so g(x) → +∞: g diverges and the limit does not exist. A1 for the behaviour and "does not exist" together.
(c) Geometric with r = 2/3, and |r| < 1, so it converges. S∞ = 1/(1 − 2/3) = 3. R1 for |r| < 1 as the reason, A1 for 3.
Q4. (a) f(2) = 1, and as x → 2 from either side |x − 2| + 1 → 1, so the limit exists and equals f(2). The graph is a V with its vertex at (2, 1), drawn without lifting the pen. R1 for the limit equalling the value, or an equivalent informal reason.
(b) f(2 + h) − f(2) = |h| + 1 − 1 = |h|. For h > 0: |h|/h = 1. For h < 0: |h|/h = −h/h = −1. The right-hand limit is 1 and the left-hand limit is −1; they are not equal, so the limit defining f′(2) does not exist and f is not differentiable at x = 2. The graph has a corner there. A1 for each one-sided value, R1 for the conclusion that the two one-sided limits differ.
Q5. (a) Product rule: f′(x) = e−x − xe−x = (1 − x)e−x. Again: f″(x) = −e−x − (1 − x)e−x = (x − 2)e−x. M1 for the product rule, A1 for f′, A1 for f″.
(b) n = 1: (−1)¹(x − 1)e−x = (1 − x)e−x = f′(x), so the statement is true for n = 1. Assume f⁽ᵏ⁾(x) = (−1)ᵏ(x − k)e−x for some k ∈ ℤ⁺. Then f⁽ᵏ⁺¹⁾(x) = (−1)ᵏ[e−x − (x − k)e−x] = (−1)ᵏ(1 − x + k)e−x = (−1)ᵏ⁺¹(x − k − 1)e−x = (−1)ᵏ⁺¹(x − (k + 1))e−x, which is the statement for n = k + 1. Since it is true for n = 1, and true for n = k + 1 whenever it is true for n = k, it is true for all n ∈ ℤ⁺ by mathematical induction. A1 for checking n = 1, M1 for the assumption for n = k written as an assumption, M1 for differentiating their f⁽ᵏ⁾ with the product rule, A1 for a correct derivative, M1 for taking out a factor of −1, A1 for reaching (−1)ᵏ⁺¹(x − (k + 1))e−x, R1 for the conclusion sentence (only if the earlier marks are substantially earned). "Let n = k" instead of "assume" loses the assumption mark.
Q6. (a) h = 0.1: (1.1⁴ − 1)/0.1 = 4.641. h = 0.01: 4.060. h = 0.001: 4.006. A2 for all three, A1 for two correct.
(b) (1 + h)⁴ = 1 + 4h + 6h² + 4h³ + h⁴, so ((1 + h)⁴ − 1)/h = (4h + 6h² + 4h³ + h⁴)/h = 4 + 6h + 4h² + h³, as required. As h → 0 this tends to 4, so f′(1) = 4, which matches the table. M1 for the binomial expansion, A1 for the simplified quotient, A1 for f′(1) = 4.
Educerie · written from the published IB Diploma Programme Mathematics: analysis and approaches guide, first assessment 2021, section 5.12 Continuity, differentiability and first principles. Original text, examples and questions. Diagrams drawn by Educerie. Last reviewed 25 September 2026.