5 Separation of Variables
5 Separation of Variables
then the equation is said be variable separable. The solution can be immediately obtained
by integrating both sides of (2).
Z Z
A (x) dx + B (y) dy = c
Another definition:
A first-order differential equation in the form
dy
= g(x)h(y)
dx
is said to have separable variable.
Example 1.
dy
(1 − x) = y2
dx
multiplying both sides by dx,
(1 − x)dy = y 2 dx
dy dx
=
y2 1−x
Integrating both sides of the equation gives,
Z Z
dy dx
2
=
y 1−x
1
− = − ln |1 − x| + c
y
1
− = − ln |1 − x| + ln c
y
Simplifying gives the final result as
y ln |c(1 − x)| = 1
Example 2.
xdx dy
+ 3 =0
ex2 y
2 dy
xe−x dx + 3 = 0
y
Integrating both sides of the equation,
Z Z
−x2 dy
xe dx + =c
y3
1 2 1
− e−x − y −2 = c
2 2
2
e−x + y −2 = −2c
2
e−x + y −2 = c
Example 4.
1 1
(2y dx) = (3x dy)
xy xy
2 dx 3 dy
=
x y
Integrating both sides,
2 dx 3 dy
=
x y
Z Z
dx dy
2 =3 +c
x y
2 ln |x| = 3 ln |y| + ln |c|
ln |x2 | = ln |y 3 | + ln |c|
ln |x2 | = ln |cy 3 |
x2 = cy 3
Example 5.
1 2x
2x
1
2x
ye dx = (4 + e )dy
y(4 + e ) y(4 + e2x )
e2x dx dy
2x
=
4+e y
Integrating both sides, we have
e2x dx
Z Z
dy
= +c
4 + e2x y
1
ln |4 + e2x | = ln |y| + ln |c|
2
ln |4 + e2x | = 2 ln |y| + 2 ln |c|
ln |4 + e2x | = ln |y 2 | + ln |c2 |
ln |4 + e2x | = ln |c2 y 2 |
4 + e2x = c2 y 2
Notice that c2 can be written as just c, since they are both arbitrary, but we should
note that the left side of the equation is always greater than 0. Therefore, if we just write c,
we will be restricted to values of c ≥ 0.
Example 6.
dr = b cos θ dr + br sin θ dθ
dr − b cos θ dr = br sin θ dθ
(1 − b cos θ) dr = br sin θ dθ
dr b sin θdθ
=
r 1 − b cos θ
Integrating both sides of the equation,
Z Z
dr b sin θdθ
= +c
r 1 − b cos θ
ln |r| = ln |1 − b cos θ| + ln |c|
ln |r| = ln |c(1 − b cos θ)|
r = c(1 − b cos θ)
Example 7.
x dx dy
− =0
x+2 y
xdx (y + 1)dy
− =0
e−x y3
xex dx − y −3 (y + 1)dy = 0
Solve the particular solution given the initial condition equation 2xyy 0 = 1 + y 2 , when x = 2
and y = 3.
Solution:
Divide the given equation by x(1 + y 2 ),
2xyy 0 = 1 + y 2
dy
2xy = 1 + y2
dx
2y dy dx
2
=
1+y x
Integrate both sides of equation
Z Z
2ydy dx
2
=
1+y x
2
ln |1 + y | = ln |x| + ln |c|
ln |1 + y 2 | = ln c|x|
1 + y 2 = cx
1 + y 2 = cx
1 + 32 = c(2)
c=5
1 + y 2 = 5x