MINDANAO STATE UNIVERSITY – GENERAL SANTOS CITY
COLLEGE OF ENGINEERING
DEPARTMENT OF CIVIL ENGINEERING
Engineering Mathematics
Chapter 2: Separable Ordinary Differential Equations
Lesson Objectives:
1. Solve differential equation problems using Method of Variable Separation.
2. Define homogeneous differential equations.
3. Apply Method of Variable Separation in solving homogeneous differential equations.
__________________________________________________________________________________________________
Some ordinary differential equations can be easily manipulated algebraically to separate its variables. This is one
method of solving ODEs. This chapter discusses the procedure of this method as well as its application in various
engineering and physics problems.
I. Separation of Variables
Many practically useful ODEs can be reduced to the form,
𝑔(𝑦) 𝑑𝑦 + 𝑓(𝑥) 𝑑𝑥 = 0
by purely algebraic manipulations. That is, the variables can be separated; 𝑥 only appears on one term and 𝑦 only on the
other. After transforming a given ODE into this form, we can easily obtain a solution by integrating both sides of the
equation
∫ 𝑔(𝑦) 𝑑𝑦 + ∫ 𝑓(𝑥) 𝑑𝑥 = 𝑐
If 𝑓 and 𝑔 are continuous functions, the integrals exist, and by evaluating them we obtain a general solution.
Examples:
1. Find a solution to the ODE (1 + 𝑥)𝑑𝑦 − 𝑦𝑑𝑥 = 0.
Solution: Using algebraic manipulations, we can easily separate the variables of the given ODE,
(1 + 𝑥)𝑑𝑦 − 𝑦𝑑𝑥 = 0
𝑑𝑦 𝑑𝑥
− =0
𝑦 (1 + 𝑥)
Now that the variables are separated, we can proceed to integration,
𝑑𝑦 𝑑𝑥
∫ −∫ = ∫0
𝑦 (1 + 𝑥)
ln|𝑦| − ln|1 + 𝑥| = 𝑐
𝑦
ln | |=𝑐
1+𝑥
Applying Laws of exponents,
𝑦
ln| |
𝑒 1+𝑥 = 𝑒𝑐
𝒚
= 𝒄𝟏
𝟏+𝒙
Where 𝑐1 = 𝑒 𝑐 . This is now our solution and it can also be written as 𝑦 = 𝑐1 (1 + 𝑥).
The solution obtained in this problem contains the arbitrary constant 𝑐, this solution is called a general solution.
On the other hand, a solution that is free of arbitrary constant/s is called a particular solution. A particular solution can
be obtained from a general solution with the help of given conditions. If the initial condition is given, the problem is called
an initial value problem (IVP).
2. Solve the initial value problem 𝑦 ′ = −2𝑥𝑦, 𝑦(0) = 1.8.
Solution: Again, first thing that you should do is separate the variables algebraically,
𝑑𝑦
= −2xy
𝑑𝑥
𝑑𝑦
= −2𝑥 𝑑𝑥
𝑦
𝑑𝑦
+ 2𝑥 𝑑𝑥 = 0
𝑦
Integrating both sides,
𝑑𝑦
∫ + ∫ 2𝑥 𝑑𝑥 = ∫ 0
𝑦
ln|𝑦| + 𝑥 2 = 𝑐
Applying Laws of exponents,
2
𝑒 ln|𝑦|+𝑥 = 𝑒 𝑐
𝟐
𝒚𝒆𝒙 = 𝒄𝟏 ; 𝑐1 = 𝑒 𝑐
This is the general solution. Using this solution and the given initial condition,
2
1.8𝑒 0 = 𝑐1
1.8 = 𝑐1
𝟐
Therefore, the IVP has the particular solution 𝒚𝒆𝒙 = 𝟏. 𝟖 .
𝑑𝑥
3. Obtain the general and particular solution of the given initial value problem: 𝑑𝑡 = 4(𝑥 2 + 1), 𝑥(𝜋/4) = 1.
Solution: Separating the variables,
𝑑𝑥
= 4(𝑥 2 + 1)
𝑑𝑡
𝑑𝑥
= 4 𝑑𝑡
(𝑥 2 + 1)
𝑑𝑥
− 4 𝑑𝑡 = 0
(𝑥 2+ 1)
Integrating both sides,
𝑑𝑥
∫ − ∫ 4 𝑑𝑡 = ∫ 0
𝑥2 + 1
𝐚𝐫𝐜𝐭𝐚𝐧 𝒙 − 𝟒𝒕 = 𝒄
This is the general solution. Using this solution and the given initial condition,
𝜋
arctan 1 − 4 ( ) = 𝑐
4
3𝜋
𝑐=−
4
𝟑𝝅 𝟑𝝅
Therefore, the particular solution is 𝐚𝐫𝐜𝐭𝐚𝐧 𝒙 − 𝟒𝒕 = − 𝟒
or 𝒙 = 𝐭𝐚𝐧 (𝟒𝒕 − 𝟒
) .
III. Homogeneous ODEs
Certain ODEs might have variables that cannot be separated easily using algebraic manipulations. The next section
will discuss a technique that will enable the use of the variable separation method for these types of ODEs. The technique
can only be applied for homogeneous ODEs, that is all terms are of the same degree. A formal definition of homogeneity
is: The function f(x, y) is said to be homogeneous of nth degree in x and y if, and only if,
𝑓(𝑘𝑥, 𝑘𝑦) = 𝑘 𝑛 𝑓(𝑥, 𝑦).
Examples:
1. Determine whether the function 𝑓(𝑥, 𝑦) = 4𝑥 2 − 3𝑥𝑦 + 𝑦 2 is homogeneous or not. If it is homogeneous, state
the degree of the function.
Solution: Using the formal definition of homogeneity,
𝑓(𝑘𝑥, 𝑘𝑦) = 4(𝑘𝑥)2 − 3(𝑘𝑥)(𝑘𝑦) + (𝑘𝑦)2
𝑓(𝑘𝑥, 𝑘𝑦) = 4𝑘 2 𝑥 2 − 3𝑘 2 𝑥𝑦 + 𝑘 2 𝑦 2
𝑓(𝑘𝑥, 𝑘𝑦) = 𝑘 2 (4𝑥 2 − 3𝑥𝑦 + 𝑦 2 )
𝑓(𝑘𝑥, 𝑘𝑦) = 𝒌𝟐 𝑓(𝑥, 𝑦)
The function is homogeneous to the 2nd degree.
2. Determine whether the function 𝑓(𝑥, 𝑦) = 𝑥 3 − 𝑥𝑦 + 𝑦 3 is homogeneous or not. If it is homogeneous, state
the degree of the function.
Solution: Using the formal definition of homogeneity,
𝑓(𝑘𝑥, 𝑘𝑦) = (𝑘𝑥)3 − (𝑘𝑥)(𝑘𝑦) + (𝑘𝑦)3
𝑓(𝑘𝑥, 𝑘𝑦) = 𝑘 3 𝑥 3 − 𝑘 2 𝑥𝑦 + 𝑘 3 𝑦 3
𝑓(𝑘𝑥, 𝑘𝑦) = 𝑘 2 (𝒌𝑥 3 − 𝑥𝑦 + 𝒌𝑦 3 )
The function is not homogeneous.
𝑥5
3. Determine whether the function 𝑓(𝑥, 𝑦) = 𝑥 2 +2𝑦 2
is homogeneous or not. If it is homogeneous, state the
degree of the function.
Solution: Using the formal definition of homogeneity,
(𝑘𝑥)5
𝑓(𝑘𝑥, 𝑘𝑦) =
(𝑘𝑥)2 + 2(𝑘𝑦)2
𝑘5𝑥5
𝑓(𝑘𝑥, 𝑘𝑦) =
𝑘 2 𝑥 2 + 2𝑘 2 𝑦 2
𝑘5 𝑥5
𝑓(𝑘𝑥, 𝑘𝑦) = ( )
𝑘 2 𝑥 2 + 2𝑦 2
𝑓(𝑘𝑥, 𝑘𝑦) = 𝒌𝟑 𝑓(𝑥, 𝑦)
The function is homogeneous to the 3rd degree.
IV. Separation of Variables with U-substitution
As stated in the previous section, this technique can only be applied on homogeneous ODEs. Check first if the function is
homogeneous before using this method. Now consider the ODE,
𝑦
𝑦 ′ = 𝑓 (𝑥 ).
𝑦
Next, we will introduce a new variable 𝑢 and let this be equal to 𝑥 ;thus 𝒚 = 𝒖𝒙. And by product differentiation,
𝑦 ′ = 𝑢′ 𝑥 + 𝑢
Substituting this to the first equation and applying some algebraic manipulations,
𝑦
𝑢′ 𝑥 + 𝑢 = 𝑓 ( )
𝑥
𝑢′ 𝑥 + 𝑢 = 𝑓(𝑢)
𝑢′ 𝑥 = 𝑓(𝑢) − 𝑢
𝑑𝑢
𝑥 = 𝑓(𝑢) − 𝑢
𝑑𝑥
𝑑𝑢 𝑑𝑥
=
𝑓(𝑢) − 𝑢 𝑥
We can see that the variables are now separated and if 𝑓(𝑢) – 𝑢 ≠ 0, we can proceed with the method in solving the ODE
that we used in Section 1 and 2 above.
Examples:
1. Solve the equation (𝑥 2 − 𝑥𝑦 + 𝑦 2 ) − 𝑥𝑦𝑦′ = 0.
Solution: Each term is of degree two, therefore the ODE is homogeneous. If we substitute 𝒚 = 𝒖𝒙 and
𝒚′ = 𝒖′ 𝒙 + 𝒖 our equation becomes,
[𝑥 2 − 𝑥(𝑢𝑥) + (𝑢𝑥)2 ] − 𝑥(𝑢𝑥)(𝑢′ 𝑥 + 𝑢) = 0
[𝑥 2 − 𝑢𝑥 2 + 𝑢2 𝑥 2 ] − 𝑢𝑥 2 (𝑢′ 𝑥 + 𝑢) = 0
Dividing both sides by 𝑥 2 ,
1 − 𝑢 + 𝑢2 − 𝑢(𝑢′ 𝑥 + 𝑢) = 0
1 − 𝑢 + 𝑢2 − 𝑢𝑢′ 𝑥 − 𝑢2 = 0
1 − 𝑢 − 𝑢𝑢′ 𝑥 = 0
𝑑𝑢
1 − 𝑢 = 𝑢𝑥
𝑑𝑥
𝑑𝑥 𝑢
= 𝑑𝑢
𝑥 1−𝑢
The variables are separated and now we can proceed with integration,
𝑑𝑥 𝑢
− 𝑑𝑢 = 0
𝑥 1−𝑢
𝑑𝑥 𝑢
+ 𝑑𝑢 = 0
𝑥 𝑢−1
𝑑𝑥 1
∫ + ∫ (1 + ) 𝑑𝑢 = ∫ 0
𝑥 𝑢−1
ln|𝑥| + 𝑢 + ln|𝑢 − 1| = 𝑐
𝑥(𝑒 𝑢 )(𝑢 − 1) = 𝑐
In terms of the original variables,
𝑦 𝑦
𝑥 ( − 1) 𝑒 𝑥 = 𝑐
𝑥
𝒚
(𝒚 − 𝒙)𝒆𝒙 = 𝒄
2. Solve the equation 𝑥𝑦 𝑑𝑥 + (𝑥 2 + 𝑦 2 )𝑑𝑦 = 0.
Solution: By definition, the given ODE is homogeneous. We could substitute 𝑦 = 𝑢𝑥, but the relative simplicity of
the term with 𝑑𝑥 suggests that we use 𝒙 = 𝒖𝒚 and its derivative 𝒙′ = 𝒖′ 𝒚 + 𝒖.
𝑥𝑦𝑥 ′ + (𝑥 2 + 𝑦 2 ) = 0
(𝑢𝑦)𝑦(𝑢′ 𝑦 + 𝑢) + (𝑢𝑦)2 + 𝑦 2 = 0
𝑢𝑦 2 (𝑢′ 𝑦 + 𝑢) + 𝑢2 𝑦 2 + 𝑦 2 = 0
Dividing both sides by 𝑦 2 ,
𝑢(𝑢′ 𝑦 + 𝑢) + 𝑢2 + 1 = 0
𝑑𝑢
𝑢𝑦 + 𝑢2 + 𝑢2 + 1 = 0
𝑑𝑦
𝑑𝑢
2𝑢2 + 1 = −𝑢𝑦
𝑑𝑦
𝑑𝑦 𝑢 𝑑𝑢
=− 2
𝑦 2𝑢 + 1
The variables are separated and now we can proceed with integration,
𝑑𝑦 𝑢 𝑑𝑢
∫ +∫ 2 = ∫0
𝑦 2𝑢 + 1
1
ln|𝑦| + ln|2𝑢2 + 1| = 𝑐
4
4 ln|𝑦| + ln|2𝑢2 + 1| = 𝑐
𝑦 4 (2𝑢2 + 1) = 𝑐
In terms of the original variables,
2𝑥 2
𝑦 4 ( 2 + 1) = 𝑐
𝑦
𝒚𝟐 (𝟐𝒙𝟐 + 𝒚𝟐 ) = 𝒄