You are on page 1of 6

Cagayan State University–Carig Campus

COLLEGE OF ENGINEERING
DEPARTMENT OF CIVIL ENGINEERING

LECTURE MODULE 4
DIFFERENTIAL EQUATIONS: CHAPTER 2

TOPIC 4
SEPARATION OF VARIABLES
It was discussed in the first module how to classify a differential equation according to its type, degree, order
and linearity. In Chapter 2, we are going to study all the different solutions in solving a differential equation in the
first order and first degree. There are several solutions in solving these types of differential equations but each one
must follow a particular condition in order to use the solution.

A differential equation may also be solved in more than one solution and it is up to you, students, what to use
for as long as the equation satisfies the condition for the particular solution. Each solution will be presented then
according to the level of difficulty.

At the end of this lesson, the student will be able to:

1. examine the first solution to solve a first-order first-degree differential equation;


2. perform and method separation of variables including initial-value problems.

1.1 Separation of Variables

The solution for separation of variables is used if the function containing both the derivatives of the dependent and
independent variable may be factored completely thus, we can separate the variables.

If the general differential equation 𝑀(𝑥, 𝑦)𝑑𝑥 + 𝑁(𝑥, 𝑦)𝑑𝑦 = 0 can be factored into

𝑀(𝑥)𝑀(𝑦)𝑑𝑥 + 𝑁(𝑥)𝑁(𝑦)𝑑𝑦 = 0,

it can be written in the form 𝑨(𝒙)𝒅𝒙 + 𝑩(𝒚)𝒅𝒚 = 𝟎 by grouping all functions and derivatives of 𝑥 and 𝑦, separately.

This is made possible if we divide the entire equation by 𝑀(𝑦)𝑁(𝑥) such as,

𝑀(𝑥, 𝑦)𝑑𝑥 + 𝑁(𝑥, 𝑦)𝑑𝑦 = 0


𝑀(𝑥)𝑀(𝑦)𝑑𝑥 + 𝑁(𝑥)𝑁(𝑦)𝑑𝑦 = 0
𝑀(𝑦)𝑁(𝑥)
𝑀(𝑥)𝑀(𝑦)𝑑𝑥 𝑁(𝑥)𝑁(𝑦)𝑑𝑦
+ =0
𝑀(𝑦)𝑁(𝑥) 𝑀(𝑦)𝑁(𝑥)
𝑀(𝑥)𝑑𝑥 𝑁(𝑦)𝑑𝑦
+ =0
𝑁(𝑥) 𝑀(𝑦)

𝑀(𝑥) 𝑁(𝑦) 𝑀(𝑥)


Here, we can notice that 𝑁(𝑥) is purely a function of 𝑥 and 𝑀(𝑦) is purely a function of 𝑦. By allowing 𝐴(𝑥) = 𝑁(𝑥) and
𝑁(𝑦)
𝐵(𝑦) = , we create rational functions of 𝐴(𝑥) and 𝐵(𝑦).
𝑀(𝑦)

The solution is in the form of 𝑭(𝒙, 𝒚) = 𝑪.

Example 1:

Find the general solution of the equation (𝑥𝑦 + 𝑥)𝑑𝑥 = (𝑥 2 𝑦 2 + 𝑥 2 + 𝑦 2 + 1)𝑑𝑦.

Solution:

Factor 𝑀(𝑥, 𝑦) and 𝑁(𝑥, 𝑦) into 𝑀(𝑥)𝑀(𝑦) and 𝑁(𝑥)𝑁(𝑦), respectively. First, we will arrange the differential equation.

ENGR. ARISTON C. TALOSIG 1 | Page


Cagayan State University–Carig Campus
COLLEGE OF ENGINEERING
DEPARTMENT OF CIVIL ENGINEERING

LECTURE MODULE 4
DIFFERENTIAL EQUATIONS: CHAPTER 2

(𝑥𝑦 + 𝑥)𝑑𝑥 = (𝑥 2 𝑦 2 + 𝑥 2 + 𝑦 2 + 1)𝑑𝑦

Arrange the equation in the form 𝑀(𝑥, 𝑦)𝑑𝑥 + 𝑁(𝑥, 𝑦)𝑑𝑦 = 0.

(𝑥𝑦 + 𝑥)𝑑𝑥 − (𝑥 2 𝑦 2 + 𝑥 2 + 𝑦 2 + 1)𝑑𝑦 = 0

We can now identify that 𝑀(𝑥, 𝑦) = (𝑥𝑦 + 𝑥) and 𝑁(𝑥, 𝑦) = −(𝑥 2 𝑦 2 + 𝑥 2 + 𝑦 2 + 1). Factor 𝑀(𝑥, 𝑦) and 𝑁(𝑥, 𝑦) into
𝑀(𝑥)𝑀(𝑦) and 𝑁(𝑥)𝑁(𝑦), respectively.

