James Ashton MathsFREE MATHEMATICS. OPEN TO EVERYONE.
HomeIB DiplomaA levelAbout
IB Diploma › Maths AA HL › Topic 5: Calculus › Separable & homogeneous DEs

Differential equations: separable & homogeneous

First-order differential equations: what a solution is, general and particular solutions, separating the variables, the substitution y=vx for homogeneous equations, and modelling with differential equations.

AHL 5.18HL onlyPaper 1Paper 2≈ 80 min to work through
Before you start: integration, including standard integrals and logarithms. See Integration and areas and Further derivatives.

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.

  • Verify that a function satisfies a differential equationAHL 5.18
  • Solve separable equations and find general and particular solutionsAHL 5.18
  • Recognise a homogeneous equation dydx=f(yx)AHL 5.18
  • Solve homogeneous equations with the substitution y=vxAHL 5.18
  • Set up and solve a differential equation model in contextAHL 5.18

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

A differential equation (DE) is an equation involving a derivative, such as dydx=xy. It tells you the gradient at every point, which you can draw as a slope field. Solving the DE means finding the curves that follow the slopes. There is a whole family of them (the general solution, with a constant C); a starting point picks out one (a particular solution).

2.1 Verifying a solution

Worked example 1Paper 1
Show that y=Ae2x satisfies dydx=2y for any constant A.
dydx=2Ae2x=2(Ae2x)=2y ✓

2.2 Separable equations

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

Put all the y’s with dy and all the x’s with dx, integrate both sides, and include one constant.

Worked example 2Paper 1
Solve dydx=xy, given that y=2 when x=0.
∫1ydy=∫xdx⇒ln|y|=x22+C
y=Aex2/2, where A=±eC
Rewriting eC as a new constant A is standard and saves work.
y(0)=2⇒A=2. So y=2ex2/2
Worked example 3Paper 1
Solve dydx=x(1+y2), given that y=1 when x=0.
∫11+y2dy=∫xdx⇒arctany=x22+C
Standard arctan integral.
x=0,y=1: arctan1=π4=C
y=tan(x22+π4)
Why is separating allowed?

Writing "1ydy=xdx" treats dydx like a fraction, which it is not. The honest version: dividing by g(y) gives 1g(y)dydx=f(x), and integrating both sides with respect to x turns the left side into ∫1g(y)dy by the chain rule (substitution). The shortcut always gives the same result.

2.3 Modelling

Many models say "the rate of change is proportional to something". Translate that sentence into a DE, solve it, then use the data to find the constants.

Worked example 4Paper 2
A cup of tea at 90∘C is left in a room at 20∘C. Its temperature T satisfies dTdt=−k(T−20), where t is in minutes. After 10 minutes it is at 60∘C. Find when it reaches 30∘C.
∫dTT−20=−∫kdt⇒T−20=Ae−kt. At t=0: A=70.
40=70e−10k⇒k=110ln74=0.05596
10=70e−kt⇒t=ln7k=34.8 minutes

2.4 Homogeneous equations

A first-order DE is homogeneous if it can be written as dydx=f(yx): the right side depends only on the ratio yx. A test: replace x by λx and y by λy; if λ cancels completely, the equation is homogeneous. These are usually not separable as they stand, but the substitution y=vx makes them separable.

The substitution y = vx In formula booklet
y=vx ⇒ dydx=v+xdvdx

(product rule, since v is a function of x). The equation becomes v+xdvdx=f(v), which separates: ∫dvf(v)−v=∫dxx.

Worked example 5Paper 1
Solve dydx=x+2yx, x>0, given that y=1 when x=1.
dydx=1+2yx: homogeneous. Let y=vx.
v+xdvdx=1+2v⇒xdvdx=1+v
∫dv1+v=∫dxx⇒ln|1+v|=lnx+C⇒1+v=Ax
1+yx=Ax⇒y=Ax2−x. With (1,1): A=2, so y=2x2−x.
Check: y′=4x−1 and x+2(2x2−x)x=4x−1 ✓
Worked example 6Paper 1
Solve dydx=x2+y2xy, x>0, given that y=2 when x=1.
dydx=xy+yx. With y=vx: v+xdvdx=1v+v
xdvdx=1v⇒∫vdv=∫dxx⇒v22=lnx+C
The v terms cancel: a sign that the substitution is working.
y22x2=lnx+C. At (1,2): C=2.
y2=2x2(lnx+2)
Worked example 7 (faded)Paper 1
Solve dydx=yx−1, x>0.
v+xv′=v−1⇒v′=−1x⇒v=C−lnx, so y= x(C − ln x)  ← you work this out
Which method?
  • Can you write the right side as (function of x) × (function of y)? Separate.
  • Does every term have the same total degree in x and y (e.g. x2+y2xy)? Homogeneous: use y=vx.
  • Is it of the form dydx+P(x)y=Q(x)? Use an integrating factor.
  • None of these, or the question asks for an approximation? Euler’s method.
