← All notesMaths AA · Differentiation⬇ Download PDF
IB DP Maths AA · Topic 5 Calculus · SL 5.1–5.8 · AHL 5.12–5.15 · ~20 min read

Differentiation

What a derivative really is, every rule you need (power, chain, product, quotient), tangents and normals, stationary points, concavity, optimisation, and the HL extras: first principles, implicit differentiation, related rates and l'Hôpital's rule.

First principlesChain, product & quotient rulesTangents & normalsStationary points & inflectionOptimisationImplicit differentiationRelated ratesL'Hôpital's rule
RSby Riyaz Sir
mentorriyaz.in
No tag = SL and HLHL ONLY HL students onlyFORMULA BOOKLET given in the examM1A1 how marks are awardedhighlight = comes up again and againTest yourself at the end

In 30 seconds

  • The derivative f′(x) gives the gradient of the curve and the rate of change of y with respect to x. It is the limit of chord gradients as the chord shrinks to a point.
  • Four rules do almost everything: the power rule (rewrite roots and fractions as powers first), the chain rule for a function inside a function, the product rule and the quotient rule. All four are in the formula booklet.
  • f′ = 0 finds stationary points, the sign of f″ classifies them, and f″ = 0 with a change of sign finds points of inflection. Optimisation is the same idea applied to a real quantity.
  • HL: first principles, continuity and differentiability, implicit differentiation, related rates, l'Hôpital's rule and the derivatives of tan, sec, ax, loga x and the inverse trig functions.
  • 2029 syllabus: nothing in this topic changes. These notes work for exams up to November 2028 and from May 2029.

By the end you can

  • Explain the derivative as a gradient and as a rate of change, with correct notation.
  • Differentiate powers, sin, cos, ex, ln x and combinations using the chain, product and quotient rules.
  • Find equations of tangents and normals, with and without a GDC.
  • Find and classify stationary points, and find points of inflection.
  • Link the graphs of f, f′ and f″, and solve optimisation problems with full justification.
  • Differentiate from first principles and decide whether a function is differentiable. HL
  • Differentiate implicitly, solve related-rates problems and evaluate limits with l'Hôpital's rule. HL

1What the derivative means

Gradient of a curve, rate of change

xy12312345670P(1, 1)Q(1 + h, (1 + h)²)h(1 + h)² − 1y = x²chord PQtangent at Pgradient of chord PQ= ((1 + h)² − 1) ÷ h= 2 + h → 2 as h → 0so f′(1) = 2
Slide Q towards P. The chord gradients 2 + h close in on 2, the gradient of the tangent at P. That limit is the derivative.

Derivative — the gradient of the tangent to y = f(x) at a point, which is also the instantaneous rate of change of y with respect to x.

Notation — dy/dx (Leibniz) and f′(x) (Lagrange) mean the same thing. The second derivative is d2y/dx2 or f″(x).

  • Units tell the story: if V is in cm3 and t in seconds, dV/dt is in cm3 s−1. A question that says "rate of change" is asking for a derivative.
  • Sign matters: dy/dx > 0 means y increases as x increases; dy/dx < 0 means it decreases.
Syllabus noteDifferentiation is unchanged for the new syllabus (first exams May 2029). The content removed from AA is financial applications and bivariate statistics, plus Euler's method and proof by counterexample at HL. None of it is in this note.

Differentiation from first principlesHL ONLY

f′(x) = limh→0 f(x + h) − f(x)h FORMULA BOOKLET
the formula is given; the algebra is up to you
  • Method: (1) write f(x + h) and expand it; (2) subtract f(x), so every term left has a factor h; (3) divide by h; (4) only now let h → 0.
Worked example

Differentiate f(x) = x3 from first principles.

  1. f′(x) = limh→0 (x + h)3 − x3h M1
  2. = limh→0 x3 + 3x2h + 3xh2 + h3 − x3h A1
  3. = limh→0 (3x2 + 3xh + h2) A1
  4. = 3x2 AG
