Skip to content

5 · Calculus

IB Mathematics: Analysis and Approaches SLTopic 5

Video lesson for this topic Open the video page
2:10

Calculus

These are selected topics, not the whole syllabus, and every example is fictional. The derivative is the gradient at a point; stationary points have gradient…

English narration · English + 中文 subtitles burned in

5.1

Scope and prerequisites

This handout teaches topic 5, Calculus, of Mathematics: Analysis and Approaches, the course first assessed in 2021: the derivative as a gradient and a rate of change, the rules of differentiation, stationary points and optimisation, kinematics, integration and areas, and, for HL, limits and first principles, implicit differentiation and related rates, further integration techniques, volumes of revolution, differential equations and Maclaurin series.

Prerequisites: functions and their graphs, exponentials and logarithms (topic 2), and trigonometric functions in radians (topic 3). In calculus, angles are always in radians.

5.2

Gradients and derivatives

From average to instant

A car's trip computer shows 72 km/h as the average speed of a 36 km journey that took 30 minutes. The speedometer shows something different: the speed at this instant. An average speed is the gradient of a chord on a distance-time graph; an instantaneous speed is the gradient of the tangent. Calculus is the mathematics of getting from the first to the second by making the time interval smaller and smaller.

Secants and the tangent

The gradient of a chord, or secant 割线, between $P(x, f(x))$ and a nearby point $Q(x + h, f(x + h))$ is

$$\frac{f(x + h) - f(x)}{h}$$

As $Q$ moves towards $P$, $h \to 0$ and the secant approaches the tangent 切线 at $P$. The limit of the secant gradients is the derivative 导数 $f'(x)$, also written $\dfrac{dy}{dx}$.

Secants from P(1, 1) on y = x² to points at x = 3, 2 and 1.5 have gradients 4, 3 and 2.5; the tangent at P has gradient 2
Secant gradients approach the tangent gradient

For $y = x^2$ at $x = 1$ the secant gradients are $4$, $3$, $2.5$, $2.1$, $2.01$, … as $Q$ comes closer, so the derivative at $x = 1$ is $2$.

The derivative has two meanings:

  • the gradient of the curve $y = f(x)$ at a point;
  • the rate of change of $y$ with respect to $x$: if $V$ is a volume in litres and $t$ is time in seconds, $\dfrac{dV}{dt}$ is in litres per second.

The power rule

For any real $n$, the derivative of $x^n$ is $nx^{n-1}$. Constants multiply through and terms are differentiated one by one:

$$\frac{d}{dx}(ax^n) = anx^{n-1} \qquad \frac{d}{dx}(c) = 0$$

Worked example. $y = 4x^3 - 5x + \dfrac{2}{x} + 7$. Write $\dfrac{2}{x} = 2x^{-1}$. Then

$$\frac{dy}{dx} = 12x^2 - 5 - 2x^{-2} = 12x^2 - 5 - \frac{2}{x^2}$$

Increasing and decreasing

$f$ is increasing where $f'(x) > 0$ and decreasing where $f'(x) < 0$. For $f(x) = x^3 - 3x$, $f'(x) = 3x^2 - 3 = 3(x - 1)(x + 1)$, which is negative for $-1 < x < 1$, so $f$ is decreasing there and increasing for $x < -1$ and $x > 1$.

Tangents and normals

At $x = a$, the tangent has gradient $m = f'(a)$ and passes through $(a, f(a))$. The normal 法线 is perpendicular to the tangent, with gradient $-\dfrac{1}{m}$ when $m \ne 0$. If the tangent is horizontal, the normal is the vertical line $x=a$.

The curve y = x² with its tangent y = 4x − 4 touching at (2, 4)
The tangent to y = x² at (2, 4)

