← IB Mathematics: Applications & Interpretation · HL · IB Maths AI revision
⭐ 0
IB Diploma Mathematics: Applications & Interpretation HL · Differential Equations & Numerical Methods
Mini-Lesson

Differential Equations (AI HL)

3 missions. Guess, learn, then check. Your place is saved.

  1. Mission 1A population grows in proportion to its size. What equation is that?
  2. Mission 2Foxes eat rabbits, rabbits feed foxes. Where does it all end?
  3. Mission 3A spring bounces less each time. What equation does it obey?
Mission 1

A population grows in proportion to its size. What equation is that?

Make a guess: A population grows in proportion to its size. What equation is that?

HL calculus · differential equations and slope fields

Turning words into a differential equation

  • "The rate of change of P" is dP/dt.
  • "Proportional to" means "equals a constant k times". "Decreasing" makes the rate negative: write −k with k > 0.
  • Example: a drink cools at a rate proportional to the difference between its temperature T and room temperature 20 °C: dT/dt = −k(T − 20).
  • The general solution contains an arbitrary constant. An initial condition fixes it, giving a particular solution.
Quick check
?Water leaks from a tank at a rate proportional to the square root of the volume V of water left. Which differential equation models this, with k > 0?
HL calculus · differential equations and slope fields

Separation of variables

  • If dy/dx = f(x) g(y), collect each variable on its own side and integrate:
∫ 1/(g(y)) dy = ∫ f(x) dx
  • One constant of integration is enough; put it on the x side.
  • The key model: dy/dx = ky gives ln |y| = kx + c, so y = Ae^kx, an exponential model.
Worked example HL calculus · differential equations and slope fields

Growth of a fish population

Question
A lake's fish population P satisfies dP/dt = 0.04P, where t is in years, and P = 500 when t = 0. Find P in terms of t, and the time for the population to double.
  1. 1
    Separate: ∫ 1/P dP = ∫ 0.04 dt
  2. 2
    Integrate: ln P = 0.04t + c, so the general solution is P = Ae^0.04t
  3. 3
    Use P = 500 at t = 0: A = 500, so P = 500e^0.04t
  4. 4
    Double means P = 1000: e^0.04t = 2, so t = (ln 2)/0.04
Answer
P = 500e^0.04t; doubling time ≈ 17.3 years (3 s.f.)
⚠️ Watch out
ln P = 0.04t + c gives P = e^ce^0.04t, not e^0.04t + c. The constant becomes a multiplier.
Calculate
?Solve dy/dx = 2xy given that y = 3 when x = 0, and find the value of y when x = 1. Give your answer to 3 significant figures.
Calculate
?A cup of tea at 90 °C is left in a room at 20 °C. Its temperature T °C after t minutes satisfies dT/dt = −0.1(T − 20). Solve the differential equation and find the temperature after 10 minutes. Give your answer to 3 significant figures.
°C
HL calculus · differential equations and slope fields

Slope fields

Slope field for dy/dx = x − y−2−1123−2−1123Oxy(0,1)
  • A slope field draws a short segment at each grid point (x, y) with gradient dy/dx there.
  • A solution curve follows the segments; each initial point gives one curve.
  • Segments are horizontal where dy/dx = 0.
  • If dy/dx depends on x only, segments match down each vertical line; on y only, along each horizontal line.
Worked example HL calculus · differential equations and slope fields

Reading a slope field

Slope field for dy/dx = x − y−2−1123−2−1123Oxy(0,1)
Question
The diagram shows the slope field of dy/dx = x − y. Find the gradients at (0, 0), (2, 1) and (0, 1), state where the segments are horizontal, and show that y = x − 1 is a solution curve.
  1. 1
    Substitute each point: at (0, 0), 0 − 0 = 0; at (2, 1), 2 − 1 = 1; at (0, 1), 0 − 1 = −1
  2. 2
    Horizontal where x − y = 0: along the line y = x
  3. 3
    On y = x − 1: dy/dx = x − (x − 1) = 1, which equals the line's own gradient
  4. 4
    So every segment on y = x − 1 lies along the line, and the line is a solution curve