Common mistakeWriting "= 3x2 + 3xh + h2 = 3x2" without "limh→0" on every line. Examiners want the limit written until the last step, when h actually goes to 0.

Continuity, differentiability, higher derivativesHL ONLY

xy-2-112120xy-2-112120y = |x|: continuous at 0,but NOT differentiable (corner)a jump at x = 1:not continuous, so not differentiableDifferentiable ⇒ continuous. The reverse is false.
A function must be continuous to be differentiable, but continuity is not enough: |x| has no single tangent at its corner.

Continuous at x = a — limx→a f(x) exists and equals f(a): no jump, gap or asymptote there.

Differentiable at x = a — the left-hand and right-hand limits of the chord gradient exist and are equal. Graphically: one smooth tangent.

  • Higher derivatives: f(n)(x) or dny/dxn means differentiate n times. A pattern in f′, f″, f‴ often leads to a proof by induction (Topic 1).
Worked example

Find a formula for the nth derivative of y = e2x.

  1. dy/dx = 2e2x, d2y/dx2 = 4e2x, d3y/dx3 = 8e2x M1
  2. each derivative multiplies by 2
  3. dny/dxn = 2ne2x A1

2Differentiation rules

Powers of x

y = xn ⇒ dy/dx = nxn−1 FORMULA BOOKLET
n can be negative or a fraction
  • Rewrite first, then differentiate. √x = x½, 1/x3 = x−3, 5/(2√x) = (5/2)x−½. Split a fraction over a single term: (x2 + 1)/x = x + x−1.
  • Constants: the derivative of a constant is 0, and a constant multiplier stays: d/dx (7x4) = 28x3.
Worked example

Differentiate y = 3x2 − 4√x.

  1. rewrite: y = 3x3/2 − 4x−1/2 M1
  2. dy/dx = 92x1/2 + 2x−3/2 A1A1
  3. = 9√x2 + 2x√x
Common mistakeDifferentiating the top and bottom of a fraction separately. That is never a rule. Either rewrite as powers or use the quotient rule.

Standard derivatives FORMULA BOOKLET

f(x)f′(x)note
xnnxn−1any rational n at SL
sin xcos xx in radians
cos x−sin xnote the minus sign
exexits own derivative
ln x1/xx > 0
  • Linear inside: d/dx f(ax + b) = a f′(ax + b). So d/dx sin(3x) = 3cos(3x), d/dx e5x − 1 = 5e5x − 1 and d/dx ln(2x) = 2/(2x) = 1/x.
Common mistakeUsing degrees. Every calculus result for sin and cos assumes radians. Set your GDC to radian mode before Paper 2.

Choosing the rule

What does y look like?a sum of powerse.g. 3x⁴ − 2√x + 5/xrewrite as powers,then the power rulef(x) × g(x)e.g. x² sin xproduct ruleu′v + uv′f(x) ÷ g(x)e.g. eˣ / (x + 1)quotient rule(vu′ − uv′) / v²f(g(x))e.g. (3x − 1)⁵, e^(x²)chain rulef′(g(x)) × g′(x)Mixed? Work from the outside in. y = x² e^(3x) is a product,and the second factor needs the chain rule inside it.
Ask what the last operation is if you were evaluating y. That operation decides the rule.

Chain rule

y = g(u), u = f(x) ⇒ dy/dx = dy/du × du/dx FORMULA BOOKLET
differentiate the outside, keep the inside, multiply by the derivative of the inside
Worked example

Differentiate y = (2x3 − 5)4.

  1. let u = 2x3 − 5, so y = u4 M1
  2. dy/du = 4u3 and du/dx = 6x2
  3. dy/dx = 4(2x3 − 5)3 × 6x2 A1
  4. = 24x2(2x3 − 5)3
Worked example

Differentiate y = esin x and y = ln(3x2 + 1).

  1. esin x: outside eu, inside sin x
  2. dy/dx = cos x · esin x A1
  3. ln(u): derivative is u′/u
  4. dy/dx = 6x3x2 + 1 A1
Memory trickln shortcut: d/dx ln(f(x)) = f′(x)/f(x). It turns up again in integration, in reverse.

