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
1
1 dy
x3
dy
= 3
or
=
.
y2
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
= 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
P (y)

Example
Let us find the general solution of the differential equation
dy
1
y2
= 3.
dx
x
1
= 3
y
dx
x
2 dy

y dy =
2

y dy =

1
dx
x3
x3 dx

y3
x2
=
+ c where c is a constant
3
2
3
y 3 = 2 + 3c
2x
r
3 3
+ 3c
y=
2x2

www.mathcentre.ac.uk

c
Katy
Dobson
University of Leeds

Alan Slomson
University of Leeds

Example
To find the general solution of the differential equation

mathcentre community project


y 2 (x 3)
dy
=
dx
x3

encouraging academics to share maths support resources

we first need to move


the
y 2 to are
thereleased
left hand
side
of the Non-commerical
equation. Then
move
All mccp
resources
under an
Attribution
Sharewe
Alike
licencethe dx to the
right hand side of the equation and integrate both sides.
y 2 (x 3)
1 dy
x3
dy
=
2
=
3
dx
x
y dx
x3
Z
Z
1
x3

dy =
dx
2
y
x3
Z
Z
1
x
3

dy =
3 dx
2
3
y
x
x
Z
Z
1
3
y 2 dy =
3 dx
2
x
x
Z
Z
y 2 dy = x2 3x3 dx
3x2
+c
y = x +
2
1
3
1
= + 2 +c

y
x 2x
1
1
3
= 2 c
y
x 2x
2x
3
2cx2
1
= 2 2
y
2x
2x
2x2
1
2x 3 2cx2
=
y
2x2
2x2
y=
2x 3 2cx2
1

where c is a constant

Exercises
Find the general solution of
dy
= y(1 + ex )
dx

1.

2.

dy
x
=
dx
y

3.

dy
= 9x2 y
dx

4.

4 dy
1
=
y 3 dx
x

Answers

1.

x+ex +c

y=e

2.

y = x2 + 2c

3.

3x3 +c

y=e

4.

y=

2
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.

www.mathcentre.ac.uk

c
Katy
Dobson
University of Leeds

Alan Slomson
University of Leeds

You might also like