(𝑥𝑦 + 𝑥)𝑑𝑥 − (𝑥 2 𝑦 2 + 𝑥 2 + 𝑦 2 + 1)𝑑𝑦 = 0


𝑥(𝑦 + 1)𝑑𝑥 − [𝑥 2 (𝑦 2 + 1) + (𝑦 2 + 1)]𝑑𝑦 = 0
𝑥(𝑦 + 1)𝑑𝑥 − (𝑥 2 + 1)(𝑦 2 + 1)𝑑𝑦 = 0

We can see that 𝑀(𝑦) = (𝑦 + 1) and 𝑁(𝑥) = (𝑥 2 + 1). Separate the variables by dividing the entire equation by
𝑀(𝑦)𝑁(𝑥).

𝑥(𝑦 + 1)𝑑𝑥 − (𝑥 2 + 1)(𝑦 2 + 1)𝑑𝑦 = 0


𝑥(𝑦 + 1)𝑑𝑥 − (𝑥 2 + 1)(𝑦 2 + 1)𝑑𝑦 = 0
(𝑦 + 1)(𝑥 2 + 1)
𝑥(𝑦 + 1) (𝑥 2 + 1)(𝑦 2 + 1)
𝑑𝑥 − 𝑑𝑦 = 0
(𝑦 + 1)(𝑥 2 + 1) (𝑦 + 1)(𝑥 2 + 1)
𝑥 (𝑦 2 + 1)
𝑑𝑥 − 𝑑𝑦 = 0
𝑥2 + 1 𝑦+1

Integrate the equation. (You must have mastered both Calculus 1 and 2 before taking Differential Equations.)
𝑥 𝑦 2 +1
By letting 𝑢 = 𝑥 2 + 1, you can easily integrate 𝑥2+1 𝑑𝑥. However, 𝑦+1
is an improper rational function. Therefore, you
need to divide 𝑦 + 1 by 𝑦 + 1 to decompose.
2

𝑥 (𝑦 2 + 1)
∫ 𝑑𝑥 − ∫ 𝑑𝑦 = ∫ 0
𝑥2 + 1 𝑦+1
𝑥 2
∫ 𝑑𝑥 − ∫ [𝑦 − 1 + ] 𝑑𝑦 = 0
𝑥2 +1 𝑦+1
1 1
ln|𝑥 2 + 1| − 𝑦 2 + 𝑦 − 2 ln|𝑦 + 1| = 𝐶
2 2

Multiply the equation by 2.

ln|𝑥 2 + 1| − 𝑦 2 + 2𝑦 − 4 ln|𝑦 + 1| = 2𝐶

2𝐶 is still a constant, you may simplify it to just a single constant 𝐶.

ln|𝑥 2 + 1| − 𝑦 2 + 2𝑦 − 4 ln|𝑦 + 1| = 𝐶

𝑎
From the laws of logarithms, 𝑎 ln 𝑏 = ln 𝑏 𝑎 and ln 𝑎 − ln 𝑏 = ln . Simplifying the solution would be,
𝑏

ln|𝑥 2 + 1| − 𝑦 2 + 2𝑦 − 4 ln|𝑦 + 1| = 𝐶
ln|𝑥 2 + 1| − 𝑦 2 + 2𝑦 − ln|𝑦 + 1|4 = 𝐶
𝒙𝟐 + 𝟏
𝐥𝐧 | | − 𝒚𝟐 + 𝟐𝒚 = 𝑪
(𝒚 + 𝟏)𝟒

Example 2:

Find the general solution of the equation 𝑥𝑑𝑥 + 𝑦𝑑𝑦 = 0.

See next page for the solution.

ENGR. ARISTON C. TALOSIG 2 | Page


Cagayan State University–Carig Campus
COLLEGE OF ENGINEERING
DEPARTMENT OF CIVIL ENGINEERING

LECTURE MODULE 4
DIFFERENTIAL EQUATIONS: CHAPTER 2

Solution:

The equation is already in its factored and simplest form. All you need to do is integrate.

∫ 𝑥 𝑑𝑥 + ∫ 𝑦 𝑑𝑦 = ∫ 0

𝑥 2 𝑦2
+ =𝐶
2 2

Simplify,

𝑥 2 + 𝑦 2 = 2𝐶
𝒙𝟐 + 𝒚 𝟐 = 𝑪

Example 3:

Find the general solution of the equation (1 − 𝑥)𝑦 ′ = 𝑦 2 .

Solution:

(1 − 𝑥)𝑦 ′ = 𝑦 2
𝑑𝑦
(1 − 𝑥) = 𝑦2
𝑑𝑥
(1 − 𝑥)𝑑𝑦 = 𝑦 2 𝑑𝑥
𝑦 2 𝑑𝑥 − (1 − 𝑥)𝑑𝑦 = 0