Product rule

y = uv ⇒ dy/dx = udvdx + vdudx FORMULA BOOKLET
two factors that both contain x
Worked example

Differentiate y = x2e3x.

  1. u = x2, v = e3x; u′ = 2x, v′ = 3e3x M1
  2. dy/dx = x2 · 3e3x + e3x · 2x A1
  3. = xe3x(3x + 2), factorised
Exam tipFactorise your answer. The next part of the question usually asks where dy/dx = 0, and a factorised derivative solves itself: e3x > 0, so x = 0 or x = −2/3.

Quotient rule

y = uv ⇒ dy/dx = v(du/dx) − u(dv/dx)v2 FORMULA BOOKLET
the order on the top matters
Worked example

Find the coordinates of the stationary point of y = ln xx, x > 0.

  1. u = ln x, v = x; u′ = 1/x, v′ = 1 M1
  2. dy/dx = x · (1/x) − ln x · 1x2 = 1 − ln xx2 A1
  3. dy/dx = 0 ⇒ ln x = 1 ⇒ x = e M1
  4. y = 1/e, so the point is (e, 1/e) A1
Memory trick"Bottom times derivative of top, minus top times derivative of bottom, all over bottom squared." The bottom goes first.

More standard derivativesHL ONLY

f(x)f′(x)
tan xsec2 x
sec xsec x tan x
cosec x−cosec x cot x
cot x−cosec2 x
axax ln a
loga x1/(x ln a)
arcsin x1/√(1 − x2)
arccos x−1/√(1 − x2)
arctan x1/(1 + x2)
  • All of these are in the formula booklet FORMULA BOOKLET, but you can be asked to prove one. tan x = sin x/cos x by the quotient rule gives (cos2 x + sin2 x)/cos2 x = 1/cos2 x = sec2 x.
Worked example

Differentiate y = arctan(2x) and y = 3x^{2}.

  1. arctan(u) with u = 2x: dy/dx = 11 + (2x)2 × 2 = 21 + 4x2 A1
  2. au with u = x2: dy/dx = 3x^{2} ln 3 × 2x = 2x ln 3 · 3x^{2} A1

3Tangents and normals

xy123451234560(2, 2)y = ¼x² + 1tangentnormalf′(x) = x/2, so at x = 2:tangent gradient m = 1normal gradient = −1/m = −1tangent: y = xnormal: y = −x + 4
The normal is perpendicular to the tangent, so the two gradients multiply to −1.
  • Method: (1) find the point (a, f(a)); (2) find the gradient m = f′(a); (3) tangent: y − f(a) = m(x − a); (4) normal: gradient −1/m, same point.
Worked example

Find the equation of the normal to y = x3 − 2x at x = 1.

  1. point: y = 1 − 2 = −1, so (1, −1) A1
  2. dy/dx = 3x2 − 2, at x = 1 it is 1 M1A1
  3. normal gradient = −1 M1
  4. y + 1 = −(x − 1), so y = −x A1
GDC (calculator) methodPaper 2: find f′(a) with the numerical derivative (nDeriv or dy/dx on the graph screen of a TI-84; the d/dx template on TI-Nspire and Casio). Write "f′(2) = 3.41..." in your working, then the equation. A bare final answer can lose the method mark.
Exam tipGive the equation in the form asked. "In the form ax + by + d = 0 where a, b, d ∈ ℤ" means clear the fractions: y = −¾x + 6 becomes 3x + 4y − 24 = 0.

4Stationary points and the shape of a graph

Increasing and decreasing

  • f′(x) > 0 on an interval: f is increasing there. f′(x) < 0: decreasing. Answer with an interval, such as 1 < x < 3.
Worked example

Find where f(x) = x3 − 6x2 + 9x + 1 is decreasing.

  1. f′(x) = 3x2 − 12x + 9 = 3(x − 1)(x − 3) M1
  2. f′(x) < 0 between the roots R1
  3. 1 < x < 3 A1

Concavity and the second derivative

