ENS 181
Exact ODEs
Summary of Key Concepts
Learning Objectives
By the end of this lesson, students should be able to:
1. Define what exact differential equations are.
2. Identify whether a given ODE is exact.
3. Solve exact ODEs using the appropriate method.
What are exact differential equations?
A first-order differential equation is exact if it can be written in the form:
𝑴(𝒙, 𝒚)𝒅𝒙 + 𝑵(𝒙, 𝒚)𝒅𝒚 = 𝟎
This means there exists a function 𝑢(𝑥, 𝑦) such that:
𝝏𝒖 𝝏𝒖
𝝏𝒙
= 𝑴 and 𝝏𝒚 = 𝑵
Condition for Exactness
To check if the equation is exact, verify:
𝜕𝑀 𝜕𝑁
=
𝜕𝑦 𝜕𝑥
If this holds, the equation is exact.
Step by step solution procedure
Step 1: Check for exactness
𝜕𝑀 𝜕𝑁
=
𝜕𝑦 𝜕𝑥
Step 2: Solve for u
Method 1:
𝒖 = 4 𝑴𝒅𝒙 + 𝒌(𝒚)
If hard to integrate, use:
Method 2:
𝒖 = 4 𝑵𝒅𝒚 + 𝒍(𝒙)
Step 3: Solve for k(y) or l(x) from Step 2
𝛿𝑢
= 𝑁(𝑥, 𝑦)
𝛿𝑦
𝛿𝑢
= 𝑀(𝑥, 𝑦)
𝛿𝑥
Step 4: Once u is determined, set:
𝑢(𝒙, 𝒚) = 𝑪
Example 1:
Sove the ODE (𝟐𝒙𝒚 + 𝟑)𝒅𝒙 + (𝒙𝟐 + 𝟒𝒚)𝒅𝒚 = 𝟎 (𝟏)
Solution:
Step 1: Check for exactness
𝛿𝑀 𝛿(2𝑥𝑦 + 3)
= = 2𝑥
𝛿𝑦 𝛿𝑦
𝛿𝑁 𝛿(𝑥 & + 4𝑦)
= = 2𝑥
𝛿𝑥 𝛿𝑥
Since:
𝜹𝑴 𝜹𝑵
= , the equation is exact.
𝜹𝒚 𝜹𝒙
Step 2: Solve for u
Let’s try
𝑢 = 4 𝑀𝑑𝑥 + 𝑘(𝑦)
𝑢 = ∫(2𝑥𝑦 + 3)𝑑𝑥 + 𝑘(𝑦)
𝒖 = 𝒙𝟐 𝒚 + 𝟑𝒙 + 𝒌(𝒚) (2)
How about using:
𝑢 = 4 𝑁𝑑𝑦 + 𝑙(𝑥)
𝑢 = ∫(𝑥 & + 4𝑦)𝑑𝑦 + 𝑙(𝑥)
𝒖 = 𝒙𝟐 𝒚 + 𝟐𝒚𝟐 + 𝒍(𝒙) (3)
Step 3: Determine k(y) or l(x)
From (2)
𝛿𝑢
= 𝑥 & + 𝑘 ' (𝑦) = 𝑁
𝛿𝑦
𝑥 & + 𝑘 ' (𝑦) = 𝑥 & + 4𝑦
𝑘 ' (𝑦) = 4𝑦
𝒌(𝒚) = 𝟐𝒚𝟐
Substituting k(y) into (2)
𝒖 = 𝒙𝟐 𝒚 + 𝟑𝒙 + 𝟐𝒚𝟐
Similarly, from (3)
𝜹𝒖
= 𝟐𝒙𝒚 + 𝒍' (𝒙) = 𝑴
𝜹𝒙
𝟐𝒙𝒚 + 𝒍' (𝒙) = (𝟐𝒙𝒚 + 𝟑)
𝒍' (𝒙) = 𝟑
𝒍(𝒙) = 𝟑𝒙
Substituting l(x) into (3)
𝒖 = 𝒙𝟐 𝒚 + 𝟐𝒚𝟐 + 𝟑𝒙
Either using method 1 or method 2 will arrive in the same answer.
Step 4: Equate u to C
𝒙𝟐 𝒚 + 𝟐𝒚𝟐 + 𝟑𝒙 = 𝑪
What if It’s not exact?
If,
𝝏𝑴 𝝏𝑵
≠
𝝏𝒚 𝝏𝒙
The equation is not exact. If this is the case, we can try to multiply the entire equation by
an integrating factor F
𝑭𝑴(𝒙, 𝒚)𝒅𝒙 + 𝑭𝑵(𝒙, 𝒚)𝒅𝒚 = 𝟎
To find F, there are two methods:
Method 1:
𝟏 𝜹𝑴 𝜹𝑵
𝑹= I − K
𝑵 𝜹𝒚 𝜹𝒙
Then
𝑭 = 𝒆∫ 𝑹(𝒙)𝒅𝒙
Method 2:
𝟏 𝜹𝑵 𝜹𝑴
𝑹∗ = I − K
𝑴 𝜹𝒙 𝜹𝒚
Then
∗
𝑭 = 𝒆∫ 𝑹 (𝒚)𝒅𝒚
Solving Procedure:
1. Check for Exactness
2. Compute R and 𝑅∗
3. Multiply the Original Equation by F
4. Solve Using the Exact Equation Method
Example 2
Given ODE: (𝒆𝒙)𝒚 + 𝒚𝒆𝒚 )𝒅𝒙 + (𝒙𝒆𝒚 − 𝟏)𝒅𝒚 = 𝟎, 𝒚(𝟎) = −𝟏.
Step 1: Check for Exactness:
()
(*
= 𝑒 +,* + 𝑒 * + 𝑦𝑒 *
𝛿𝑁
= 𝑒*
𝛿𝑥
&' &)
≠
&( &*
The equation is not exact, so we need an integrating factor.
Step 2: Compute R or R* and F
1 𝛿𝑀 𝛿𝑁
𝑅= I − K
𝑁 𝛿𝑦 𝛿𝑥
+
𝑅 = ,- ! .+ (𝑒 ,)* + 𝑦𝑒 * )
𝟏 𝒙'𝒚 )𝒚𝒆𝒚 6𝒅𝒙
𝑭 = 𝒆∫ 𝑹(𝒙)𝒅𝒙 = 𝒆∫𝒙𝒆𝒚&𝟏4𝒆
Seems difficult to integrate, right?
How about trying the other method?
1 𝛿𝑁 𝛿𝑀
𝑅∗ = I − K
𝑀 𝛿𝑥 𝛿𝑦
+
𝑅∗ = - ('! )*- ! (𝑒 * − 𝑒 ,)* − 𝑒 * − 𝑦𝑒 * )
𝑹∗ = −1
∗ (*)8*
𝐹 = 𝑒∫ 7
𝑭 = 𝒆.𝒚
Step 3: Multiply the equation by F
𝒆.𝒚 (𝑒 ,)* + 𝑦𝑒 * )𝑑𝑥 + 𝒆.𝒚 (𝑥𝑒 * − 1)𝑑𝑦 = 0
(𝒆𝒙 + 𝒚)𝒅𝒙 + (𝒙 − 𝒆.𝒚 )𝒅𝒚 = 𝟎
This is our new equation
Step 4: Check for exactness of the new equation
𝜹𝑴 𝜹𝑵
=𝟏=
𝜹𝒚 𝜹𝒙
The equation is now exact.
Step 5: Solve for u of the new equation
𝒖 = 4(𝒆𝒙 + 𝒚)𝒅𝒙 + 𝒌(𝒚)
𝒖 = 𝒆𝒙 + 𝒙𝒚 + 𝒌(𝒚) (1)
Step 6: Determine k(y) or l(x) from the new equation
𝑑𝑢
=𝑁
𝑑𝑦
89
8*
= 𝑥 + 𝑘 ' (𝑦) = 𝑥 − 𝑒 .*
𝑘′(𝑦) = −𝑒 .*
Integrate to find k(y)
4 𝑘′(𝑦) = 4 −𝑒 .*
𝑘(𝑦) = 𝑒 .* + 𝐶
So.
𝒖 = 𝒆𝒙 + 𝒙𝒚 + 𝒆.𝒚
Step 7: Equating to C
𝒆𝒙 + 𝒙𝒚 + 𝒆.𝒚 = 𝑪
Since we have an initial value 𝑦(0) = −1, we can determine C
𝑒 : + (0)(−1) + 𝑒 .(.+) = 𝐶
𝑪=𝟏+𝒆
Final Solution
𝒆𝒙 + 𝒙𝒚 + 𝒆.𝒚 = 𝟏 + 𝒆
Other examples.
1. 𝒙𝟑 𝒅𝒙 + 𝒚𝟑 𝒅𝒚 = 𝟎
Step 1: Check for exactness
𝛿𝑀 𝛿(𝒙𝟑 )
= =0
𝛿𝑦 𝛿𝑦
𝛿𝑁 𝛿( 𝒚𝟑 )
= =0
𝛿𝑥 𝛿𝑥
Since:
&' &)
= , the equation is exact.
&( &*
Step 2: Solve for u
Let’s try
𝑢 = 4 𝑀𝑑𝑥 + 𝑘(𝑦)
𝑢 = ∫(𝒙𝟑 )𝑑𝑥 + 𝑘(𝑦)
𝒙𝟒
𝒖= 𝟒
+ 𝒌(𝒚)
Step 3: Determine k(y) or l(x)
𝛿𝑢
= 𝑘 ' (𝑦) = 𝑁
𝛿𝑦
𝑘 ' (𝑦) = 𝑦 =
Integrating,
𝒚𝟒
𝒌(𝒚) =
𝟒
Substituting k(y)
𝒙𝟒 𝒚𝟒
𝒖= +
𝟒 𝟒
Step 4: Equate u to C
𝒙𝟒 𝒚𝟒
+ =𝑪
𝟒 𝟒
2. (𝑥 − 𝑦)(𝑑𝑥 − 𝑑𝑦) = 0
Simplify equation first, and express in the form 𝑀𝑑𝑥 + 𝑁𝑑𝑦 = 0
𝑥𝑑𝑥 − 𝑥𝑑𝑦 − 𝑦𝑑𝑥 + 𝑦𝑑𝑦 = 0
(𝑥 − 𝑦)𝑑𝑥 + (−𝑥 + 𝑦)𝑑𝑦 = 0
Step 1: Check for exactness
𝛿𝑀 𝛿(𝒙 − 𝒚)
= = −1
𝛿𝑦 𝛿𝑦
𝛿𝑁 𝛿( −𝒙 + 𝒚)
= = −1
𝛿𝑥 𝛿𝑥
Since:
&' &)
= , the equation is exact
&( &*
Step 2: Solve for u
Let’s try
𝑢 = 4 𝑀𝑑𝑥 + 𝑘(𝑦)
𝑢 = ∫(𝒙 − 𝒚)𝑑𝑥 + 𝑘(𝑦)
𝒙𝟐
𝒖= 𝟐
− 𝒙𝒚 + 𝒌(𝒚)
Step 3: Determine k(y) or l(x)
𝛿𝑢
= −𝑥 + 𝑘 ' (𝑦) = 𝑁
𝛿𝑦
−𝑥 + 𝑘 ' (𝑦) = (−𝑥 + 𝑦)
𝑘′(𝑦) = 𝑦
Integrating,
𝒚𝟐
𝒌(𝒚) =
𝟐
Substituting k(y)
𝒙𝟐 𝒚𝟐
𝒖= − 𝒙𝒚 +
𝟐 𝟐
Step 4: Equate u to C
𝒙𝟐 𝒚𝟐
− 𝒙𝒚 + =𝑪
𝟐 𝟐
3. -𝝅 𝒔𝒊𝒏𝝅𝒙 𝒔𝒊𝒏𝒉𝒚 𝒅𝒙 + 𝒄𝒐𝒔𝝅𝒙 𝒄𝒐𝒔𝒉𝒚 𝒅𝒚 = 𝟎
Step 1: Check for exactness
𝛿𝑀 𝛿( −𝜋 𝑠𝑖𝑛𝜋𝑥 𝑠𝑖𝑛ℎ𝑦)
= = −𝜋𝑠𝑖𝑛(𝜋𝑥) ⋅ 𝑐𝑜𝑠ℎ(𝑦)
𝛿𝑦 𝛿𝑦
𝛿𝑁 𝛿( 𝑐𝑜𝑠𝜋𝑥 𝑐𝑜𝑠ℎ𝑦)
= = −π𝑠𝑖𝑛(πx)𝑐𝑜𝑠ℎ(y)
𝛿𝑥 𝛿𝑥
Since:
&' &)
= , the equation is exact.
&( &*
Step 2: Solve for u
Let’s try
𝑢 = 4 𝑀𝑑𝑥 + 𝑘(𝑦)
𝑢 = ∫(−𝜋 𝑠𝑖𝑛𝜋𝑥 𝑠𝑖𝑛ℎ𝑦)𝑑𝑥 + 𝑘(𝑦)
𝑢 = −𝜋𝑠𝑖𝑛ℎ(𝑦)∫ 𝑠𝑖𝑛(𝜋𝑥)𝑑𝑥 + 𝑘(𝑦)
𝑢 = −𝜋𝑠𝑖𝑛ℎ(𝑦) ⋅ (−𝜋𝑐𝑜𝑠(𝜋𝑥)) + 𝑘(𝑦)
𝑢 = 𝑠𝑖𝑛ℎ(𝑦)𝑐𝑜𝑠(𝜋𝑥) + 𝑘(𝑦)
Step 3: Determine k(y) or l(x)
𝛿𝑢 𝛿(𝑠𝑖𝑛ℎ(𝑦)𝑐𝑜𝑠(𝜋𝑥) + 𝑘(𝑦))
= =𝑁
𝛿𝑦 𝛿𝑦
𝑐𝑜𝑠ℎ(𝑦)𝑐𝑜𝑠(𝜋𝑥) + 𝑘 ' (𝑦) = 𝑐𝑜𝑠𝜋𝑥 𝑐𝑜𝑠ℎ𝑦
𝑘 ' (𝑦) = 0
𝒌(𝒚) = 𝑪
Substituting k(y)
u = sinh(y)cos(πx) + C
Step 4: Equate u to C
Combine constants
𝒔𝒊𝒏𝒉(𝒚)𝒄𝒐𝒔(𝝅𝒙) = 𝑪
4. (𝑒 ,)* − 𝑦)𝑑𝑥 + (𝑥𝑒 ,)* + 1)𝑑𝑦 = 0
Step 1: Check for exactness
𝛿𝑀 𝛿 (𝑒 ,)* − 𝑦)
= = 𝑒 ,)* − 1
𝛿𝑦 𝛿𝑦
𝛿𝑁 𝛿(𝑥𝑒 ,)* + 1)
= = 𝑒 ,)* (1 + 𝑥)
𝛿𝑥 𝛿𝑥
Since:
&' &)
≠ , the equation is not exact.
&( &*
Step 2: Compute R or R* and F
1 𝛿𝑀 𝛿𝑁
𝑅= I − K
𝑁 𝛿𝑦 𝛿𝑥
+
𝑅 = ,- ('! )+ (𝑒 ,)* − 1 − 𝑒 ,)* (1 + 𝑥))
+
𝑅 = ,𝒆𝒙'𝒚 )𝟏 o𝑒 ,)* o1 − (1 + 𝑥)p − 1p
+
𝑅 = ,- ('! )+ (−𝑥𝑒 ,)* − 1)
𝑅 = −1
𝑭 = 𝒆∫ 𝑹(𝒙)𝒅𝒙
𝑭 = 𝒆∫ .𝟏𝒅𝒙
𝑭 = 𝒆.𝒙
Multiplying the original equation by the integrating factor
𝒆.𝒙 (𝑒 ,)* − 𝑦)𝑑𝑥 + 𝒆.𝒙 (𝑥𝑒 ,)* + 1)𝑑𝑦 = 0
(𝑒 * − 𝑦𝒆.𝒙 )𝑑𝑥 + (𝑥𝑒 * + 𝒆.𝒙 )𝑑𝑦 = 0
𝛿𝑀 𝛿( 𝑒 * − 𝑦𝒆.𝒙 )
= = 𝑒 * − 𝑒 .,
𝛿𝑦 𝛿𝑦
𝛿𝑁 𝛿( 𝑥𝑒 * + 𝒆.𝒙 )
= = 𝑒 * − 𝑒 .,
𝛿𝑥 𝛿𝑥
Step 3: Check for exactness of the new equation
𝜹𝑴 𝜹𝑵
=
𝜹𝒚 𝜹𝒙
The equation is now exact.
Step 4: Solve for u of the new equation
𝒖 = 4(𝑒 * − 𝑦𝒆.𝒙 )𝒅𝒙 + 𝒌(𝒚)
𝒖 = 𝒙𝒆𝒚 + 𝑦𝒆.𝒙 + 𝒌(𝒚)
Step 5: Determine k(y) or l(x) from the new equation
𝑑𝑢
=𝑁
𝑑𝑦
8(𝒙𝒆𝒚 )*𝒆&𝒙 )𝒌(𝒚))
8*
= 𝑥𝑒 * + 𝑒 ., + 𝑘 ' (𝑦) = 𝑥𝑒 * + 𝒆.𝒙
𝑘 '(*) = 0
Integrate to find k(y)
4 𝑘′(𝑦) = 4 0
𝑘(𝑦) = 𝐶
So.
𝒖 = 𝒙𝒆𝒚 + 𝑦𝒆.𝒙
Step 6: Equating to C
𝒙𝒆𝒚 + 𝑦𝒆.𝒙 = 𝑪