Worked example. For $y = x^2$ at $x = 2$: $y = 4$ and $\dfrac{dy}{dx} = 2x = 4$.

  • Tangent: $y - 4 = 4(x - 2)$, so $y = 4x - 4$.
  • Normal: gradient $-\frac{1}{4}$, so $y - 4 = -\frac{1}{4}(x - 2)$, or $x + 4y - 18 = 0$.
Vocabulary Train
English
secant/ˈsiːkənt/
tangent/ˈtændʒənt/
derivative/dɪˈrɪvətɪv/
normal/ˈnɔːml/
5.3

Rules of differentiation

Standard derivatives

$f(x)$ $f'(x)$
$x^n$ $nx^{n-1}$
$\sin x$ $\cos x$
$\cos x$ $-\sin x$
$e^x$ $e^x$
$\ln x$ $\dfrac{1}{x}$

Chain, product and quotient rules

The chain rule 链式法则 differentiates a composite function: if $y = f(u)$ and $u = g(x)$,

The function 3x squared plus 1 to the 5 as an outer u to the 5 around an inner u equals 3x squared plus 1: 5u to the 4 times 6x
Outside, then inside
$$\frac{dy}{dx} = \frac{dy}{du} \times \frac{du}{dx}$$

Differentiate the outside, keep the inside, then multiply by the derivative of the inside.

The product rule 乘积法则 and quotient rule 商法则, for $u$ and $v$ functions of $x$:

$$\frac{d}{dx}(uv) = u\frac{dv}{dx} + v\frac{du}{dx} \qquad \frac{d}{dx}\left(\frac{u}{v}\right) = \frac{v\dfrac{du}{dx} - u\dfrac{dv}{dx}}{v^2}$$

Worked examples.

  • Chain: $\dfrac{d}{dx}(3x^2 + 1)^5 = 5(3x^2 + 1)^4 \times 6x = 30x(3x^2 + 1)^4$.
  • Chain: $\dfrac{d}{dx}e^{\sin x} = \cos x\, e^{\sin x}$, and $\dfrac{d}{dx}\ln(x^2 + 4) = \dfrac{2x}{x^2 + 4}$.
  • Product: $\dfrac{d}{dx}(x^2e^{3x}) = x^2 \times 3e^{3x} + e^{3x} \times 2x = xe^{3x}(3x + 2)$.
  • Quotient: $\dfrac{d}{dx}\left(\dfrac{\ln x}{x}\right) = \dfrac{x \times \frac{1}{x} - \ln x \times 1}{x^2} = \dfrac{1 - \ln x}{x^2}$.

The second derivative

Differentiating again gives the second derivative 二阶导数 $f''(x)$ or $\dfrac{d^2y}{dx^2}$: the rate of change of the gradient. Where $f''(x) > 0$ the graph is concave up (the gradient is increasing); where $f''(x) < 0$ it is concave down.

Vocabulary Train
English
chain rule/tʃeɪn ruːl/
product rule/ˈprɒdʌkt ruːl/
quotient rule/ˈkwəʊʃənt ruːl/
second derivative/ˈsekənd dɪˈrɪvətɪv/
5.4

Stationary points and optimisation

Finding and classifying stationary points

A stationary point 驻点 is where $f'(x) = 0$: the tangent is horizontal. It can be a local maximum, a local minimum or a stationary point of inflection.

Fenced enclosures: optimization finds the dimensions that maximise area for a fixed fence length
Fenced enclosures: optimization finds the dimensions that maximise area for a fixed fence length
The curve y = x³ − 3x with its maximum at (−1, 2) and minimum at (1, −2) marked
Stationary points of y = x³ − 3x

Worked example. $f(x) = x^3 - 3x$.

  • $f'(x) = 3x^2 - 3 = 0$ gives $x = \pm 1$. The points are $(-1, 2)$ and $(1, -2)$.
  • $f''(x) = 6x$. At $x = -1$, $f'' = -6 < 0$: a local maximum. At $x = 1$, $f'' = 6 > 0$: a local minimum.
  • If $f'' = 0$ the test fails; check the sign of $f'$ on each side instead.

