Lec 3 Ordinary Differential Equations 2
Lec 3 Ordinary Differential Equations 2
Equations
Lec 2 Differential equation of the first order and first degree (2)
• Introduction to Ordinary Differential Equations
• First - Order Differential Equations
• Non Exact O. D. E.
• Linear O. D. E.
• Non – Linear ODE (Bernoulli Equation)
Non-Exact Differential Equations
∆ 𝑴𝒚 −𝑵𝒙
𝒙𝒅𝑵 ∆
𝛍(𝒙) = 𝒆 if, =
𝑵 𝑵
Or;
∆ 𝑴𝒚 −𝑵𝒙
− 𝒚𝒅𝑴 ∆
𝛍 (𝒚) = 𝒆 if, =
𝑴 𝑴
∆ 𝑴𝒚 − 𝑵𝒙 4𝑦 cos 𝑦 2 − 𝑦 cos 𝑦 2 3
= = 2 =
𝑵 𝑵 𝑥𝑦 cos 𝑦 𝑥
3
𝑥𝑑𝑥
μ= 𝑒 = 𝑒 3 ln 𝑥 = 𝑥 3
Multiplication by μ = 𝑥³ gives the equation
2𝑥 3 𝑠𝑖𝑛( 𝑦 2 )𝑑𝑥 + 𝑥 4 𝑦 𝑐𝑜𝑠( 𝑦 2 )𝑑𝑦 = 0
• This equation is exact because
𝜕
• 2𝑥 3 𝑠𝑖𝑛 𝑦 2 = 4𝑥 3 𝑦 𝑐𝑜𝑠( 𝑦 2 )
𝜕𝑦
𝜕 4
= 𝑥 𝑦 𝑐𝑜𝑠( 𝑦 2 ) .
𝜕𝑥
• 𝑢 = 𝑥𝑑𝑀 + 𝑘 𝑦 = 2𝑥 3 𝑠𝑖𝑛( 𝑦 2 ) 𝑑𝑥 + 𝑘 𝑦
𝑥4
• 𝑢= 𝑠𝑖𝑛( 𝑦 2 ) + 𝑘(𝑦). 𝜕𝑢
2
= 𝑦𝑥 4 cos 𝑦 2 + 𝑘 ′ 𝑦 = 𝑁 = 𝑥 4 𝑦 𝑐𝑜𝑠( 𝑦 2 ).
𝜕𝑦
Hence, 𝑘 ′ 𝑦 = 0, so that 𝑘 𝑦 = 𝑐, by back substitution,
we get the answer
𝑥4
𝑢(𝑥, 𝑦) = 𝑠𝑖𝑛( 𝑦 2 ) = 𝑐.
Ex. 11:
First order linear differential equations:
Example 13
Example 12
Example 14
• Ex. 15: Solve the differential equation
′ 1
• 𝑦 + 𝑦 = 𝑥𝑦 2
𝑥
𝑑𝑧 𝑑𝑦 1 1
• 𝑧 = 𝑦 −1 then = −𝑦 −2 𝑧 = න ∗ 𝑥 𝑑𝑥 + 𝑐
𝑑𝑥 𝑑𝑥
𝑥 𝑥
𝑑𝑧 1
• − 𝑧 =𝑥
𝑑𝑥 𝑥 𝑧 = 𝑥 𝑥 + 𝑐 = 𝑐𝑥 + 𝑥 2
1
• Which is linear equation with 𝑝 = − , 𝑄 𝑥 =𝑥
𝑥
1
−𝑥𝑑𝑥
• The integrating factor is 𝜇 𝑥 = 𝑒 = 𝑒 − ln 𝑥
1
=
𝑥
Applications
The temperature (T) of a cooling substance at time (t) (in minutes) is:
−𝐤𝐭
T(t)=(𝐓° − 𝐓𝐒 ) 𝐞 + 𝐓𝐒
T(t) =temperature at time t
T° =initial temperature
TS =temperature of surrounding environment
k=constant cooling rate of the substance
Newton’s Law of Cooling proof
Let us understand the mathematical expression for Newton’s Law of Cooling:
dT
∝(T− TS )
dt
dT
=k(T− TS )
dt
Tf −TS
ln =−𝑘.𝑡
(T° −TS )
Tf −TS
=e−k.t
(T° −TS )
𝐓𝐟 = 𝐓𝐒 + (𝐓° − 𝐓𝐒 ) 𝐞−𝐤.𝐭
OR
T(t)= 𝐓𝐒 + (𝐓° − 𝐓𝐒 ) 𝐞−𝐤.𝐭 , which is the formula for Newton’s Law of Cooling.
A cup of coffee at 190° F is left in a room of 70° F. At time t = 0 , th
Example: coffee is cooling at 15° F per minute.
a) Find the function that models the cooling of the coffee.
dT
dt
= -k(T – C) b) How long will it take for temperature to reach 143° F ?
dT
= -15 at t=0 , T=190 , C=70
dt
-15= -K(190-70) → K= 0.125 b) How long will it take for temperature to
a) Find the function that models the cooling of the reach 𝟏𝟒𝟑° F ?
coffee . T(t) = 120 𝑒 −0.125𝑡 + 70
dT 143 = 120 𝑒 −0.125𝑡 + 70 (-70)
=0.125(T-70) , T(0)=190
dt 73 = 120 𝑒 −0.125𝑡 (÷ 120)
𝑑𝑇= -0.125(T-70) 𝑑𝑡 73
1 ln = ln 𝑒 −0.125𝑡
𝑇 −70 𝑑𝑇 = −0.125 𝑑𝑡 120
Ln(T-70) = -0.125t + c 73
ln120 −0.125𝑡
T – 70 =𝑒 −0.125𝑡 . 𝑒 𝑐 let: 𝑒 𝑐 =a −0.125
=
−0.125
→ t=3.98 min
T(t) = a 𝑒 −0.125𝑡 + 70 , T(0)=190
T(0) = a 𝑒 0 + 70 = 190 → a=120
T(t) = 120 𝑒 −0.125𝑡 + 70
Matlab Code
Modeling Temperature Change with
Newton's Law of Cooling
of hot food items using temperature of patients using engineers to predict the victim's body can help
Newton's law helps prevent the cooling curve principle cooling rates of hot forensic scientists
bacterial growth and ensure aids in diagnosing fevers, components in machinery, estimate the time of
food safety in the food hypothermia, and other electronic devices, and death in criminal