concave up: f″(x) > 0gradient increasing"holds water"concave down: f″(x) < 0gradient decreasing"spills water"
f″ is the rate of change of the gradient. Positive f″ means the gradient is increasing, so the curve bends upwards.

Classifying stationary points

local maximumf′: + 0 −f″(x) < 0(usually)local minimumf′: − 0 +f″(x) > 0(usually)stationary inflectionf′: + 0 +gradient 0 butno turningnon-stationaryf″ changes signf′ ≠ 0 there(e.g. y = sin x at 0)Stationary point: f′(x) = 0. Point of inflection: f″(x) = 0 AND f″ changes sign.f″ = 0 alone is not enough: for y = x⁴, f″(0) = 0 but (0, 0) is a minimum.
Four shapes to recognise. The sign of f′ either side settles every case, even when f″ = 0.
  • Second derivative test: at a stationary point, f″(a) < 0 ⇒ local maximum; f″(a) > 0 ⇒ local minimum; f″(a) = 0 ⇒ the test fails, so check the sign of f′ either side.
Worked example

Find and classify the stationary points of f(x) = x4 − 4x3, and find any points of inflection.

  1. f′(x) = 4x3 − 12x2 = 4x2(x − 3) = 0 ⇒ x = 0 or x = 3 M1A1
  2. f″(x) = 12x2 − 24x = 12x(x − 2) A1
  3. x = 3: f″(3) = 36 > 0, so (3, −27) is a minimum R1
  4. x = 0: f″(0) = 0, so test the sign of f′: negative just left and just right of 0 M1
  5. so (0, 0) is a stationary point of inflection A1
  6. f″ = 0 at x = 2 and changes sign there, so (2, −16) is a non-stationary point of inflection A1
Common mistakeSaying "f″(0) = 0, so it is a point of inflection". f″ = 0 is necessary but not sufficient: y = x4 has f″(0) = 0 at a minimum. Always check that f″ changes sign.

Graphs of f, f′ and f″

xfxf′xf″f(x) = x³ − 3xmax at x = −1min at x = 1f′(x) = 3x² − 3f′ = 0 at x = ±1(stationary points)f″(x) = 6xf″ = 0 at x = 0(point of inflection)maxmininflectionRead down a column: where f has a turning point, f′ crosses 0;where f changes the way it bends, f″ crosses 0.
The same three x-values line up in all three graphs.
On the graph of fOn the graph of f′
local maximumcrosses the x-axis from + to −
local minimumcrosses the x-axis from − to +
increasingabove the x-axis
point of inflectiona turning point
stationary inflectiontouches the x-axis without crossing
Exam tipPaper 1 loves "here is the graph of f′; sketch f" (or the reverse). Mark the x-intercepts of f′ first: they are the x-coordinates of the turning points of f.

5Optimisation

xx30 cmfold upthe sidesxV12345675001000150020000max at x = 5, V = 2000 cm³V(x) = x(30 − 2x)², 0 < x < 15
Squares of side x are cut from the corners of a 30 cm sheet and the sides folded up. Which x gives the biggest box?
  • Method: (1) name the variable and write the quantity to optimise; (2) use the constraint to get one variable; (3) state the domain; (4) solve dQ/dx = 0; (5) justify max or min; (6) answer in context, with units.
Worked example

Find the maximum volume of the open box.

  1. V = x(30 − 2x)2 = 4x3 − 120x2 + 900x, for 0 < x < 15 M1A1
  2. dV/dx = 12x2 − 240x + 900 = 12(x − 5)(x − 15) = 0 M1
  3. x = 15 gives no box, so x = 5 R1
  4. d2V/dx2 = 24x − 240 = −120 < 0 at x = 5, so a maximum R1
  5. V = 5 × 202 = 2000 cm3 A1
Worked example

A closed cylinder holds 500 cm3. Find the radius that uses the least metal.

  1. πr2h = 500, so h = 500/(πr2) M1
  2. A = 2πr2 + 2πrh = 2πr2 + 1000/r A1
  3. dA/dr = 4πr − 1000/r2 = 0 ⇒ r3 = 250/π M1
  4. r = 4.30 cm (3 s.f.), and then h = 8.60 cm = 2r A1
  5. d2A/dr2 = 4π + 2000/r3 > 0, so a minimum R1