Group all 𝑥 together, so with 𝑦.

𝑦 2 𝑑𝑥 − (1 − 𝑥)𝑑𝑦 = 0
𝑦 2 𝑑𝑥 − (1 − 𝑥)𝑑𝑦 = 0
(1 − 𝑥)𝑦 2
𝑦2 (1 − 𝑥)
2
𝑑𝑥 − 𝑑𝑦 = 0
(1 − 𝑥)𝑦 (1 − 𝑥)𝑦 2
𝑑𝑥 𝑑𝑦
− =0
1 − 𝑥 𝑦2
𝑑𝑥 𝑑𝑦
∫ − ∫ 2 = ∫0
1−𝑥 𝑦
𝑑𝑥
∫ − ∫ 𝑦 −2 𝑑𝑦 = ∫ 0
1−𝑥
𝑦 −1
− ln|1 − 𝑥| − =𝐶
−1
1
− ln|1 − 𝑥| + = 𝐶
𝑦
−𝒚 𝐥𝐧|𝟏 − 𝒙| + 𝟏 = 𝑪𝒚

Example 4:

Find the general solution of the equation sin 𝑥 sin 𝑦 𝑑𝑥 + cos 𝑥 cos 𝑦 𝑑𝑦 = 0.

Solution:

sin 𝑥 sin 𝑦 𝑑𝑥 + cos 𝑥 cos 𝑦 𝑑𝑦 = 0

Again, group all 𝑥 together, so with 𝑦.

ENGR. ARISTON C. TALOSIG 3 | Page


Cagayan State University–Carig Campus
COLLEGE OF ENGINEERING
DEPARTMENT OF CIVIL ENGINEERING

LECTURE MODULE 4
DIFFERENTIAL EQUATIONS: CHAPTER 2

sin 𝑥 sin 𝑦 𝑑𝑥 + cos 𝑥 cos 𝑦 𝑑𝑦 = 0


sin 𝑥 sin 𝑦 𝑑𝑥 + cos 𝑥 cos 𝑦 𝑑𝑦 = 0
cos 𝑥 sin 𝑦
sin 𝑥 sin 𝑦 cos 𝑥 cos 𝑦
𝑑𝑥 + 𝑑𝑦 = 0
cos 𝑥 sin 𝑦 cos 𝑥 sin 𝑦
sin 𝑥 cos 𝑦
𝑑𝑥 + 𝑑𝑦 = 0
cos 𝑥 sin 𝑦
tan 𝑥 𝑑𝑥 + cot 𝑦 𝑑𝑦 = 0

∫ tan 𝑥 𝑑𝑥 + ∫ cot 𝑦 𝑑𝑦 = ∫ 0

ln|sin 𝑥| − ln|cos 𝑥| = 𝐶
sin 𝑥
ln | |=𝐶
cos 𝑥

From laws of natural logarithms, 𝑙𝑜𝑔𝑎 𝑏 = 𝑐 in exponential form is, 𝑎𝑐 = 𝑏 . Since ln 𝑎 = 𝑙𝑜𝑔𝑒 𝑎 , then

sin 𝑥
ln | |=𝐶
cos 𝑥
sin 𝑥
log e | |=𝐶
cos 𝑥
sin 𝑥
𝑒𝐶 =
cos 𝑥

Since 𝑒 and 𝐶 are both constants, then 𝑒 𝐶 as whole, is constant.

𝑪 𝐜𝐨𝐬 𝒙 = 𝐬𝐢𝐧 𝒙

Initial-Value Problems (IVP)

We are often interested in problems in which we seek a solution 𝑦(𝑥) of a differential equation so that 𝑦(𝑥) also
satisfies certain prescribed side conditions – that is, conditions that are imposed on the unknown function 𝑦(𝑥) and
its derivatives at a point 𝑥0 . On some interval I containing 𝑥0 , the problem of solving an nth-order differential equation
subject to n side conditions specified at 𝑥0 :

𝑑𝑛 𝑦
Solve: 𝑑𝑥 𝑛
= 𝑓(𝑥, 𝑦, 𝑦 ′ , … , 𝑦 (𝑛−1) )

Subject to: 𝑦(𝑥0 ) = 𝑦0 , 𝑦 ′ (𝑥0 ) = 𝑦1 , … , 𝑦 (𝑛−1) (𝑥0 ) = 𝑦𝑛−1

where 𝑦0 , 𝑦1 , … , 𝑦𝑛−1 are arbitrary real constants, is called an nth-order initial-value problem (IVP). The values of
𝑦(𝑥) and its first 𝑛 − 1 derivatives at 𝑥0 , 𝑦(𝑥0 ) = 𝑦0 , 𝑦 ′ (𝑥0 ) = 𝑦1 , … , 𝑦 (𝑛−1) (𝑥0 ) = 𝑦𝑛−1 are called initial conditions (IC).

