You are on page 1of 2

community project

mathcentre community project


encouraging academics to share maths support resources
All mccp resources are released under an Attribution Non-commerical Share Alike licence

Solving Differential Equations by Separating Variables


mccp-dobson-1111

Introduction
Suppose we have the first order differential equation
dy
P (y) = Q(x)
dx
where Q(x) and P (y) are functions involving x and y only respectively. For example
dy 1 1 dy x−3
y2 = 3 or = .
dx x y 2 dx x3
We can solve these differential equations using the technique of separating variables.

General Solution
By taking the original differential equation
dy
P (y)= Q(x)
dx
we can solve this by separating the equation into two parts. We move all of the equation involving
the y variable to one side and all of the equation involving the x variable to the other side, then we
dy
can integrate both sides. Although dx is not a fraction, we can intuitively treat it like one to move
the ”dx” to the right hand side. So
Z Z
dy
P (y) = Q(x) ⇔ P (y) dy = Q(x) dx.
dx
Example

Let us find the general solution of the differential equation


dy 1
y2 = 3.
dx x

1 1
Z Z
2 dy 2
y = 3 ⇔ y dy = dx
dx x x3
Z Z
2
⇔ y dy = x−3 dx
y3 −x−2
⇔ = + c where c is a constant
3 2
−3
⇔ y 3 = 2 + 3c
r2x
3 −3
⇔y= + 3c
2x2

c
Katy Dobson Alan Slomson
www.mathcentre.ac.uk University of Leeds University of Leeds
Example

To find the general solution of the differential equation

mathcentre community project dy


dx
=
y 2 (x − 3)
x3
encouraging academics to share maths support resources
we first need to move the
All mccp y 2 to are
resources thereleased
left hand side
under an of the Non-commerical
Attribution equation. Then
Sharewe move
Alike licencethe dx to the
right hand side of the equation and integrate both sides.

dy y 2 (x − 3) 1 dy x−3
= 3
⇔ 2 =
dx x y dx x3
1 x−3
Z Z
⇔ 2
dy = dx
y x3
1 3
Z Z
x
⇔ 2
dy = 3
− 3 dx
y x x
1 3
Z Z
⇔ y −2 dy = 2
− 3 dx
x x
Z Z
⇔ y −2 dy = x−2 − 3x−3 dx
3x−2
⇔ −y = −x +
−1 −1
+c where c is a constant
2
−1 1 3
⇔ =− + 2 +c
y x 2x
1 1 3
⇔ = − 2 −c
y x 2x
1 2x 3 2cx2
⇔ = 2− 2−
y 2x 2x 2x2
1 2x − 3 − 2cx2
⇔ =
y 2x2
2x2
⇔y=
2x − 3 − 2cx2

Exercises

Find the general solution of


dy dy x dy 4 dy 1
1. = y(1 + ex ) 2. = 3. = 9x2 y 4. =
dx dx y dx y 3 dx x

Answers

s
x+ex +c
√ 3x3 +c −2
1. y=e 2. y = ± x2 + 2c 3. y=e 4. y=±
ln |x| + c
Note that the ñ symbol like in Exercise
√ 2 means that the differential equation has two sets of
solutions, y = x2 + 2c and y = − x2 + 2c.

c
Katy Dobson Alan Slomson
www.mathcentre.ac.uk University of Leeds University of Leeds

You might also like