Common mistakeStopping at "x = 5". The question asked for the maximum volume, and you must justify that it is a maximum. With a closed interval, also compare the endpoints: the largest value can sit at an end.
GDC (calculator) methodOn Paper 2, graph the function and use the maximum or minimum tool to check your answer. Still write the derivative equation you are solving.

6Implicit differentiation and related rates HL

Implicit differentiationHL ONLY

xy(3, 4)x² + y² = 25differentiate every term in x:2x + 2y dy/dx = 0dy/dx = −x/yat (3, 4): dy/dx = −3/4tangent: y − 4 = −¾(x − 3)check: the radius hasgradient 4/3, and4/3 × (−3/4) = −1 ✓
You do not need to make y the subject. Differentiate both sides with respect to x.
d/dx (yn) = nyn−1 dydx
it is the chain rule, because y depends on x
  • Products: d/dx (xy) = xdydx + y. Then collect the dy/dx terms on one side and factorise.
Worked example

Find the gradient of x2 + xy + y2 = 7 at (1, 2).

  1. 2x + (xdydx + y) + 2ydydx = 0 M1A1
  2. dydx(x + 2y) = −(2x + y) M1
  3. dydx = −2x + yx + 2y = −45 at (1, 2) A1
Worked example

Show that d/dx (arcsin x) = 1√(1 − x2).

  1. y = arcsin x, so sin y = x M1
  2. cos y dydx = 1, so dydx = 1cos y A1
  3. cos y = √(1 − sin2 y) = √(1 − x2), positive because −π/2 ≤ y ≤ π/2 R1
  4. dydx = 1√(1 − x2) AG

Related rates of changeHL ONLY

rh5 cm10 cmwater pours in at 3 cm³ s⁻¹similar triangles: r/h = 5/10so r = h/2V = ⅓πr²h = πh³/12dV/dh = πh²/4dV/dt = dV/dh × dh/dt3 = (π × 4²/4) × dh/dt at h = 4dh/dt = 3/(4π) ≈ 0.239 cm s⁻¹
The volume grows at a steady rate, but the water level rises more slowly as the cone gets wider.
  • Method: (1) write an equation linking the variables; (2) differentiate it with respect to t; (3) substitute the numbers last.
Worked example

A 5 m ladder leans on a wall. Its foot slides away at 0.4 m s−1. How fast is the top sliding down when the foot is 3 m from the wall?

  1. x2 + y2 = 25 M1
  2. 2x dxdt + 2y dydt = 0 M1A1
  3. when x = 3, y = 4: 2(3)(0.4) + 2(4)dydt = 0 M1
  4. dydt = −0.3, so the top slides down at 0.3 m s−1 A1
Common mistakeSubstituting x = 3 before differentiating. Then x is a constant, its derivative is 0, and the rate disappears from the equation.

7Limits and l'Hôpital's rule HL

if lim f(x)g(x) gives 00 or ∞∞, then lim f(x)g(x) = lim f′(x)g′(x) LEARN IT
repeat while the limit is still indeterminate
  • Differentiate the top and the bottom separately. This is not the quotient rule.
Worked example

Evaluate limx→0 1 − cos xx2.

  1. substituting gives 0/0 R1
  2. = limx→0 sin x2x, still 0/0 M1
  3. = limx→0 cos x2 M1
  4. = 12 A1
Worked example

Evaluate limx→∞ x2ex.

  1. ∞/∞, so l'Hôpital: lim 2xex M1
  2. still ∞/∞: lim 2ex M1
  3. = 0, so ex grows faster than any power A1
Common mistakeUsing l'Hôpital when the limit is not 0/0 or ∞/∞. limx→0 (x + 1)/(x + 2) is simply 1/2 by substitution; differentiating would give 1, which is wrong.
  • Maclaurin series give another route to the same limits. They have their own HL note.