Solving an nth-order initial-value problem frequently entails first finding an n-parameter family of solutions of the
given differential equation and then using the initial conditions at 𝑥0 to determine the n constants in this family.

The objective of an IVP is to create particular solutions, by determining the value of constant 𝐶, defined on some
interval I containing the initial point 𝑥0 .

Example 5:

Solve the initial-value problem, 𝑑𝑥 + 𝑑𝑦 = 0; 𝑦(0) = 1.

Solution:

The given equation is very simple and easy. Directly integrate the equation in order to get the solution.

See next page for the continuation of solution.

ENGR. ARISTON C. TALOSIG 4 | Page


Cagayan State University–Carig Campus
COLLEGE OF ENGINEERING
DEPARTMENT OF CIVIL ENGINEERING

LECTURE MODULE 4
DIFFERENTIAL EQUATIONS: CHAPTER 2

∫ 𝑑𝑥 + ∫ 𝑑𝑦 = ∫ 0
𝑥+𝑦=𝐶

Substitute the initial condition 𝑦(0) = 1. This means that when 𝑥 = 0, 𝑦 = 1.

𝑥+𝑦=𝐶
0+1=𝐶
𝐶=1

The particular solution, therefore is 𝒙 + 𝒚 = 𝟏.

Example 6:

Solve the initial-value problem, 𝑒 𝑥 𝑒 𝑦 𝑑𝑥 − 𝑒 −2𝑦 𝑑𝑦 = 0; 𝑦(0) = 0.

Solution:

First, find for the general solution of the equation.

𝑒 𝑥 𝑒 𝑦 𝑑𝑥 − 𝑒 −2𝑦 𝑑𝑦 = 0
𝑒 𝑥 𝑒 𝑦 𝑑𝑥 − 𝑒 −2𝑦 𝑑𝑦 = 0
𝑒𝑦
𝑒 −2𝑦
𝑒 𝑥 𝑑𝑥 − 𝑦 𝑑𝑦 = 0
𝑒
𝑥 −2𝑦−𝑦
𝑒 𝑑𝑥 − 𝑒 𝑑𝑦 = 0
𝑒 𝑥 𝑑𝑥 − 𝑒 −3𝑦 𝑑𝑦 = 0

∫ 𝑒 𝑥 𝑑𝑥 − ∫ 𝑒 −3𝑦 𝑑𝑦 = ∫ 0

1
𝑒 𝑥 − (− 𝑒 −3𝑦 ) = 𝐶
3
1
𝑒 𝑥 + 𝑒 −3𝑦 = 𝐶
3

Multiply the equation by 3.

1
3 ∗ (𝑒 𝑥 + 𝑒 −3𝑦 = 𝐶)
3
3𝑒 𝑥 + 𝑒 −3𝑦 = 3𝐶
3𝑒 𝑥 + 𝑒 −3𝑦 = 𝐶

Substitute the initial condition 𝑦(0) = 0. This means that when 𝑥 = 0, 𝑦 = 0.

3𝑒 𝑥 + 𝑒 −3𝑦 = 𝐶
3𝑒 (0) + 𝑒 −3(0) = 𝐶
3(1) + 1 = 𝐶
𝐶=4

The particular solution, therefore is 𝟑𝒆𝒙 + 𝒆−𝟑𝒚 = 𝟒.

ENGR. ARISTON C. TALOSIG 5 | Page


Cagayan State University–Carig Campus
COLLEGE OF ENGINEERING
DEPARTMENT OF CIVIL ENGINEERING

LECTURE MODULE 4
DIFFERENTIAL EQUATIONS: CHAPTER 2

By separation of variables, find the solution to the following differential equations.

1. 𝑥(1 + 𝑦 2 )𝑑𝑥 − 𝑦(1 + 2𝑥 2 ) = 0 Ans. 1 + 2𝑥 2 = 𝐶(1 + 𝑦 2 )2


2. 𝑦𝑒 3𝑥 𝑑𝑥 = (4 + 𝑒 3𝑥 )𝑑𝑦 Ans. 4 + 𝑒 3𝑥 = 𝐶𝑦 3
1 𝜋
3. √1 − 𝑦 2 𝑑𝑥 = √1 − 𝑥 2 𝑑𝑦; 𝑦(1) = 2 Ans. arcsin 𝑥 − arcsin 𝑦 =
3

1. What is the most important thing you learned? Why do you think so?
2. What surprised you on the things you learned on this topic?
3. What could be the hardest process regarding this topic?

Canva. (n.d.). Retrieved from Canva: www.canva.com


Zill, D. G., & Wright, W. S. (2013). Succeeding with Differential Equations (8th Edition). Cengage Learning.

ENGR. ARISTON C. TALOSIG 6 | Page

You might also like