This whole subtopic is higher level. Nothing in it is on an SL paper.
Educerie · IB Diploma · Mathematics: analysis and approaches
IB Mathematics AA 5.12 · HL only
Continuity, differentiability and first principles
Where does the derivative actually come from, when can a curve be said to have one, and what happens when you differentiate again and again?
What you will learn
HL Understand informally what makes a function continuous or differentiable at a point, and why a corner breaks differentiability
HL Understand a limit as the value a function heads for, and when functions, sequences and series converge or diverge
HL Know the first principles definition of the derivative and how it proves the rules for polynomials
HL Know how to find and write higher derivatives, and how their patterns lead to proof by induction
You must be able to
HL Prove by induction a formula for the nth derivative of a function
HL Show from first principles the derivative of a polynomial, writing the limit on the right line
HL Find higher derivatives, including d²y ÷ dx² and d³y ÷ dx³ in terms of y
HL Find limits as x tends to infinity and use them to state horizontal asymptotes
HL Find a limit of the form 0 ÷ 0 by factorising and cancelling
HL Determine whether a sequence or geometric series converges, and find its limit
In the exam. higher derivatives, most often as a proof by induction of a formula for f(n)(x) on Paper 1 (7 to 9 marks, for functions such as x2ex, xepx or lnx), or as a 2 mark "find an expression for dx3d3y in terms of y"; limits as x→∞, such as "by considering limits, show that the graph has a horizontal asymptote" (2 marks); and differentiation from first principles for a polynomial, which the guide lists, so you must be able to write it out in full. Paper 3: limits and convergence as ideas inside a longer investigation. The guide says you will not be asked to test a function for continuity or differentiability in an examination; you need the ideas, because the rest of HL calculus rests on them.
1Continuity: a graph with no break
Informally, a function is continuous at x=a if you can draw its graph through that point without lifting your pen. Precisely, three things must hold:
f(a) is defined;
the graph heads for one finite height as x closes in on a, from the left and from the right (the limit exists, section 3);
that height is the value: limx→af(x)=f(a).
Each condition can fail on its own. Figure 1 draws all three failures.
Figure 1 · Three ways to break continuity
A jump. A taxi fare of €4 for the first 3 km and €7 after that jumps at x=3. The fare is 4 from the left and 7 from the right. There is no single height to head for, so condition 2 fails.
A hole.f(x)=x−2x2−4 is a straight line with one point missing. It heads for 4 at x=2 but has no value there, so condition 1 fails. Define f(2)=4 and the hole is filled (a removable discontinuity). Define f(2)=1 and condition 3 fails instead.
An infinite break.f(x)=x−11 has a vertical asymptote at x=1. There is no value and no finite height to head for.
Redefining one value cannot repair a jump or an infinite break.
Polynomials, ex, sinx and cosx are continuous everywhere. Rational functions, lnx and tanx are continuous on their domains. The breaks come where they are not defined.
Joining two pieces. A function of two pieces meeting at x=c is continuous at c when both pieces give the same value there. That gives an equation for an unknown constant.
Worked example 1. Find k so that f is continuous at x=2, where f(x)=kx2+3 for x≤2 and f(x)=5x−k for x>2.
left piece at x=2: 4k+3the formula for x≤2 is the one that owns f(2)right piece at x=2: 10−kwhat the other branch is heading forno break: 4k+3=10−k⇒5k=7⇒k=57
Worked example 2.g(x)=x+5x2+2x−15 is not defined at x=−5. What kind of break is it, and how is it repaired?
g(x)=x+5(x+5)(x−3)=x−3(x=−5)factorise, then cancel
The graph is the line y=x−3 with one point missing, heading for −8. It is a removable hole. Define g(−5)=−8 and it is continuous there.
2Differentiability: a graph with one tangent
A function is differentiable at x=a if the limit
f′(a)=h→0limhf(a+h)−f(a)
exists, with the same value whether h approaches 0 from above or below. The graph has a single, non-vertical tangent there. Zoom in far enough and a differentiable function looks like a straight line.
Differentiable implies continuous. Suppose f′(a) exists. Then
f(a+h)−f(a)=h×hf(a+h)−f(a)→0×f′(a)=0as h→0
so f(a+h)→f(a), which is condition 3 of continuity. A break always destroys the tangent.
The converse is false. This is the key point: a function can be continuous everywhere and still fail to be differentiable at some points. Figure 2 shows the two ways.
Figure 2 · Continuous, but not differentiable at 0
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.
h>0:h∣0+h∣−∣0∣=hh=1h<0:h∣0+h∣−∣0∣=h−h=−1∣h∣=−h when h is negativethe right-hand limit is 1, the left-hand limit is −1, so f′(0) does not exist
A vertical tangent
f(x)=3x is continuous at 0 and looks smooth, but the curve stands vertically there. The chord gradient is h3h=3h21, 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.
The domain of f′ is the set of x where the limit exists, so it can be smaller than the domain of f. For ∣x∣, f′(x)=1 for x>0, −1 for x<0, and nothing at x=0.
Differentiable at a join. Two pieces meeting at x=c give a differentiable function when they have the same value and the same gradient at c. A corner has matching values but different gradients.
Worked example 3. Let f(x)=x3+x2 for x≤1 and f(x)=ax+b for x>1. Find a and b so that f is continuous and differentiable at x=1.
gradients match: 3x2+2x=5 at x=1⇒a=5the right piece is a line, so its gradient is a everywherevalues match: 13+12=2=a+b⇒b=2−5=−3
A parabola joined to its own tangent line is a smooth join, such as x2 then 2x−1 at x=1.
3Limits: where a function is heading
The hole in section 1, f(x)=x−2x2−4, has no value at x=2, but you can ask what happens near 2. Since x−2(x−2)(x+2)=x+2 for every x except 2, close to 2 the value 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→af(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→2x−2x2−4=4. Figure 3 draws it: the line heads for the hole from both sides.
Figure 3 · A limit is where the graph is heading, not what happens at the point
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. The limit is unchanged.
Both sides must agree
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.
Example: x−1∣x−1∣ as x→1. From above it is x−1x−1=1. From below it is x−1−(x−1)=−1. So the limit does not exist.
A limit must be a finite number. If f(x) grows without bound as x→a, as (x−1)21 does as x→1, you may write "f(x)→∞". The limit does not exist.
A zero over zero at a point. When substituting a gives 00, the top and bottom share a factor (x−a). Factorise, cancel (legal, because x=a), then substitute.
x→−3limx+3x2−x−12=x→−3limx+3(x−4)(x+3)=x→−3lim(x−4)=−7cancel the shared factor, then put x=−3 in
Limits of this kind that cannot be factored wait for l'Hôpital's rule in 5.13.
4Convergence and divergence
Convergence = settling down to one finite value.
Divergence = anything else: growing without bound, or never settling at all.
Both apply to functions, sequences and series.
A function as x→∞
f(x)=2+x1 converges to 2 as x→∞, because the x1 part shrinks to nothing. That limit is the horizontal asymptote y=2 from SL 2.8.
10x2 diverges: it grows without bound.
sinx diverges by oscillating: it keeps sweeping between −1 and 1. Some books call this "neither convergent nor divergent". Either way, no limit.
Figure 4 shows the three behaviours side by side.
Figure 4 · Three ways a function can behave as x → ∞
Limits at infinity, for a fraction
Two facts do most of the work: xn1→0 as x→±∞ for any n>0, and e−x→0 as x→∞.
When the top and bottom both grow, divide every term by the highest power of x in the denominator (or by the dominant exponential). Each piece then settles or vanishes.
x→∞lim2x3+x2+57x3−2x=x→∞lim2+x1+x357−x22=27divide top and bottom by x3x→∞limex+65ex−2=x→∞lim1+6e−x5−2e−x=5divide top and bottom by exx→−∞limex+65ex−2=0+60−2=−31ex→0 as x→−∞: nothing to dividex2+4x3+1=x−x2+44x−1→∞top has the higher power: the limit does not exist
For a rational function:
The same power on top and bottom gives the ratio of the leading coefficients.
A lower power on top gives 0.
A higher power on top diverges.
If limx→∞f(x)=L, the graph has the horizontal asymptote y=L (SL 2.8). The third line above shows why you check x→−∞ separately. The same function has two horizontal asymptotes, y=5 on the right and y=−31 on the left.
A sequence. The sequence un=n+23n−1 has terms 32,45,58,…. Divide top and bottom by n: un=1+n23−n1→3. So it converges to 3. The sequence 2,−2,2,−2,… diverges by oscillation.
A series. A series converges if its partial sums Sn converge. You met the key case in SL 1.8. A geometric series converges exactly when ∣r∣<1, and then
S∞=1−ru1, for ∣r∣<1.
Figure 5 plots the partial sums of 1+21+41+⋯ creeping up towards 2. It also plots the partial sums of 1+1.1+1.21+⋯ running away.
Figure 5 · One series converges, one diverges
A derivative is a convergence question too. As h shrinks, the chord gradients form a list of numbers. If it converges, its limit is the derivative.
5Differentiation from first principles
This is the method the guide names, and the formula booklet gives it:
f′(x)=h→0limhf(x+h)−f(x)
Figure 6 takes y=x2 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 hf(3+h)−f(3).
As h shrinks, Q slides down the curve towards P, and the chord swings round towards the tangent.
Figure 6 · Chords PQ turn into the tangent at P as h → 0
The numbers do the same thing:
h
1
0.1
0.01
0.001
chord gradient h(3+h)2−9
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 only suggests a limit. The proof is algebra, done for a general x to get the whole gradient function.
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.
Putting h=0 at the start gives 00, which tells you nothing. The algebra exists to remove it.
Worked example 4. Paper 1. Use differentiation from first principles to find the derivative of f(x)=4x2+6x−11.
f′(x)=h→0limhf(x+h)−f(x)the definition: always the first linef(x+h)=4(x+h)2+6(x+h)−11=4x2+8xh+4h2+6x+6h−11f(x+h)−f(x)=8xh+4h2+6h4x2, 6x and −11 cancel: they always shouldhf(x+h)−f(x)=8x+4h+6h=0, so dividing by h is allowedf′(x)=h→0lim(8x+4h+6)=8x+6
It agrees with the power rule, a shortcut for this calculation.
Worked example 5. Paper 1. Show from first principles that the derivative of f(x)=3x3−2x2+8 is 9x2−4x.
A constant cancels in the subtraction, so it differentiates to zero. A linear term cx leaves ch, then c, so it differentiates to its coefficient.
Worked example 6. Use the definition to find the gradient of f(x)=4x2−9x at the single point x=3.
f′(3)=h→0limhf(3+h)−f(3)the definition at the point x=3f(3+h)−f(3)=4(9+6h+h2)−27−9h−9=15h+4h2f(3)=36−27=9f′(3)=h→0limh15h+4h2=h→0lim(15+4h)=15
Use this version when a question gives a point.
Worked example 7. Paper 1, "find, hence". Let f(x)=2x2−12x+5. Find f′(x) from first principles, and hence find the coordinates of the point where the tangent is horizontal.
The power rule, proved. The same argument works for xn with any positive integer n.
(x+h)n=xn+nxn−1h+(2n)xn−2h2+⋯+hnh(x+h)n−xn=nxn−1+(2n)xn−2h+⋯+hn−1every term after the first contains h, so as h→0:dxd(xn)=nxn−1
The same working on a general quadratic ax2+bx+c gives 2ax+b. The h-terms are 2axh+ah2+bh, and dividing by h leaves 2ax+ah+b.
The guide limits first-principles questions to polynomials. You will not be asked to do sinx or ex this way.
6Higher derivatives
f′(x) is itself a function, so it can be differentiated again. That gives the second derivative, then the third, fourth and beyond. You need two notations.
Derivative
Function notation
Leibniz notation
first
f′(x)
dxdy
second
f′′(x)
dx2d2y
third
f′′′(x)
dx3d3y
nth
f(n)(x)
dxndny
In f(n)(x) the brackets round n are essential. f(3)(x) is the third derivative. f3(x) would mean f(x) cubed.
In dx2d2y the 2 sits on the d on top and on the x underneath. 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)=x3−3x and its first three derivatives: a cubic, a parabola, a line and a constant.
Figure 7 · Each derivative is the gradient function of the one before
Other functions never run out. They produce patterns.
y=e−2x:−2e−2x,4e−2x,−8e−2x,…⇒dxndny=(−2)ne−2xy=cos3x:−3sin3x,−9cos3x,27sin3x,81cos3x,…back to cos3x times 81 after foury=x6:6x5,30x4,120x3,360x2,720x,720,0f(7)(x)=0
dxndn(xk)=k(k−1)⋯(k−n+1)xk−n=(k−n)!k!xk−n,n≤kfor n>k the result is 0dxndn(eax)=aneaxdxndn(sinx)=sin(x+2nπ)each derivative shifts the graph left by 2π
sinx and cosx repeat every four derivatives, so divide n by 4 and use the remainder. With a constant inside, each derivative also collects a factor: dxndnsin2x=2nsin(2x+2nπ).
For n=10, sin(2x+5π)=−sin2x, so f(10)(x)=−1024sin2x.
If you are given dxdy as a function of y, differentiate again with the chain rule. Then substitute dxdy.
Worked example 8. Given that dxdy=3y−y2, find dx2d2y and dx3d3y in terms of y.
dx2d2y=(3−2y)dxdy=(3−2y)(3y−y2)=2y3−9y2+9ychain rule: differentiate in y, multiply by dxdydx3d3y=(6y2−18y+9)dxdy=(6y2−18y+9)(3y−y2)=−6y4+36y3−63y2+27ydifferentiate 2y3−9y2+9y with respect to x: the chain rule leaves a factor dxdy
Spotting the pattern is not proving it. A pattern for f(n)(x) that holds for n=1,2,3 might fail at n=50. The guide links this to proof by induction (AHL 1.15): find the first few derivatives, conjecture the nth, then prove it.
Worked example 9. Paper 1, Section B. Let f(x)=lnx for x>0. Find f′(x), f′′(x), f′′′(x), conjecture a formula for f(n)(x), and prove it by induction for all n∈Z+.
f′(x)=x−1,f′′(x)=−x−2,f′′′(x)=2x−3,f(4)(x)=−6x−4signs alternate; the numbers are 1,1,2,6conjecture: f(n)(x)=(−1)n−1(n−1)!x−nn=1: (−1)00!x−1=x−1=f′(x)true for n=1assume true for n=k: f(k)(x)=(−1)k−1(k−1)!x−kf(k+1)(x)=(−1)k−1(k−1)!⋅(−k)x−k−1=(−1)kk!x−(k+1)differentiate the assumed formthe statement for n=k+1
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∈Z+ by mathematical induction.
Higher derivatives also give concavity (SL 5.7), acceleration (SL 5.9) and, at 0, Maclaurin series (AHL 5.19).
Practice questions
1 questions on this note, from easy to hard. Each one you get right lights a star of this topic's constellation.
Practice · 5.12 Continuity, differentiability and first principles