8Exam technique

Paper 1, Paper 2 and command terms

  • Paper 1 (no calculator): exact answers such as 1/e, ln 3 or π/6. Factorise derivatives so f′ = 0 solves by hand.
  • Paper 2 (calculator): use the GDC to evaluate f′(a), find roots of f′(x) = 0 and find maxima, but write the equation you solved. "Correct answer, no working" earns little if the answer is wrong.
  • "Show that": every step on the page, ending exactly at the given result. Marked AG: no marks for the final line itself.
  • "Hence": use the result you just found. Starting again from scratch can score zero.
  • "Justify": a reason earns the R1 mark, for example "f″(5) = −120 < 0, so it is a maximum" or "f′ changes from positive to negative".
Linking questionVelocity is the derivative of displacement and acceleration is the derivative of velocity. The same calculus drives IB Physics A.1 Kinematics, and the integration note runs it in reverse.
Idea for your IA / explorationOptimisation makes a strong exploration: is a 330 ml drinks can the shape that uses the least aluminium? Measure a real can, model its surface area, compare with the optimum h = 2r, and explain the difference (rims, strength, stacking).

Test yourself — cover the answers first

Quick check

  1. Differentiate y = 4x3 − 2x.
  2. Find f′(4) for f(x) = √x.
  3. Differentiate sin(3x) and e−2x.
  4. Differentiate y = xex.
  5. Differentiate y = ln(x2 + 1).
  6. The tangent at P has gradient −2/3. What is the gradient of the normal?
  7. If f″(a) = 0, must x = a be a point of inflection?
  8. HL Differentiate tan(2x).
  9. HL Find the gradient of y = arctan x at x = 1.

Exam-style

  1. A farmer fences three sides of a rectangle with 120 m of fence; a river forms the fourth side. Find the maximum area.
  2. Let f(x) = xe−x. (a) Find f′(x). (b) Find the coordinates of the maximum and justify it. (c) Find the point of inflection.
  3. HL Find the equation of the tangent to x3 + y3 = 9xy at (2, 4).
  4. HL Evaluate limx→0 ex − 1 − xx2.
  5. HL Air is pumped into a spherical balloon at 100 cm3 s−1. How fast is the radius increasing when r = 5 cm?
Show answers
  1. 12x2 + 2x2
  2. f′(x) = 12√x, so f′(4) = 14
  3. 3cos(3x) and −2e−2x
  4. ex(x + 1), by the product rule
  5. 2xx2 + 1
  6. 32
  7. No. f″ must also change sign (y = x4 has a minimum at 0).
  8. 2sec2(2x)
  9. 11 + 1 = 12
  10. two sides x and one side 120 − 2x, so A = x(120 − 2x)
    A′(x) = 120 − 4x = 0 ⇒ x = 30
    A″ = −4 < 0, so a maximum
    maximum area = 30 × 60 = 1800 m2
  11. (a) f′(x) = e−x(1 − x)
    (b) f′ = 0 ⇒ x = 1; f″(x) = e−x(x − 2), f″(1) = −1/e < 0, so a maximum at (1, 1/e)
    (c) f″ = 0 at x = 2 and changes sign there: (2, 2/e2)
  12. 3x2 + 3y2 y′ = 9y + 9xy′
    y′ = (9y − 3x2)/(3y2 − 9x) = 24/30 = 4/5
    y − 4 = 45(x − 2), that is 4x − 5y + 12 = 0
  13. 0/0: lim (ex − 1)/(2x), still 0/0
    lim ex/2 = 12
  14. V = 43πr3, so dV/dt = 4πr2 dr/dt
    100 = 4π(25) dr/dt
    dr/dt = 1π ≈ 0.318 cm s−1
Stuck on a question?

Send it to me on WhatsApp. I read every message.

Want regular help? Send this to your parent →
Share with a friendAsk Riyaz Sir

Independent notes written by Riyaz Sir. Not produced, endorsed or approved by the International Baccalaureate Organization. Syllabus codes refer to the IB DP subject guides.