Answer
gradients 0, 1 and −1; horizontal along y = x; y = x − 1 is a solution.
⚠️ Watch out
the line y = x where segments are horizontal is not a solution curve: curves cross it at their turning points.
Sort it
?What does dy/dx depend on? This tells you how the slope field repeats.

Tap a statement, then tap the group it belongs in. Then press Check.

Mission check

?A population grows in proportion to its size. What equation is that?
Mission 2

Foxes eat rabbits, rabbits feed foxes. Where does it all end?

Make a guess: Foxes eat rabbits, rabbits feed foxes. Where does it all end?

Calculus · differential equations

Euler's method

  • A differential equation dy/dx = f(x, y) gives the gradient at every point. Euler's method follows that gradient in small steps of width h:
yₙ₊₁ = yₙ + h f(xₙ, yₙ), xₙ₊₁ = xₙ + h
  • Each step uses the gradient at the start of the step.
  • A smaller step h usually gives a more accurate estimate (but more steps).
  • In exams the values come from a spreadsheet or your GDC; you must set up the method correctly.
Worked example Calculus · differential equations

Two steps of Euler's method

Question
dy/dx = x + y with y = 1 when x = 0. Use Euler's method with h = 0.1 to estimate y when x = 0.2.
  1. 1
    First step, from (0, 1): y₁ = 1 + 0.1(0 + 1) = 1.1, at x₁ = 0.1
  2. 2
    Second step, from (0.1, 1.1): y₂ = 1.1 + 0.1(0.1 + 1.1) = 1.1 + 0.12
  3. 3
    So y₂ = 1.22 at x₂ = 0.2
Answer
y(0.2) ≈ 1.22
⚠️ Watch out
update x as well as y each step. Using x = 0 in the second step gives the wrong gradient.
Calculate
?dy/dx = 2x − y with y(1) = 3. Use Euler's method with step h = 0.5 to estimate y(2).
Calculus · differential equations

Coupled systems

  • In a coupled system, two quantities change together and each rate depends on both:
dx/dt = f₁(x, y, t), dy/dt = f₂(x, y, t)
  • Predator–prey example: rabbits x grow on their own but are eaten, foxes y die out on their own but are fed: dx/dt = ax − bxy, dy/dt = −cy + dxy.
  • Euler's method updates both at once, using the old values of x and y in both formulas:

xₙ₊₁ = xₙ + h f₁, yₙ₊₁ = yₙ + h f₂, tₙ₊₁ = tₙ + h.

Calculate
?Rabbits x (hundreds) and foxes y (tens) satisfy dx/dt = 0.5x − 0.1xy and dy/dt = −0.4y + 0.02xy, with x = 30 and y = 4 at t = 0. Use Euler's method with h = 0.1 (a spreadsheet or your GDC) to estimate y at t = 0.2. Give your answer to 3 significant figures.
Calculus · differential equations

Phase portraits and eigenvalues

Three phase portraits−22−22Oxy−100−3: towards−22−22Oxy1−111: spiral away−22−22Oxy200−1: saddle
  • For dx/dt = ax + by, dy/dt = cx + dy, the origin is an equilibrium point. A phase portrait plots y against x; each path is a trajectory.
  • The behaviour depends on the eigenvalues of ( a , b ; c , d ), the roots of λ² − (a + d)λ + (ad − bc) = 0:
EigenvaluesTrajectories
Both negative, or complex with negative real partMove towards the origin (stable)
Both positive, or complex with positive real partMove away from the origin
Real with opposite signsSaddle point
Complex (non-zero real part)Spirals
Purely imaginaryCircles or ellipses round the origin
Worked example Calculus · differential equations

An exact solution and a saddle point

