Separation of Variables
Separation of Variables
Introduction
A differential equation of first order and first degree may be written in the
differential form
g ( x , y ) dx+ f ( x , y ) dy=0 ,
Where g and f are functions of x and y .
In Variable separable, If by algebraic processes g ( x , y ) dx+ f ( x , y ) dy=0 may be
written in the form
g1 ( x ) dx +f 1 ( y ) dy=0 ,
Where g1 and f 1 are functions of one variable as indicated, we say that the variables
have been separated.
dy
1. Make the DE look like = g ( x ) f ( y ). This may be already done for you (in which case you
dx
can just identify the various parts), or you may have to do some algebra to get it into the correct
form.
1 dy
= g( x)
f ( y) dx
and get all the x's on the RHS by `multiplying' both sides by dx:
1
dy = g ( x ) dx
f ( y)
1
∫ f ( y) dy=∫ g ( x ) dx
This gives us an implicit solution.
4. Solve for y (if possible). This gives us an explicit solution.
Example 1
1. Rewriting the LHS in differential form and factoring the RHS we get
dy ( x+2 )( y−1)
dx = ( x−3 ) ( y +1)
2. Separating the variables leads to:
y +1 x+2
dy = dx
y−1 x−3
3. To evaluate the integrals
y +1 x+ 2
∫ y−1 dy=∫ x−3 dx
we need u-substitution on both sides. On the LHS, let u= y−1and then du=dy and y=u+ 1. On
the RHS
we need another variable name, so let w=x−3 and thendw=dx and x=w+3.
u+2 w+5
∫ u
du=∫
w
dw( Substituting)
2 5
∫ 1+ u du=∫ 1+ w dw( Rewriting)
u+2 ln |u|=w +5 ln |w|+C1 (Integrating)
y−1+2 ln | y −1|=x−3+ 5 ln |x−3|+C 1 (Reversing∧substituting)
y +2 ln | y−1|=x +5 ln |x−3|+C 2
y + ln|( y−1)2|=x +ln |(x−3)5|+C2
ln |( y−1)2|−ln|( x −3 )5|=x− y+C 2
| |
2
( y−1)
ln = x− y+ C2
(x−3)5
| ( y −1)2
( x−3) 5
=e
|x− y+C x− y C
=e e =C 3 . e
2 x− y 2
2
( y−1) x− y
5
=C . e
( x−3)
(2−1)2 4 −2
5
=C .e
( 4−3)
2
1=C . e
−2
e =C
So our implicit solution is
( y−1)2
5
=C . e x− y
( x−3)
Example 2
'
y =kM −ky
subject to the initial condition y(0) = 0 (this is the differential equation describing the velocity of
a sky diver).
1
dy =kdx
M−y
1
∫ M − y dy=∫ kdx
−ln| y −M|=kx+C 0
4. Solve for y:
−ln| y −M|=kx+C 0
ln | y −M|=−kx+C 1
ln |y−M| −kx+C
e =e 1
| y −M|=e−kx +C =e−kx . eC =C2 e−kx
1 1
−kx
( y−M ) =C2 e
y=M +C 2 e−kx
5. Apply the initial condition y (0)=0 and solve for C:
−k .0
0=M + C e
0
¿ M +C e
¿ M +C
−M =C
Example 3.
' x2
y=
y
subject to the initial condition y ( 0 )=−5 .
∫ y dy =∫ x 2 dx
2 3
y x
= +C 0
2 3
4. Solve for y:
y2 x3
= +C 0
2 3
3
2 2x
y= +C
3
√
3
2x
y=± +C
3
Note that we get two possible solutions from the ±. If we didn't have an initial condition, then we
2 x3
would leave the ± in the final answer, or we would stop at the implicit solution y 2= +C . In
3
this case, since we have an initial condition, we'll decide which one we want when we apply the
it in the next step:
¿ ± √C
−5=±
√ 2. 0
3
+C
Since we have a negative number on the LHS, we'll use the negative square root for our solution
function.
−5=−√ C
5=√C
25=C
Problem exercise: