James Ashton MathsFREE MATHEMATICS. OPEN TO EVERYONE.
HomeIB DiplomaA levelAbout
IB Diploma › Maths AI HL › Calculus › Differential equations

Differential equations

A differential equation describes how something changes: "the rate of growth is proportional to the size", "a drink cools at a rate proportional to how much hotter it is than the room". Solving it gives the quantity itself. On this page you set up models from words and solve them by separating the variables.

AHL 5.14HL onlyPaper 1Paper 2Paper 3GDC allowed≈ 50 min to work through
Before you start: Further integration (especially ∫1ydy=ln|y|) and Laws of logarithms.

1What you need to know

Tick these off as you go. By the end of the page you should be able to do all of them without notes.

  • Set up a differential equation from a description in contextAHL 5.14
  • Solve dydx=f(x)g(y) by separating the variablesAHL 5.14
  • Find the general solution, then a particular solution from a conditionAHL 5.14
  • Recognise dydx=ky as exponential growth or decayAHL 5.14
  • Use the solution to answer questions in context, including the long-term behaviourAHL 5.14

2Notes & worked examples

Each idea is followed by a worked example. Try the question yourself first, then reveal the solution one step at a time.

The big idea

"The rate of change of G is proportional to G" translates directly into dGdt=kG. To solve it, get everything with G on one side and everything with t on the other, then integrate both sides. That is separation of variables.

2.1 Setting up models

In wordsDifferential equation
The rate of growth of P is proportional to PdPdt=kP
The temperature falls at a rate proportional to the difference between T and room temperature, 20 °CdTdt=−k(T−20)
Water leaks at a rate proportional to the square root of the volumedVdt=−kV
The rate of change of y is inversely proportional to ydydt=ky

Use k>0 and put in a minus sign for a decrease. "Proportional" introduces a constant; you usually find it from data later.

2.2 Separating the variables

Separation of variables Not in booklet: learn it
dydx=f(x)g(y) ⇒ ∫1g(y)dy=∫f(x)dx

One constant +C is enough. The general solution contains C; a condition such as y(0)=3 gives the particular solution.

Worked example 1Paper 1
Solve dydx=2xy, given y=3 when x=0.
∫1ydy=∫2xdx⇒ln|y|=x2+C
y=Aex2
A=eC, allowed to be any constant.
y(0)=3⇒A=3: y=3ex2
Worked example 2Paper 1
Solve dydx=x+1y, given y=2 when x=0 and y>0.
∫ydy=∫(x+1)dx⇒y22=x22+x+C
2=0+0+C⇒C=2
y2=x2+2x+4, so y=x2+2x+4
Worked example 3 (faded)Paper 1
Write down the general solution of dydx=5y.
y= Ae5x  ← you work this out

2.3 Growth, decay and cooling

Worked example 4Paper 2
An algae population G grows at a rate proportional to its size. Initially G=200; after 3 days G=500. Find G after 6 days.
dGdt=kG⇒G=200ekt
500=200e3k⇒k=ln2.53=0.305
G(6)=200e6k=1250
Each 3 days multiplies G by 2.5: 200 → 500 → 1250.
Worked example 5Paper 2
Tea at 90 °C cools in a room at 20 °C according to dTdt=−k(T−20). After 10 minutes it is 60 °C. When will it reach 30 °C?
∫1T−20dT=−∫kdt⇒ln(T−20)=−kt+C
T=20+Ae−kt; T(0)=90⇒A=70
60=20+70e−10k⇒k=0.0560
30=20+70e−kt⇒t=ln7k=34.8 minutes
As t→∞, T→20: the tea approaches room temperature.
On your TI-Nspire Calculator tricks →

Paper 1 asks you to separate and integrate by hand. Then the TI-Nspire helps with the constants: solve 500=200e3k with nSolve or by logs, and use solve or a graph intersection to find when the solution reaches a value. Store k (for example as k) so later answers use the full accuracy.

3Explore it

Solutions of dT/dt = −k(T − 20) for different starting temperatures. Change k and the starting temperature: every solution curve approaches the room temperature, 20 °C, and a larger k means faster cooling.

4Common mistakes & exam tips