Phase portrait with eigenvector lines−4−22−4−224Oxyλ=3λ=−1(3,1)
Question
Solve dx/dt = x + 2y, dy/dt = 2x + y with x = 3, y = 1 at t = 0, and describe the phase portrait.
  1. 1
    Eigenvalues of ( 1 , 2 ; 2 , 1 ): λ² − 2λ − 3 = 0, so λ = 3 or λ = −1
  2. 2
    Eigenvectors: ( 1 ; 1 ) for λ = 3 and ( 1 ; −1 ) for λ = −1
  3. 3
    General solution: ( x ; y ) = Ae^3t( 1 ; 1 ) + Be^(−t)( 1 ; −1 )
  4. 4
    At t = 0: A + B = 3 and A − B = 1, so A = 2, B = 1
  5. 5
    Opposite signs: a saddle. Paths come in along y = −x and go out along y = x
Answer
x = 2e^3t + e^(−t), y = 2e^3t − e^(−t); the origin is a saddle point.
⚠️ Watch out
pair each eigenvalue with its own eigenvector. Swapping them gives a solution that does not satisfy the equations.
Sort it
?Each system dx/dt = ax + by, dy/dt = cx + dy has the eigenvalues shown. Sort by what the trajectories do.

Tap a statement, then tap the group it belongs in. Then press Check.

Calculate
?A system is dx/dt = 2x + y, dy/dt = 4x − y. Find the positive eigenvalue of its matrix.
Mission check

?Near their equilibrium, a model gives the extra rabbits x and extra foxes y as dx/dt = −2y, dy/dt = 0.5x. Where does it all end?
Mission 3

A spring bounces less each time. What equation does it obey?

Make a guess: A spring bounces less each time. What equation does it obey?

Calculus · differential equations

Where second-order equations come from

  • Displacement x, velocity dx/dt, acceleration d²x/dt².
  • A spring pulls back towards equilibrium with force proportional to x: d²x/dt² = −bx with b > 0.
  • Air or friction opposes the motion, with force proportional to the velocity: an extra term −adx/dt, a > 0.
  • Together: d²x/dt² + adx/dt + bx = 0, a second-order differential equation. In exams the equation is given.
Calculus · differential equations

Writing it as a coupled system

  • Let y = dx/dt (the velocity). Then d²x/dt² = dy/dt.
  • d²x/dt² + adx/dt + bx = 0 becomes
dx/dt = y, dy/dt = −bx − ay
  • Its matrix is ( 0 , 1 ; −b , −a ), with eigenvalues from λ² + aλ + b = 0.
  • Now the phase portrait rules apply, with x (displacement) across and y (velocity) up.
Worked example Calculus · differential equations

Reading the motion from the eigenvalues

Damped oscillation as a phase portrait and as x against t−11−22Odisplacement xvelocity y(1,0)1234−0.50.51Otx(0,1)
Question
Describe the motion given by d²x/dt² + 2dx/dt + 5x = 0.
  1. 1
    Write as a system: dx/dt = y, dy/dt = −5x − 2y
  2. 2
    Characteristic equation: λ² + 2λ + 5 = 0
  3. 3
    Solve: λ = (−2 ± √(4 − 20))/2 = −1 ± 2i
  4. 4
    Complex with negative real part: trajectories spiral into the origin
Answer
a damped oscillation. The object swings back and forth with shrinking amplitude and settles at x = 0.
⚠️ Watch out
the phase portrait spirals, but the displacement–time graph is a wave that dies away. Both describe the same motion.
Quick check
?Write d²x/dt² + 3dx/dt − 4x = 0 as a coupled system with dx/dt = y. Which is the second equation?
Calculus · differential equations

Euler's method for second-order equations

  • For d²x/dt² = f(x, dx/dt, t), set y = dx/dt and step both equations together:
xₙ₊₁ = xₙ + h yₙ, yₙ₊₁ = yₙ + h f(xₙ, yₙ, tₙ)
  • Then tₙ₊₁ = tₙ + h. Both updates use the old values.
  • You need two starting values: the initial displacement and the initial velocity.
  • A spreadsheet or your GDC generates the values in exams.
Worked example Calculus · differential equations

Two Euler steps for a damped spring