A point of inflection 拐点 is where the concavity changes: $f''(x) = 0$ and $f''$ changes sign. For $x^3 - 3x$, $f''(x) = 6x$ changes sign at $x = 0$, so $(0, 0)$ is a point of inflection (not stationary, since $f'(0) = -3$). For $y = x^4$, $f''(0) = 0$ but $f''$ does not change sign, so the origin is a minimum, not an inflection.

Optimisation

To find the largest or smallest value of a quantity: write it as a function of one variable, differentiate, set the derivative to zero, solve, and check it is a maximum or minimum. Also check the ends of the allowed domain.

A 12 cm square sheet with squares of side x cut from each corner, leaving a base of side 12 − 2x; the graph of V = x(12 − 2x)² on 0 < x < 6 peaks at x = 2 with V = 128 cubic centimetres
Write V in one variable, then the derivative finds the maximum: x = 2 gives 128 cm³

Worked example. Equal squares of side $x$ cm are cut from the corners of a 12 cm by 12 cm sheet, and the sides are folded up to make an open box. Find the largest volume.

  • $V = x(12 - 2x)^2 = 4x^3 - 48x^2 + 144x$, with $0 < x < 6$.
  • $\dfrac{dV}{dx} = 12x^2 - 96x + 144 = 12(x - 2)(x - 6) = 0$, so $x = 2$ (since $x = 6$ is outside the domain).
  • $\dfrac{d^2V}{dx^2} = 24x - 96 = -48 < 0$ at $x = 2$: a maximum.
  • $V = 2 \times 8^2 = 128$ cm³.
Vocabulary Train
English
stationary point/ˈsteɪʃənəri pɔɪnt/
point of inflection/pɔɪnt ɒv ɪnˈflekʃn/
5.5

Kinematics

Displacement, velocity and acceleration

For a particle moving in a straight line, with displacement 位移 $s$ from a fixed point at time $t$:

A roller coaster car on a looping track
A roller coaster is calculus you can feel: velocity is the derivative of position, and acceleration is the derivative of velocity
$$v = \frac{ds}{dt} \qquad a = \frac{dv}{dt} = \frac{d^2s}{dt^2} \qquad s = \int v\, dt$$

The velocity 速度 $v$ has a sign that shows direction; speed is $|v|$. The particle is at rest when $v = 0$ and changes direction where $v$ changes sign. It is speeding up when $v$ and $a$ have the same sign.

Velocity-time graph v = t² − 4t + 3 for 0 to 4 s; the areas above, below and above the axis are +4/3, −4/3 and +4/3
Signed areas give displacement; total area gives distance

Worked example. $v = t^2 - 4t + 3$ m/s for $0 \le t \le 4$.

  • $v = (t - 1)(t - 3) = 0$ at $t = 1$ and $t = 3$: the particle changes direction twice.
  • $a = 2t - 4$; at $t = 0$, $a = -4$ m/s².
  • Displacement from $t = 0$ to $4$: $\displaystyle\int_0^4 (t^2 - 4t + 3)\,dt = \left[\frac{t^3}{3} - 2t^2 + 3t\right]_0^4 = \frac{4}{3}$ m.
  • Distance travelled: $\displaystyle\int_0^4 |v|\,dt = \frac{4}{3} + \frac{4}{3} + \frac{4}{3} = 4$ m.

Displacement and distance differ whenever the particle turns back.

Vocabulary Train
English
displacement/dɪˈspleɪsmənt/
velocity/vəˈlɒsɪti/
5.6

Integration

Antiderivatives

Integration 积分 reverses differentiation. The indefinite integral 不定积分 includes a constant $C$, because constants differentiate to zero:

A water tank: integration accumulates change — total volume from a rate of flow
A water tank: integration accumulates change — total volume from a rate of flow
The family x squared plus C for C from minus 3 to 3, each with the same gradient 2 at x equals 1
Why an antiderivative needs + C
$f(x)$ $\displaystyle\int f(x)\,dx$
$x^n$, $n \ne -1$ $\dfrac{x^{n+1}}{n + 1} + C$
$\dfrac{1}{x}$ $\ln\lvert x\rvert + C$
$e^{x}$ $e^{x} + C$
$\sin x$ $-\cos x + C$
$\cos x$ $\sin x + C$

For a linear inside, $\displaystyle\int f(ax + b)\,dx = \frac{1}{a}F(ax + b) + C$, such as $\displaystyle\int e^{2x}\,dx = \frac{1}{2}e^{2x} + C$.

Worked example. $\displaystyle\int\left(6x^2 - \frac{4}{x} + e^{2x}\right)dx = 2x^3 - 4\ln\lvert x\rvert + \frac{1}{2}e^{2x} + C$.

A boundary condition fixes $C$: if $\dfrac{dy}{dx} = 6x^2$ and the curve passes through $(1, 5)$, then $y = 2x^3 + C$ and $5 = 2 + C$, so $y = 2x^3 + 3$.

Integration by inspection

When the integrand is a function of $g(x)$ multiplied by $g'(x)$, reverse the chain rule:

$$\int f'(g(x))\,g'(x)\,dx = f(g(x)) + C$$
  • $\displaystyle\int 2x(x^2 + 1)^3\,dx = \frac{(x^2 + 1)^4}{4} + C$.
  • $\displaystyle\int \cos x\, e^{\sin x}\,dx = e^{\sin x} + C$.
  • $\displaystyle\int \frac{x}{x^2 + 1}\,dx = \frac{1}{2}\ln(x^2 + 1) + C$.

Definite integrals and area

The definite integral 定积分 is

$$\int_a^b f(x)\,dx = F(b) - F(a)$$

where $F$ is any antiderivative. Between a curve above the $x$-axis and the axis, it gives the area. Where the curve is below the axis, the integral is negative.

Worked example. $\displaystyle\int_1^2 (3x^2 + 1)\,dx = \left[x^3 + x\right]_1^2 = 10 - 2 = 8$.

The curve y = x³ − 3x from 0 to 2, with the region below the axis shaded red and a thin region above the axis shaded green
Split the integral where the curve crosses the axis

Worked example. Find the area between $y = x^3 - 3x$ and the $x$-axis for $0 \le x \le 2$. The curve crosses the axis at $x = \sqrt{3}$.

  • $\displaystyle\int_0^{\sqrt{3}} (x^3 - 3x)\,dx = \left[\frac{x^4}{4} - \frac{3x^2}{2}\right]_0^{\sqrt{3}} = \frac{9}{4} - \frac{9}{2} = -\frac{9}{4}$, an area of $\frac{9}{4}$.
  • $\displaystyle\int_{\sqrt{3}}^{2} (x^3 - 3x)\,dx = (4 - 6) - \left(-\frac{9}{4}\right) = \frac{1}{4}$.
  • Total area $= \frac{9}{4} + \frac{1}{4} = \frac{5}{2}$. The single integral $\int_0^2$ gives $-2$, which is not the area.

The area between two curves, with $f(x) \ge g(x)$ on $[a, b]$, is

$$A = \int_a^b \big(f(x) - g(x)\big)\,dx$$

For $y = x$ and $y = x^2$, which meet at $x = 0$ and $x = 1$: $A = \displaystyle\int_0^1 (x - x^2)\,dx = \frac{1}{2} - \frac{1}{3} = \frac{1}{6}$.

On calculator papers, a definite integral can be evaluated with the graphing calculator; write the integral with its limits first, then the value.

Common mistakes.

  • Forgetting $+C$ on an indefinite integral, then losing marks when a point is given to find $C$.
  • Missing the inner derivative: $\dfrac{d}{dx}(3x+1)^4 = 12(3x+1)^3$, not $4(3x+1)^3$.
  • Multiplying derivatives for a product: $\dfrac{d}{dx}(uv) = u\dfrac{dv}{dx} + v\dfrac{du}{dx}$.
  • Using the tangent gradient $m$ for a normal. The normal has gradient $-\dfrac{1}{m}$.
  • Taking $f''(x) = 0$ as proof of a point of inflection. Check that $f''$ changes sign there.
  • Integrating straight across a root. Area below the $x$-axis gives a negative integral, so split at the roots and add the sizes.
  • Confusing displacement with distance: distance travelled is $\int |v|\,dt$.
Vocabulary Train
English
integration/ˌɪntɪˈɡreɪʃn/
indefinite integral/ɪnˈdefɪnət ˈɪntɪɡrəl/
definite integral/ˈdefɪnət ˈɪntɪɡrəl/
5.7

Practice

  1. Differentiate $y = 3x^4 - \dfrac{2}{x^3} + 5\sqrt{x}$.
  2. Find the equations of the tangent and the normal to $y = x^3 - 2x$ at $x = 1$.
  3. Find the interval on which $f(x) = x^3 - 6x^2 + 9x$ is decreasing.
  4. Differentiate: (a) $(2x - 5)^6$, (b) $e^{x^2}$, (c) $\ln(3x + 1)$, (d) $\sin^2 x$.
  5. Differentiate: (a) $x^3\cos x$, (b) $\dfrac{e^x}{x^2 + 1}$.
  6. Find and classify the stationary points of $y = 2x^3 - 3x^2 - 12x + 4$.
  7. Find the point of inflection of $y = x^3 - 6x^2 + 5$, and show that the concavity changes there.
  8. A rectangle has perimeter 40 cm. Find the dimensions that give the largest area, and justify that it is a maximum.
  9. A particle has velocity $v = 6t - 3t^2$ m/s and starts at $s = 2$ m. Find $s$ and $a$ in terms of $t$, and the times when it is at rest.
  10. For the particle in question 9, find the displacement and the distance travelled from $t = 0$ to $t = 3$.
  11. Find $\displaystyle\int \left(4x^3 + \frac{3}{x} - 2\sin x\right)dx$.
  12. $\dfrac{dy}{dx} = 3x^2 - 4x$ and the curve passes through $(2, 5)$. Find $y$.
  13. Find $\displaystyle\int 3x^2(x^3 + 2)^4\,dx$ by inspection.
  14. Evaluate $\displaystyle\int_0^{\pi/2} \cos x\,dx$ and $\displaystyle\int_1^e \frac{2}{x}\,dx$.
  15. Find the area enclosed by $y = 4 - x^2$ and the $x$-axis.
  16. Find the area between $y = x^2$ and $y = 2x$.

Answers.

  1. $y = 3x^4 - 2x^{-3} + 5x^{\frac{1}{2}}$, so $\dfrac{dy}{dx} = 12x^3 + 6x^{-4} + \dfrac{5}{2}x^{-\frac{1}{2}} = 12x^3 + \dfrac{6}{x^4} + \dfrac{5}{2\sqrt{x}}$.
  2. At $x = 1$, $y = -1$ and $\frac{dy}{dx} = 3x^2 - 2 = 1$. Tangent $y = x - 2$; normal $y + 1 = -(x - 1)$, so $y = -x$.
  3. $f'(x) = 3x^2 - 12x + 9 = 3(x - 1)(x - 3) < 0$ for $1 < x < 3$.
  4. (a) $12(2x - 5)^5$; (b) $2xe^{x^2}$; (c) $\dfrac{3}{3x + 1}$; (d) $2\sin x\cos x$ (which is $\sin 2x$).
  5. (a) $3x^2\cos x - x^3\sin x$; (b) $\dfrac{e^x(x^2 + 1) - 2xe^x}{(x^2 + 1)^2} = \dfrac{e^x(x - 1)^2}{(x^2 + 1)^2}$.
  6. $y' = 6x^2 - 6x - 12 = 6(x - 2)(x + 1) = 0$ at $x = -1$ and $x = 2$. $y'' = 12x - 6$: at $x = -1$, $-18 < 0$, maximum $(-1, 11)$; at $x = 2$, $18 > 0$, minimum $(2, -16)$.
  7. $y' = 3x^2 - 12x$, $y'' = 6x - 12 = 0$ at $x = 2$, where $y = 8 - 24 + 5 = -11$. $y''$ is negative for $x < 2$ and positive for $x > 2$, so $(2, -11)$ is a point of inflection.
  8. Sides $x$ and $20 - x$; $A = 20x - x^2$, $A' = 20 - 2x = 0$ at $x = 10$, and $A'' = -2 < 0$: a maximum. A 10 cm by 10 cm square, area 100 cm².
  9. $s = 3t^2 - t^3 + 2$; $a = 6 - 6t$; at rest when $3t(2 - t) = 0$, at $t = 0$ and $t = 2$ s.
  10. Displacement $= s(3) - s(0) = (27 - 27 + 2) - 2 = 0$ m. Distance: from 0 to 2, $s$ goes from 2 to 6 (4 m); from 2 to 3, from 6 to 2 (4 m). Distance $= 8$ m.
  11. $x^4 + 3\ln\lvert x\rvert + 2\cos x + C$.
  12. $y = x^3 - 2x^2 + C$; $5 = 8 - 8 + C$, so $y = x^3 - 2x^2 + 5$.
  13. $\dfrac{(x^3 + 2)^5}{5} + C$.
  14. $\left[\sin x\right]_0^{\pi/2} = 1$; $\left[2\ln x\right]_1^e = 2$.
  15. Roots $\pm 2$: $\displaystyle\int_{-2}^{2}(4 - x^2)\,dx = \left[4x - \frac{x^3}{3}\right]_{-2}^{2} = \frac{16}{3} + \frac{16}{3} = \frac{32}{3}$.
  16. They meet at $x = 0$ and $x = 2$, with $2x \ge x^2$ between: $\displaystyle\int_0^2 (2x - x^2)\,dx = 4 - \frac{8}{3} = \frac{4}{3}$.
5.8

Exam tips

  • Rewrite roots and fractions as powers before differentiating or integrating.
  • Use radians in all calculus with trigonometric functions.
  • Classify stationary points with the second derivative or a sign table, and give both coordinates.
  • For optimisation, state the domain, show the derivative is zero and justify maximum or minimum.
  • Split area integrals where the curve crosses the axis; the area is never negative.
  • Distance travelled is $\int |v|\,dt$, not $\int v\,dt$.
  • Always add $+C$ to an indefinite integral, and use a boundary condition when one is given.
Explore

Derivatives and stationary points

For y=ax^n, dy/dx=anx^(n-1)

Compare the model with the worked case and explain one change.

Explore

Integrals, area and accumulation

For n≠-1, the integral of ax^n is ax^(n+1)/(n+1)+C

Compare the model with the worked case and explain one change.

Explore

Chain, product, quotient and implicit differentiation

For y=f(g(x)), y prime=f prime(g(x))g prime(x)

Compare the model with the worked case and explain one change.

Explore

Substitution, parts and partial fractions

V/π = integral from 0 to 3 of x² dx = 9

The widget shows the volume integrand y²=x² for y=x; compare the exact value 9 with the volume check.

Explore

Differential equations and numerical solutions

For dy/dx=ky, separate variables: dy/y=k dx, giving y=Ae^(kx)

Compare the model with the worked case and explain one change.

Was this helpful?

Interactive lessons on this topic

Work through it step by step, with instant-check exercises.

More topics in IB Mathematics: Analysis and Approaches SL

Log in or create account

IGCSE, A-Level & AP