Common mistakes

  • Integrating dydx=2xy as y=x2y+C. The y must be moved to the left first.
  • Adding a constant on both sides and not combining them.
  • Writing lny=x2+C⇒y=ex2+eC. It is ex2+C=eCex2.
  • Forgetting the minus sign for a decreasing quantity when setting up the model.
  • Rounding k heavily before using it again.

Exam tips

  • "General solution" means keep the constant; "particular solution" means find it.
  • Show the separated integrals ∫1g(y)dy=∫f(x)dx for the method mark.
  • Make y the subject at the end unless the question allows an implicit answer.
  • Interpret long-term behaviour: what happens to the solution as t→∞?

5Practice

Fluency questions build the basics. Problem-solving questions make you think about which method to use.

FluencyP1
Write a differential equation for: "the rate of decrease of mass M is proportional to M".
dMdt=−kM
FluencyP2
Solve dydx=3x2y, y(0)=2.
y=2ex3
FluencyP3
Solve dydx=xy, y(0)=1, y>0.
y=x2+1
FluencyP4
Solve dydx=e−y, y(0)=0.
ey=x+1⇒y=ln(x+1)
Problem solvingP5
A radioactive sample decays with dmdt=−km. Its half-life is 8 days. Find k.
e−8k=0.5⇒k=ln28=0.0866
Problem solvingP6
Solve dVdt=−0.5V with V(0)=100, and find when the tank is empty.
2V=−0.5t+20⇒V=(10−t4)2; empty at t=40.

6Exam-style questions

Original questions in the style of the IB Maths AI HL exam, with full markschemes. Your GDC is allowed throughout: use it, but write down what you entered and what it gave you. Give yourself about 1 minute per mark.

Question 1Paper 1[6 marks]

Consider the differential equation dydx=3x2y, where y>0, and y=2 when x=0.

  • (a)Solve the differential equation, giving y in terms of x.[5]
  • (b)Find the value of y when x=1.[1]
(a)
∫1ydy=∫3x2dxM1
lny=x3+CA1A1
ln2=CM1
y=2ex3A1
(b)
2e≈5.44A1
Question 2Paper 1[6 marks]

The number of bacteria, N, in a culture grows at a rate proportional to N. Initially there are 500 bacteria; after 2 hours there are 800.

  • (a)Write down a differential equation for N.[1]
  • (b)Solve the equation to find N in terms of t.[3]
  • (c)Find the time at which the number of bacteria reaches 5000.[2]
(a)
dNdt=kNA1
(b)
N=Aekt, A=500(M1)(A1)
k=ln1.62=0.235A1
(c)
500e0.235t=5000(M1)
9.80 hoursA1
Question 3Paper 2[9 marks]

A cup of coffee at 85 °C is left in a room at 21 °C. Its temperature, T °C, after t minutes decreases at a rate proportional to the difference between T and the room temperature.

  • (a)Write down a differential equation for T.[1]
  • (b)Show that the general solution is T=21+Ae−kt, and find A.[4]
  • (c)After 5 minutes the coffee is at 70 °C. Find k.[2]
  • (d)Find the time at which the coffee reaches 40 °C.[1]
  • (e)Describe the temperature of the coffee in the long term.[1]
(a)
dTdt=−k(T−21)A1
(b)
∫1T−21dT=−∫kdtM1
ln(T−21)=−kt+CA1
T=21+Ae−ktAG
A=64A1A1
Award A1 for substituting t=0, T=85, A1 for 64.
(c)
70=21+64e−5k(M1)
k=0.0534A1
(d)
22.7 minutesA1
(e)
it approaches 21 °C (room temperature)R1

7Check yourself

Six quick questions, marked instantly. Aim for 6/6 before moving on. Fractions like 3/2 are accepted.

8Past-paper practice

Once you are scoring well above, try these real IB Maths AI HL questions on this topic. Your school or teacher will have the papers.

PaperQuestionFocusDifficulty
May 2025 · TZ3 · Paper 1Q13Growth of a fungus on a dish: a differential equation model★★☆
May 2025 · TZ2 · Paper 1Q12Acceleration proportional to v1.5: set up and solve★★★
Nov 2025 · Paper 3Q2Choosing the best model for a population of wolves★★★
Spotted a mistake on this page?Tell me and I'll fix it. The button opens an email with this page already named, or write to jamesashtonmaths@gmail.com.
Report a mistake