Question
d²x/dt² = −4x − 0.5dx/dt, with x = 1 and dx/dt = 0 at t = 0. Use Euler's method with h = 0.1 to estimate x and dx/dt at t = 0.2.
  1. 1
    Set up: dx/dt = y, dy/dt = −4x − 0.5y, starting from x₀ = 1, y₀ = 0
  2. 2
    Step 1: x₁ = 1 + 0.1(0) = 1, y₁ = 0 + 0.1(−4 − 0) = −0.4
  3. 3
    Step 2: x₂ = 1 + 0.1(−0.4) = 0.96
  4. 4
    Step 2: y₂ = −0.4 + 0.1(−4(1) − 0.5(−0.4)) = −0.4 − 0.38 = −0.78
Answer
at t = 0.2, x ≈ 0.96 and dx/dt ≈ −0.78
⚠️ Watch out
in step 1 the displacement does not change, because the starting velocity is 0. That is correct, not a slip.
Calculate
?d²x/dt² = 2t − 3x, with x = 2 and dx/dt = 1 when t = 0. Use Euler's method with h = 0.2 to estimate x when t = 0.4.
Sort it
?Each equation is d²x/dt² + adx/dt + bx = 0. Sort by the phase portrait.

Tap a statement, then tap the group it belongs in. Then press Check.

Calculate
?A spring obeys d²x/dt² + 0.6dx/dt + 9x = 0. Find the real part of the eigenvalues of the matrix of the equivalent coupled system.
Mission check

?A spring bounces less each time. Which equation describes its motion?
Recap

Big ideas

  • Translate words into a differential equation: rate = derivative, "proportional to" = constant times, decreasing = negative.
  • Separate the variables, integrate both sides with one constant, then use the initial condition; dy/dx = ky gives y = Ae^kx.
  • A slope field shows the gradient at each point; solution curves follow the segments.
  • Euler's method: yₙ₊₁ = yₙ + h f(xₙ, yₙ). For a coupled system, update x and y together from the old values; a spreadsheet or GDC does the arithmetic.
  • For dx/dt = ax + by, dy/dt = cx + dy, the eigenvalues decide the phase portrait: negative (real part) in, positive out, opposite signs a saddle, complex spirals, imaginary ellipses.
  • With real distinct eigenvalues, ( x ; y ) = Ae^(λ₁ t)v₁ + Be^(λ₂ t)v₂.
  • Write d²x/dt² = f(x, dx/dt, t) as dx/dt = y, dy/dt = f(x, y, t), then use Euler's method on both, from the old values.
  • d²x/dt² + adx/dt + bx = 0 has matrix ( 0 , 1 ; −b , −a ) and λ² + aλ + b = 0.
  • Imaginary λ: ellipses (undamped oscillation). Complex with negative real part: spiral in (damped). Real, opposite signs: saddle.
🏆

Mini-lesson complete!

⭐⭐⭐

You've worked through Differential Equations (AI HL) for IB Diploma Mathematics: Applications & Interpretation HL. 🎉

  1. Mission 1A population grows in proportion to its size. What equation is that?
  2. Mission 2Foxes eat rabbits, rabbits feed foxes. Where does it all end?
  3. Mission 3A spring bounces less each time. What equation does it obey?

Your stars: 0 / 0

Next: more IB Mathematics: Applications & Interpretation · HL lessons and games on the IB Mathematics: Applications & Interpretation · HL page.

📣 Smashed it? Share your score

Challenge a mate to beat your stars, or show a parent how you got on.

→ Back to IB Mathematics: Applications & Interpretation · HL

Specification points and sources for this lesson are listed at the bottom of the page.

Sources (3)

The specification points and sources behind this lesson.

  1. 1 IB Mathematics: applications and interpretation guide (first assessment 2021), AHL 5.14, 5.15
  2. 2 IB Mathematics: applications and interpretation guide (first assessment 2021), AHL 5.16, AHL 5.17 (link AHL 1.15)
  3. 3 IB Mathematics: applications and interpretation guide (first assessment 2021), AHL 5.18 (links AHL 5.10, 5.16, 5.17)