You are on page 1of 4

Engineering Mathematics I Lecture 4: First Order ODE Prof. Dr.

Emad Al-Hemiary
Second Year, First Semester 2021-2022

Separable First-Order ODE

General Solution
The solution to the first-order separable differential equation:
𝐴(𝑥)𝑑𝑥 + 𝐵(𝑦)𝑑𝑦 = 0 (4.1)
is

∫ 𝐴(𝑥)𝑑𝑥 + ∫ 𝐵(𝑦)𝑑𝑦 = 𝑐 (4.2)

where 𝑐 represents an arbitrary constant.

Solution to the Initial Value Problem


The solution to the initial-value problem
𝐴(𝑥)𝑑𝑥 + 𝐵(𝑦)𝑑𝑦 = 0; 𝑦(𝑥0 ) = 𝑦0 (4.3)
can be obtained, as usual, by first solve the differential equation in general and then applying
the initial condition directly to evaluate c.
Alternatively, the solution can be obtained from:
𝑥 𝑦
∫ 𝐴(𝑥)𝑑𝑥 + ∫ 𝐵(𝑦)𝑑𝑦 = 0 (4.4)
𝑥0 𝑦0

However, the above solution may not determine the solution uniquely: that is, it may have many
solutions, of which only one will satisfy the initial-value problem.

Example 4.1: Solve 𝑥𝑑𝑥 − 𝑦 2 𝑑𝑦 = 0.


Solution:
Comparing this DE with Eq. 4.1:
𝐴(𝑥) = 𝑥
𝐵(𝑦) = 𝑦 2
Thus, from the general solution in Eq. 4.2:

2 )𝑑𝑦
𝑥2 𝑦3 𝑦3 𝑥2
∫ 𝐴(𝑥)𝑑𝑥 + ∫ 𝐵(𝑦)𝑑𝑦 = 𝑐 → ∫ 𝑥𝑑𝑥 + ∫(−𝑦 =𝑐→ − =𝑐→ = −𝑐
2 3 3 2
1
3𝑥 2 3
∴𝑦=( + 𝑘) 𝑘 = −3𝑐
2

1
Engineering Mathematics I Lecture 4: First Order ODE Prof. Dr. Emad Al-Hemiary
Second Year, First Semester 2021-2022

Example 4.2: Solve 𝑦 ′ = 1 + 𝑦 2.


Solution: This DE is separable:
𝑑𝑦 1 1
𝑦′ = = 1 + 𝑦2 → 2
𝑑𝑦 = 𝑑𝑥 → −𝑑𝑥 + 𝑑𝑦 = 0
𝑑𝑥 1+𝑦 1 + 𝑦2
1
∫(−1)𝑑𝑥 + ∫ ( ) 𝑑𝑦 = 𝑐 → −𝑥 + tan−1 𝑦 = 𝑐 → tan−1 𝑦 = 𝑥 + 𝑐 → 𝑦 = tan(𝑥 + 𝑐)
1 + 𝑦2
∴ 𝑦 = tan(𝑥 + 𝑐)
Example 4.2: Solve 𝑦 ′ = (𝑥 + 1)𝑒 −𝑥 𝑦 2.
Solution: This DE is separable:
𝑑𝑦 1
𝑦′ = = (𝑥 + 1)𝑒 −𝑥 𝑦 2 → (𝑥 + 1)𝑒 −𝑥 𝑑𝑥 − 2 𝑑𝑦 = 0
𝑑𝑥 𝑦
1
∫(𝑥 + 1)𝑒 −𝑥 𝑑𝑥 + ∫ (− ) 𝑑𝑦 = 𝑐
𝑦2
We integrate the first term by parts while the second term is integrated directly:

𝐿𝑒𝑡 𝑢 = 𝑥 + 1 → 𝑑𝑢 = 𝑑𝑥, 𝑑𝑣 = 𝑒 −𝑥 𝑑𝑥 → 𝑣 = −𝑒 −𝑥 {𝑢𝑣 − ∫ 𝑣𝑑𝑢}

1 1 1
−𝑒 −𝑥 (𝑥 + 1) + ∫ 𝑒 −𝑥 𝑑𝑥 + = 𝑐 → −𝑒 −𝑥 (𝑥 + 1) − 𝑒 −𝑥 + = 𝑐 → = 𝑐 + 𝑒 −𝑥 (𝑥 + 1) + 𝑒 −𝑥
𝑦 𝑦 𝑦
1
∴𝑦=
𝑐+ 𝑒 −𝑥 (𝑥 + 2)
Example 4.3: Solve 𝑦 ′ = −2𝑥𝑦; 𝑦(0) = 1.8
Solution: This DE is separable:
𝑑𝑦 1 1 2
= −2𝑥𝑦 → 2𝑥𝑑𝑥 + 𝑑𝑦 = 0 → ∫ 2𝑥𝑑𝑥 + ∫ 𝑑𝑦 = 𝑐 → 𝑥 2 + ln 𝑦 = 𝑐 → 𝑦 = 𝑒 𝑐−𝑥
𝑑𝑥 𝑦 𝑦
2
∴ 𝑦 = 𝑘𝑒 −𝑥 (𝑘 = 𝑒 𝑐 )
Substituting 𝑦(0) = 1.8 → 1.8 = 𝑘𝑒 0 → 𝑘 = 1.8
2
∴ 𝑦 = 1.8𝑒 −𝑥

2
Engineering Mathematics I Lecture 4: First Order ODE Prof. Dr. Emad Al-Hemiary
Second Year, First Semester 2021-2022

Extended Method for solving First-Order ODE


𝑦
Given 𝑦 ′ = 𝑓 (𝑥 ), then we can reduce it to separable form as follows:
𝑦
Assume 𝑢 = 𝑥 → 𝑦 = 𝑢𝑥. Differentiate both sides with respect to 𝑥 gives:

𝑑𝑦 𝑑 𝑑𝑥 𝑑𝑢
= (𝑢𝑥) = 𝑢 +𝑥
𝑑𝑥 𝑑𝑥 𝑑𝑥 𝑑𝑥
Thus:
𝑦 𝑑𝑢 𝑑𝑢 𝒅𝒖 𝒅𝒙
𝑦′ = 𝑓 ( ) → 𝑢 + 𝑥 = 𝑓(𝑢) → 𝑥 = 𝑓(𝑢) − 𝑢 → =
𝑥 𝑑𝑥 𝑑𝑥 𝒇(𝒖) − 𝒖 𝒙
Example 4.4: Evaluate 2𝑥𝑦𝑦 ′ = 𝑦 2 − 𝑥 2
Solution:
Dividing both sides by 𝑥𝑦
𝑦 𝑥
2𝑦 ′ = −
𝑥 𝑦
𝑦
Let 𝑢 = 𝑥 → 𝑦 = 𝑢𝑥

1 1 1
2𝑦 ′ = 𝑢 − → 𝑦 ′ = (𝑢 − ) → 𝑦 ′ = 𝑓(𝑢)
𝑢 2 𝑢
𝑑𝑢 𝑑𝑥 𝑑𝑢 𝑑𝑥 𝑑𝑢 𝑑𝑥 𝑑𝑢 𝑑𝑥 −𝑢𝑑𝑢 𝑑𝑥
= → = → = → = → 2 =
𝑓(𝑢) − 𝑢 𝑥 1 1 𝑥 1 2𝑥 −𝑢 − 1 2𝑥 𝑢 + 1 2𝑥
(𝑢 − ) − 𝑢 (𝑢 − ) − 2𝑢
2 𝑢 𝑢 𝑢
−𝑢𝑑𝑢 𝑑𝑥 1 2 1
∫ 2
=∫ → − ln(𝑢2 + 1) = ln|𝑥| + 𝑐 → 𝑒 − ln(𝑢 +1) = 𝑒 (ln|𝑥|)+𝑐 → 2 = 𝑒𝑐𝑥
𝑢 +1 2𝑥 2 𝑢 +1
𝑘 𝑘
𝑢2 + 1 = → 𝑢2 = − 1, (𝑘 = 𝑒 𝑐 )
𝑥 𝑥
Since 𝑢 = 𝑦/𝑥, thus:
𝑦2 𝑘
= − 1 → 𝑦 2 = 𝑘𝑥 − 𝑥 2 → 𝒚𝟐 + 𝒙𝟐 = 𝒌𝒙
𝑥2 𝑥
𝒌 𝟐 𝟐
𝒌𝟐
(𝒙 − ) + 𝒚 =
𝟐 𝟒
The solution represents family of circles passing through origin with centers on the x-axis.

3
Engineering Mathematics I Lecture 4: First Order ODE Prof. Dr. Emad Al-Hemiary
Second Year, First Semester 2021-2022

𝑦
Example 4.5: Evaluate 𝑥𝑦 ′ = 𝑦 + 2𝑥 3 sin2 𝑥

Solution:
Dividing both sides by 𝑥, and substitute 𝑢 = 𝑦/𝑥 we get:
𝑦 𝑦
𝑦′ = + 2𝑥 2 sin2 → 𝑦 ′ = 𝑢 + 2𝑥 2 sin2 𝑢 → 𝑦 ′ = 𝑓(𝑢)
𝑥 𝑥
𝑑𝑢 𝑑𝑥 𝑑𝑢 𝑑𝑥 𝑑𝑢 𝑑𝑥 𝑑𝑢 2𝑥 2 𝑑𝑥 𝑑𝑢
= → 2 2
= → 2 2
= → 2
= → = 2𝑥𝑑𝑥
𝑓(𝑢) − 𝑢 𝑥 𝑢 + 2𝑥 sin 𝑢 − 𝑢 𝑥 2𝑥 sin 𝑢 𝑥 sin 𝑢 𝑥 sin2 𝑢
𝑑𝑢 𝑦
∫ 2
= ∫ 2𝑥𝑑𝑥 + 𝑐 → − cot 𝑢 = 𝑥 2 + 𝑐 → 𝑢 = cot −1(−𝑥 2 − 𝑐) → = cot −1 (−𝑥 2 − 𝑐) → 𝑦
sin 𝑢 𝑥
= 𝑥 cot −1 (−𝑥 2 − 𝑐) → 𝒚 = 𝒙 𝐜𝐨𝐭 −𝟏 (𝒌 − 𝒙𝟐 ) , 𝑘 = −𝑐

Example 4.5: Evaluate 𝑦 ′ = (𝑦 + 4𝑥)2 𝑠𝑒𝑡 𝑢 = 𝑦 + 4𝑥


Solution:
𝑑𝑢 𝑑𝑦 𝑑𝑥 𝑑𝑢 𝑑𝑦
If we set, 𝑢 = 𝑦 + 4𝑥 then 𝑑𝑥 = 𝑑𝑥 + 4 𝑑𝑥 → 𝑑𝑥 = 𝑑𝑥 + 4 𝑜𝑟 𝑢′ = 𝑦 ′ + 4

𝑑𝑢 𝑑𝑢
𝑦 ′ = (𝑦 + 4𝑥)2 → 𝑦 ′ = 𝑢2 → 𝑢′ − 4 = 𝑢2 → 𝑢′ = 𝑢2 + 4 → = 𝑢2 + 4 → 2 = 𝑑𝑥
𝑑𝑥 𝑢 +4
𝑑𝑢 1 𝑢 𝑢 𝑢
∫ = ∫ 𝑑𝑥 + 𝑐 → tan−1 = 𝑥 + 𝑐 → tan−1 = 2(𝑥 + 𝑐) → = tan 2(𝑥 + 𝑐)
𝑢2+4 2 2 2 2
∴ 𝑢 = 2 tan(2𝑥 + 𝑘) → 𝑦 + 4𝑥 = 2 tan(2𝑥 + 𝑘) → 𝒚 = 𝟐 𝐭𝐚𝐧(𝟐𝒙 + 𝒌) − 𝟒𝒙

Example 4.5: Evaluate 𝑥𝑦 ′ + 𝑦 = 0 𝑦(4) = 6


Solution:
1 ′ −1 𝑑𝑦 −𝑑𝑥 𝑑𝑦 −𝑑𝑥
𝑥𝑦 ′ + 𝑦 = 0 → 𝑥𝑦 ′ = −𝑦 → 𝑦 = → = →∫ =∫ + 𝑐 → ln 𝑦 = − ln 𝑥 + 𝑐
𝑦 𝑥 𝑦 𝑥 𝑦 𝑥
𝒌
𝑒 ln 𝑦 = 𝑒 − ln 𝑥+𝑐 → 𝒚 =
𝒙
Substitute 𝑦(4) = 6 yields:
𝑘
6= → 𝑘 = 24
4
Thus, the particular solution is:
𝟐𝟒
𝒚=
𝒙

You might also like