On your TI-Nspire Calculator tricks →

A TI-Nspire can draw slope fields: on a Graphs page choose Graph Entry → Diff Eq, enter y1′=x·y1 with an initial condition. Use it to check that your particular solution follows the field.

3Explore it

The short lines show the gradient dydx at each point. Move the starting point and the red curve follows the slopes: it is the particular solution through that point.

4Common mistakes & exam tips

Common mistakes

  • Forgetting the constant of integration, or adding it to both sides and not combining.
  • Writing ln|y|=x22+C⇒y=ex2/2+C. It is y=Aex2/2.
  • Using dydx=v instead of v+xdvdx after substituting y=vx.
  • Finding the constant before rearranging, then making an algebra slip; either order is fine but be consistent.
  • Forgetting to substitute v=yx back at the end.

Exam tips

  • Show the separated form with integral signs on both sides: it earns the first method mark.
  • In homogeneous questions, write dydx=v+xdvdx explicitly.
  • Give the final answer in the form asked for, e.g. "y in terms of x".
  • In models, interpret the constants (e.g. k is the cooling rate) when asked.

5Practice

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

FluencyP1
Solve dydx=2xy, with y=3 when x=0.
y2=2x2+9
FluencyP2
Solve dydx=ex−y, with y=ln2 when x=0.
ey=ex+1⇒y=ln(ex+1)
FluencyP3
Solve dydx=3y, with y=5 when x=0.
y=5e3x
FluencyP4
Show that dydx=x2+3y22xy is homogeneous.
Divide top and bottom by x2: 1+3(y/x)22(y/x).
Problem solvingP5
Solve dydx=x2+3y22xy, x>0, given y=1 when x=1.
xv′=1+v22v⇒1+v2=Ax: x2+y2=2x3
Problem solvingP6
A population grows at a rate proportional to its size. It doubles in 5 years. How long does it take to triple?
P=P0ekt, k=ln25: t=5ln3ln2=7.92 years

6Exam-style questions

Original questions in the style of the IB exam, with full markschemes. Give yourself about 1 minute per mark.

Question 1Paper 1[6 marks]

Solve the differential equation dydx=ex−y, given that y=ln2 when x=0. Give your answer in the form y=f(x).

∫eydy=∫exdxM1A1
ey=ex+CA1
2=1+CM1
C=1A1
y=ln(ex+1)A1
Question 2Paper 1[8 marks]

Consider the homogeneous differential equation dydx=x2+3y22xy, x>0, y>0.

  • (a)Use the substitution y=vx to show that xdvdx=1+v22v.[3]
  • (b)Given that y=1 when x=1, solve the differential equation, giving your answer in the form y2=f(x).[5]
(a)
dydx=v+xdvdxA1
v+xdvdx=1+3v22vM1
xdvdx=1+3v2−2v22v=1+v22vA1AG
(b)
∫2v1+v2dv=∫1xdxM1
ln(1+v2)=lnx+CA1A1
1+y2x2=Ax, with A=2M1
y2=2x3−x2A1
Question 3Paper 2[6 marks]

A cup of coffee at 85∘C cools in a room at 20∘C. Its temperature T after t minutes satisfies dTdt=−k(T−20). After 5 minutes it is at 70∘C.

  • (a)Show that T=20+65e−kt.[3]
  • (b)Find the time taken for the coffee to cool to 40∘C.[3]
(a)
∫dTT−20=−∫kdtM1
ln(T−20)=−kt+CA1
t=0: T−20=65A1AG
(b)
50=65e−5k⇒k=0.0525A1
20=65e−ktM1
t=22.5 minutesA1

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're scoring well above, try real IB questions. Your school or teacher will have these papers.

PaperQuestionFocusDifficulty
May 2025 · TZ1 · Paper 1Q9A homogeneous equation solved with y=vx★★★
Nov 2022 · Paper 1Q9A homogeneous equation solved with y=vx★★★
May 2022 · TZ1 · Paper 2Q12Euler’s method, then the substitution y=vx★★★
May 2021 · TZ2 · Paper 1Q11Solving a differential equation in a longer question★★★
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