CE 207 Lecture 04 - Exact ODE and Integrating Factors
CE 207 Lecture 04 - Exact ODE and Integrating Factors
Lecture# 4
Exact ODEs
Adeeba Naz
Lecturer, Dept. of CE
Contact: [email protected]
Exact Equation (1)
➢ Consider an equation
𝑑𝑦 𝑠𝑖𝑛𝑦
𝑑𝑥
=
2𝑦 −𝑥𝑐𝑜𝑠𝑦
(1) sinydx + xcosy − 2y dy = 0 (2)
CE 207_Exact_ODEs
Exact Equation (2)
➢ To generalize…
𝑑𝑦 𝑀(𝑥,𝑦)
• Equation (1) can be expressed as =− (5) or
𝑑𝑥 𝑁 (𝑥,𝑦)
• as 𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 = 0 (6)
𝑢 𝑥, 𝑦 = 𝐶
CE 207_Exact_ODEs
Exact Equation (3)
CE 207_Exact_ODEs
How do we know if u(x,y) (exact differential) exists?
𝜕𝑀 𝜕𝑁
Theorem 01: Let 𝑀 𝑥, 𝑦 , 𝑁 𝑥, 𝑦 , 𝜕𝑦
and be continuous within a rectangle
𝜕𝑥
R in the x, y plane. Then 𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 is an exact differential, in R,
if and only if
𝜕𝑀 𝜕𝑁
= everywhere in R
𝜕𝑦 𝜕𝑥
CE 207_Exact_ODEs
How to find u(x,y) (exact differential)? (1)
𝜕𝑢
=𝑀
𝜕𝑥
𝜕𝑢 = 𝑀𝜕𝑥
𝒖 𝒙, 𝒚 = න𝑴 ⅆ𝒙 + 𝒌(𝒚)
➢ So, 𝑢 𝑥, 𝑦 = 𝑥 𝑀 , 𝑦 𝑑𝑥 + 𝑘 𝑦
where, 𝑘(𝑦) is constant of integration
➢ 𝑢 𝑥, 𝑦 = 𝑥 𝑁 , 𝑦 𝑑𝑦 + 𝑙 𝑥
where, 𝑙(𝑥) is constant of integration
CE 207_Exact_ODEs
Check for the existence of u(x,y) (exact
differential) - Example
𝜕𝑀 𝜕𝑁
➢
𝜕𝑦
= 𝑐𝑜𝑠𝑦 & 𝜕𝑥
= 𝑐𝑜𝑠𝑦
CE 207_Exact_ODEs
Find F(x,y) (solution of exact ODE) - Example
CE 207_Exact_ODEs
Problem 01 (Kreyszig, Page 22, Example 01)
➢ cos 𝑥 + 𝑦 𝑑𝑥 + 3𝑦 2 + 2𝑦 + cos 𝑥 + 𝑦 𝑑𝑦 = 0
M N
𝑀𝑑𝑥 + 𝑁𝑑𝑦 = 0
𝜕𝑀 𝜕𝑁
= − sin 𝑥 + 𝑦 ; = − sin 𝑥 + 𝑦
𝜕𝑦 𝑥
𝜕𝑀 𝜕𝑁
So, =
𝜕𝑦 𝜕𝑥
There exist an exact ODE.
CE 207_Exact_ODEs
Problem 01 (Kreyszig, Page 22, Example 01)
➢ cos 𝑥 + 𝑦 𝑑𝑥 + 3𝑦 2 + 2𝑦 + cos 𝑥 + 𝑦 𝑑𝑦 = 0
M N
𝑢 𝑥, 𝑦 = න 𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑘 𝑦
= 𝑥 𝑠𝑜𝑐 , 𝑦 𝑑𝑥 + 𝑘 𝑦
= sin(𝑥 + 𝑦) + 𝑘 𝑦
CE 207_Exact_ODEs
Problem 01 (Kreyszig, Page 22, Example 01)
➢ cos 𝑥 + 𝑦 𝑑𝑥 + 3𝑦 2 + 2𝑦 + cos 𝑥 + 𝑦 𝑑𝑦 = 0
𝜕𝑢
=𝑁
𝜕𝑦
𝜕 sin(𝑥 + 𝑦) + 𝑘 𝑦
= 3y2 + 2y + cos(x + y)
𝜕𝑦
cos(𝑥 + 𝑦) + 𝑘 ′ 𝑦 = 3y2 + 2y + cos x + y
𝑘′ 𝑦 = 3y2 + 2y
𝑘 𝑦 = y3 + y2 + B
CE 207_Exact_ODEs
Problem 01 (Kreyszig, Page 22, Example 01)
➢ cos 𝑥 + 𝑦 𝑑𝑥 + 3𝑦 2 + 2𝑦 + cos 𝑥 + 𝑦 𝑑𝑦 = 0
𝑢 𝑥, 𝑦 = sin(𝑥 + 𝑦) + 𝑘 𝑦
= sin(𝑥 + 𝑦) + y3 + y2 + B = constant
= sin(𝑥 + 𝑦) + y3 + y2
Check:
𝜕𝑢 𝜕𝑢
𝜕𝑢 𝑥, 𝑦 = 𝑑𝑥 + 𝑑𝑦
𝜕𝑥 𝜕𝑦
= cos 𝑥 + 𝑦 𝑑𝑥 + 3𝑦 2 + 2𝑦 + cos 𝑥 + 𝑦 𝑑𝑦
CE 207_Exact_ODEs
Problem 02 (Kreyszig, Page 23, Example 03) (1)
−𝑦 𝑥
➢𝑀 = −y →
𝜕𝑀
= −1 • 𝑑𝑥 + 𝑑𝑦 = 0
𝜕𝑦 𝒙𝟐 𝒙𝟐
−𝑦 𝜕𝑀 1
➢𝑁 =x →
𝜕𝑁
=1 •𝑀= → =−
𝜕𝑥 𝑥2 𝜕𝑦 𝑥2
𝜕𝑀 𝜕𝑁 1 𝜕𝑁 1
➢ ≠ ! •𝑁= → =−
𝜕𝑦 𝜕𝑥 𝑥 𝜕𝑥 𝑥2
𝜕𝑀 𝜕𝑁
So, not exact 𝜕𝑦
=
𝜕𝑥
So, u(x,y) exists; exact
CE 207_Exact_ODEs
Problem 02 (Kreyszig, Page 23, Example 03) (2)
𝜕𝑢 −𝑦
➢𝑀 = = (1)
𝜕𝑥 𝒙𝟐
𝜕𝑢 1
➢𝑁 = = (2)
𝜕𝑦 𝑥
Mdx + Ndy =0
𝑢 𝑥, 𝑦 = න 𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑘 𝑦
𝑦
= − 𝑑𝑥 + 𝑘 𝑦
𝑥2
𝑦
= +𝑘 𝑦
𝑥
CE 207_Exact_ODEs
Problem 02 (Kreyszig, Page 23, Example 03) (2)
𝜕𝑢 1
𝑁= 𝜕𝑦
= 𝑥 𝜕𝑢
=𝑁
𝜕𝑦
𝑦
𝜕 +𝑘 𝑦 1
𝑥 =
𝜕𝑦 𝑥
1 ′ 𝑦
1
+𝑘 =
𝑥 𝑥
𝑘′ 𝑦 = 0
𝑘 𝑦 =𝐵
CE 207_Exact_ODEs
Problem 02 (Kreyszig, Page 23, Example 03) (2)
𝜕𝑢 1
𝑁= 𝜕𝑦
= 𝑥
𝑦
𝑢 𝑥, 𝑦 = + 𝑘 𝑦
𝑥
𝑦
= + 𝐵 = constant
𝑥
𝑦
= = 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡
𝑥
Check:
𝜕𝑢 𝜕𝑢
𝜕𝑢 𝑥, 𝑦 = 𝑑𝑥 + 𝑑𝑦
𝜕𝑥 𝜕𝑦
−𝑦 1
= 2 𝑑𝑥 + 𝑑𝑦
𝑥 𝑥
CE 207_Exact_ODEs
How to find an integrating factor? (1)
➢𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 = 0 (1)
𝜕(𝐹𝑀) 𝜕(𝐹𝑁)
➢ Therefore,
𝜕𝑦
= 𝜕𝑥
→ 𝐹𝑦 𝑀 + 𝐹𝑀𝑦 = 𝐹𝑥 𝑁 + 𝐹𝑁𝑥
CE 207_Exact_ODEs
How to find an integrating factor? (2)
𝜕(𝐹𝑀) 𝜕(𝐹𝑁)
➢ Then
𝜕𝑦
= 𝜕𝑥
→ 𝐹𝑦 𝑀 + 𝐹𝑀𝑦 = 𝐹𝑥 𝑁 + 𝐹𝑁𝑥 would become
• 𝑭𝑴𝒚 = 𝑭𝒙 𝑵 + 𝑭𝑵𝒙 (ii)
CE 207_Exact_ODEs
How to find an integrating factor? (3)
𝜕(𝐹𝑀) 𝜕(𝐹𝑁)
➢ Then
𝜕𝑦
= 𝜕𝑥
→ 𝐹𝑦 𝑀 + 𝐹𝑀𝑦 = 𝐹𝑥 𝑁 + 𝐹𝑁𝑥 would become
• 𝑭𝑴𝒚 = 𝑭𝒙 𝑵 + 𝑭𝑵𝒙 (ii)
𝐹𝑥 𝑀𝑦 𝑁𝑥 𝜕𝐹 1 1 𝜕𝑀 𝜕𝑁
• = − → . = −
𝐹 𝑁 𝑁 𝜕𝑥 𝐹 𝑁 𝜕𝑦 𝜕𝑥
1 𝜕𝑀 𝜕𝑁 𝜕𝐹
• Let’s assume 𝑅 = − therefore, = 𝑅𝜕𝑥 (iii)
𝑁 𝜕𝑦 𝜕𝑥 𝐹
CE 207_Exact_ODEs
How to find an integrating factor? (4)
1 𝜕𝑀 𝜕𝑁 𝜕𝐹
➢ Let’s assume 𝑅 = 𝑁 𝜕𝑦
− 𝜕𝑥 therefore, 𝐹
= 𝑅𝜕𝑥 (iii)
➢ Theorem 01: If equation (1) is such that 𝑅 in equation (iv) only depends on
x i.e. R = R(x), then equation (1) has an integrating factor, 𝐹 = 𝑒 𝑥𝜕𝑅
CE 207_Exact_ODEs
How to find an integrating factor? (5)
➢ Theorem 02: If equation (1) is such that 𝑅∗ in equation (v) only depends
on y i.e., 𝑅∗ = 𝑅∗(y) , then equation (1) has an integrating factor
∗ 𝑦𝜕 ∗𝑅
𝐹 = 𝑒
CE 207_Exact_ODEs
Problem 04 (Kreyszig, Example 5, P # 25) (1)
➢ 𝑒 𝑥+𝑦 + 𝑦𝑒 𝑦 𝑑𝑥 + 𝑥𝑒 𝑦 − 1 𝑑𝑦 = 0
𝜕𝑀 𝜕𝑁
= 𝑒 (𝑥+𝑦) + 𝑦ⅇ𝑦 + ⅇ𝑦 = 𝑒𝑦
𝜕𝑦 𝜕𝑥
➢ So,not exact
➢ Assume R is a function of x.
➢𝐹 = 𝑒 𝑥𝜕𝑅
1 𝜕𝑀 𝜕𝑁 1
𝑦𝜕 𝑁− 𝜕𝑥 𝜕𝑥 𝑦𝑒𝑥 −1 𝑒 (𝑥+𝑦) +𝑦ⅇ𝑦 +ⅇ𝑦 −ⅇ𝑦 𝜕𝑥
➢ = 𝑒 = 𝑒
1
𝑦𝑒𝑥 −1 𝑒 (𝑥+𝑦) +𝑦ⅇ𝑦 𝜕𝑥
➢ = 𝑒
1
➢R = 𝑒 (𝑥+𝑦) + 𝑦ⅇ𝑦 So, R is not a function of x only.
𝑥𝑒 𝑦 −1
CE 207_Exact_ODEs
Problem 04 (Kreyszig, Example 5, P # 25) (3)
➢ 𝑒 𝑥+𝑦 + 𝑦𝑒 𝑦 𝑑𝑥 + 𝑥𝑒 𝑦 − 1 𝑑𝑦 = 0
Assume R is a function of y.
𝐹 = 𝑒 𝑦𝜕𝑅
1 𝜕𝑁 𝜕𝑀
𝑥𝜕 𝑀− 𝜕𝑦 𝜕𝑦
= 𝑒
1 𝜕𝑁 𝜕𝑀 1 𝜕 𝑥𝑒 𝑦 −1 𝜕(𝑒 𝑥+𝑦 +𝑦𝑒 𝑦 )
So, R= 𝑀 𝜕𝑥
−
𝜕𝑦
= 𝑒 𝑥+𝑦 +𝑦𝑒 𝑦 𝜕𝑥
−
𝜕𝑦
1 𝑦 𝑥+𝑦
= 𝑦 (𝑒 − 𝑒 − 𝑒 𝑦 − 𝑦𝑒 )
𝑦
𝑒 𝑥+𝑦 +𝑦𝑒
1 𝑥+𝑦
= 𝑦 (−𝑒 − 𝑦𝑒 𝑦 ) = -1
𝑒 𝑥+𝑦 +𝑦𝑒
R = −1; 𝑆𝑜, 𝐹 = 𝑒 𝑒 = 𝑦𝜕𝑅 −1𝜕𝑦 = 𝑒 −𝑦
CE 207_Exact_ODEs
Problem 04 (Kreyszig, Example 5, P # 25) (4)
➢ 𝑒 𝑥+𝑦 + 𝑦𝑒 𝑦 𝑑𝑥 + 𝑥𝑒 𝑦 − 1 𝑑𝑦 = 0
➢ (𝑒 𝑥+𝑦 + 𝑦𝑒𝑦 ) 𝑒 −𝑦 𝑑𝑥 + 𝑥𝑒 𝑦 − 1 𝑒 −𝑦 𝑑𝑦 = 0
𝑀 = 𝑒𝑥 + 𝑦 ; N = 𝑥 + 𝑒 −𝑦 ;
𝜕𝑀 𝜕𝑁
➢
𝜕𝑦
=1; 𝜕𝑥
=1 So, there exists an exact ODE
CE 207_Exact_ODEs
Practice Problems (Exact equation) (1)
➢ 3𝑥 2 − 2𝑥𝑦 + 2 𝑑𝑥 + 6𝑦 2 − 𝑥 2 + 3 𝑑𝑦 = 0
➢ 𝑒 𝑥 + 𝑦 𝑑𝑥 + 𝑥 − 𝑒 −𝑦 𝑑𝑦 = 0
➢ Problem Set 1.4: Problem 3, 5, 6, 9, 10, 12, 13, 15
CE 207_Exact_ODEs