FODE 4 Lectures
FODE 4 Lectures
Engineering Math.II
Second level
Department of Computer Engineering
Jumana Abdullah
1
جمانة عبدهللا: المحاضرة االولى
What is the :
Is an equation that contain one or more derivative of differential function
We can place all differential equation into two types:
ordinary differential equation and partial differential equations.
𝑑𝑦 𝑑𝑦 𝑥+𝑡
+𝑥 = (y is a function of the two variables x and t and
𝑑𝑡 𝑑𝑥 𝑥−𝑡
partial derivatives are present.
2
Order
Another way of classifying differential equations is by order. Any ordinary
differential equation can be written in the form
F=(x,y’,y′′,...,y(0))= 0
The order of a differential equation is the highest derivative that appears
in the following equations:
𝑑2 𝑦 𝑑𝑦
2 +3 +4y =𝑒 3𝑥 (second order DE)
𝑑𝑥 𝑑𝑥
𝑑𝑦
+ 3𝑦 = 5𝑥 (first order DE)
𝑑𝑥
Degree
𝑑2 𝑦 4 𝑑𝑦
(𝑑𝑥 2 ) +3 (𝑑𝑥 )5 +4y =𝑒 3𝑥 (second order fourth degree DE)
3
Homogeneous:
𝑑3𝑦 𝑑2𝑦 𝑑𝑦
+3 2 +4 =0
𝑑𝑥 3 𝑑𝑥 𝑑𝑥
Nonhomogeneous :
𝑑3𝑦 𝑑2𝑦 𝑑𝑦
+3 2 +4 = 𝑒 𝑥+2
𝑑𝑥 3 𝑑𝑥 𝑑𝑥
Linearity :
𝑑𝑛 𝑦 𝑑 𝑛−1 𝑦 𝑑 𝑛−2 𝑦 𝑑𝑦
𝑎𝑛 (x) + 𝑎𝑛−1 (x) 𝑛−1 + 𝑎𝑛−2 (x) +----------+ 𝑎1 (x) + 𝑎0 (x) y = F(x)
𝑑𝑥 𝑛 𝑑𝑥 𝑑𝑥 𝑛−2 𝑑𝑥
𝑑3𝑦 4 𝑑𝑦
( 3 ) +( )3 …………………………………....is a non linear function
𝑑𝑥 𝑑𝑥
4
First order differential equation
6
FIRST Order Differential Equation Standard Form
Steps for solving linear differential equation (integrating
factor):
1- put the given equation in standard form
𝑑𝑦
+ 𝑃 𝑥 𝑦 = 𝑄(𝑥)
𝑑𝑥
𝑝 𝑥 𝑑𝑥
3- find integrating factor 𝑣(𝑥) = 𝑒
1
𝑦= 𝑣 𝑥 𝑄(𝑥)
𝑣(𝑥)
7
8
9
10
1- linear Differential Equation (standard method)
11
−3 𝑑𝑥
𝑝 𝑥 𝑑𝑥
𝑣 𝑥 =𝑒 …… = 𝑒 𝑥
1
𝑣 𝑥 = 𝑒 −3 ln 𝑥 ,𝑣 𝑥 = then
𝑥3
1
y= 𝑣 𝑥 𝑄(𝑥)
𝑣(𝑥)
1 1
y= 1 . x dx ,y= 𝑥 3 𝑥 −3 . x dx
𝑥3
𝑥3
y =𝑥 3 𝑥 −2 𝑑𝑥
3 −1
y=𝑥 ( + C )
𝑥
𝑦+𝑥 2
y= -𝑥 2 + 𝑥 3 C ……….. C=
𝑥3
Solve for initial condition y(1)=1
1+1
C= C= 2
1
12
13
14
Ex2: solve the following linear differential equation by standard form
(1+𝑥 2 )(𝑑𝑦 − 𝑑𝑥) = 2𝑥𝑦 𝑑𝑥 𝑠𝑜𝑙𝑣𝑒 𝑓𝑜𝑟 𝑖𝑛𝑖𝑡𝑖𝑎𝑙 𝑣𝑎𝑙𝑢𝑒 𝑦(0) = 1.
𝑑𝑦
Sol: + P(x)y=Q(x)
𝑑𝑥
1
The standard form is: 𝑦 = 𝑣 𝑥 𝑄 𝑥 𝑑𝑥
𝑣(𝑥)
𝑑𝑦 2𝑥 𝑑𝑦 2𝑥 −2𝑥
𝑑𝑥
−1 = 1+𝑥 2
y ………….. 𝑑𝑥
− 1+𝑥 2
y=1 p x = 1+𝑥 2
−2𝑥
𝑑𝑥 2) 1
v(x)=𝑒 1+𝑥2 v(x)=𝑒 − ln(1+𝑥 v(x)=
1+𝑥 2
1
y= (1+𝑥 2 ) 1+𝑥 2
1 𝑑𝑥 𝑦 = (1 + 𝑥 2 )(tan−1 𝑥 + 𝐶)
طريقة فصل
المتغيرات
-1توضع 𝑦𝑑
متغيرات yو
)g(y )𝑥(𝑓 =
𝑥𝑑
dyفي طرف
ومتغيرات xو
dxفي الطرف
االخر
17
Separable ODE’s
𝑀 𝑥 𝑑𝑥 + 𝑁 𝑦 𝑑𝑦 =0
Then we can solve this equation by integrating both sides with respect
to x to get:
𝑑𝑦
𝑀 𝑥 𝑑𝑥 + 𝑁 𝑦 𝑑𝑥 = 0
𝑑𝑥
𝑀 𝑥 𝑑𝑥 + 𝑁 𝑦 𝑑𝑦 = 0
18
Example(1):
𝑑𝑦 𝑑𝑥
= 1 + 𝑦2 multiplying two sides by then
𝑑𝑥 (1+𝑦 2 )
𝑑𝑦
= dx integrating two sides
(1 + 𝑦 2 )
1
𝑑𝑦 = 𝑑𝑥
(1+𝑦 2 )
( tan−1 𝑦 = 𝑥 + 𝐶 )
𝒚−𝟐 𝒅𝒚 = (𝒙 + 𝟏)𝒆−𝒙 𝒅𝒙
𝒚−𝟏
= − 𝒙 + 𝟏 𝒆−𝒙 − 𝒆−𝒙 + 𝑪 derivative integrate
−𝟏
+ x 𝑒 −𝑥
−𝟏
= −𝒙 − 𝟏 − 𝟏 𝒆−𝒙 + 𝑪 … .∗ (−𝟏)
𝒚 - 1 −𝑒 −𝑥
𝟏 + 0 𝑒 −𝑥
= 𝒙 + 𝟐 𝒆−𝒙 − 𝑪
𝒚 −𝑒 −𝑥
𝟏
𝒚=
𝒙 + 𝟐 𝒆−𝒙 − 𝑪
20
Homogeneous FODE:
𝑦
𝑦 ′ = 𝑓( ) ………………(1)
𝑥
𝒅𝒚 𝒅𝒖
𝒅𝒙
= 𝒖 + 𝒙 𝒅𝒙 substitution this term in the eq.(1) we get:
𝒅𝒖 𝒚
𝒖 + 𝒙 𝒅𝒙 = 𝒇 𝒖 𝒘𝒉𝒆𝒓𝒆 𝒖 = 𝒙
𝒅𝒖
𝒙 𝒅𝒙 = 𝐟 𝐮 − 𝐮 then 𝒙𝒅𝒖 = 𝒅𝒙 𝒇 𝒖 − 𝒖 𝒕𝒉𝒆𝒏 % 𝒙
𝒅𝒙
𝒅𝒖 = 𝒇 𝒖 −𝒖 𝒕𝒉𝒆𝒏
𝒙
𝒅𝒙 𝒅𝒖
= this is the formula for homogeneous D.E.
𝒙 𝒇 𝒖 −𝒖
21
See example 8: in page 18 (Erwin Kreyszig 10th edition)
𝑦 2 𝑦 𝑑𝑦 𝑦 𝑑𝑦
1+ 2 − =0 let u = 𝑎𝑛𝑑 = 𝑓 𝑢 𝑡ℎ𝑒𝑛
𝑥 𝑥 𝑑𝑥 𝑥 𝑑𝑥
1 + 𝑢2
1 + 𝑢2 − 𝑢 𝑓 𝑢 = 0 %𝑢 𝑓 𝑢 =
𝑢
𝑑𝑥 𝑑𝑢
The formula of homo. =
𝑥 𝑓 𝑢 −𝑢
𝑑𝑥 𝑑𝑢 𝑑𝑥
= 1+𝑢2 then = udu integrating it we get:
𝑥 −𝑢
𝑥
𝑢
𝑢2 𝑦2
Ln (x)= +𝐶 𝑡ℎ𝑒𝑛 ln 𝑥 − 𝐶 = multiplying by 2𝑥 2
2 2𝑥 2
𝑦 2 = 2𝑥 2 ln 𝑥 − 𝐶
𝑦= 2𝑥 2 (ln 𝑥 − 𝑐)
22
Example2: solve the FODE.by homogeneous method
𝒚
𝒙. 𝐬𝐞𝐜 + 𝒚 𝒅𝒙 − 𝒙𝒅𝒚 = 𝟎
𝒙
𝒚 𝒚 𝒅𝒚
Divided by xdx 𝐬𝐞𝐜 𝒙
+ 𝒙 − 𝒅𝒙 = 𝟎
𝒚 𝒚 𝒅𝒚 𝒚 𝒅𝒚
𝒔𝒆𝒄 + = let u= and 𝑭 𝒖 =
𝒙 𝒙 𝒅𝒙 𝒙 𝒅𝒙
𝒅𝒙 𝒅𝒖
𝑭 𝒖 = 𝐬𝐞𝐜 𝒖 + 𝒖 remember the formula =
𝒙 𝒇 𝒖 −𝒖
𝒅𝒙 𝒅𝒖
=
𝒙 𝒔𝒆𝒄 𝒖 + 𝒖 − 𝒖
𝒅𝒙 𝒅𝒖 𝟏
= = 𝒄𝒐𝒔 𝒙
𝒙 𝒔𝒆𝒄 𝒖 𝒔𝒆𝒄 𝒙
𝐥𝐧 𝒙 = 𝐜𝐨𝐬 𝒖 𝒅𝒖 𝐥𝐧 𝒙 = 𝐬𝐢𝐧 𝒖 + 𝑪
𝒚 𝒚
Ln (x)= 𝐬𝐢𝐧 + 𝑪 𝒍𝒏 𝒙 − 𝑪 = 𝐬𝐢𝐧( )
𝒙 𝒙
𝒚
𝒙
= 𝐬𝐢𝐧−𝟏 (𝐥𝐧
𝒙 − 𝑪) *x we get
𝒚 = 𝒙. 𝐬𝐢𝐧−𝟏 (𝐥𝐧 𝒙 − 𝑪)
23
Exact differential equation
جمانة عبدهللا:المحاضرة الثالثة
𝒅𝒚
If 𝑴 𝒙, 𝒚 + 𝑵(𝒙, 𝒚) 𝒅𝒙 =0 then in differential form
M (x, y) dx + N (x, y) dy = 0 then
𝝏𝑴 𝝏𝑵
𝝏𝒙
𝒅𝒙 + 𝝏𝒚 𝒅𝒚 = 𝒅𝒇 𝒕𝒉𝒆𝒏 𝒅𝒇 𝒙, 𝒚 =0
𝒇 𝒙, 𝒚 = 𝑪
𝝏𝑴 𝝏𝑵
The equation is exact on domain D if and only if, =
𝝏𝒚 𝝏𝒙
Steps for solving exact D.E.
𝝏𝑴 𝝏𝑵
1- check if 𝝏𝒚 = 𝝏𝒙
then the equation is exact,
𝝏𝒇
2-integrate with respect to x and write the constant of integration as k(y)
𝝏𝒙
𝝏𝒇
3- Differentiate with respect to y and set the result equal to 𝒊. 𝒆. (𝑵) to find 𝒌′ (y)
𝝏𝒚
𝟐 𝟐 𝒙𝟑
𝟐) 𝒇(𝒙, 𝒚) = 𝒙 + 𝒚 𝒅𝒙 + 𝒌 𝒚 = + 𝒙 𝒚𝟐 + 𝐤 𝐲 …(1) where k(y) a function of y
𝟑
Y=constant
𝒅𝒇𝒙𝟑
3) + 𝒙𝒚𝟐 + 𝐤 𝐲 = 0+2xy+𝒌′ (𝒚)
𝒅𝒚 𝟑
𝒙𝟑 𝒙𝟑
5) 𝒇 𝒙, 𝒚 = + 𝒙𝒚𝟐 + 𝐬𝐢𝐧 𝒚 + 𝑪 + 𝒙𝒚𝟐 + 𝒔𝒊𝒏 𝒚 = 𝑪
𝟑 𝟑
Note that the solution of exact D.E. is always 25equal to constant
Example:2
𝟏 + 𝒚𝒆𝒙𝒚 𝐝𝐱 + 𝟐𝐲 + 𝐱𝒆𝒙𝒚 𝒅𝒚 = 𝟎
𝝏𝒇 𝒙𝒚
𝝏𝑴
= 𝟏 + 𝒚𝒆 = 𝑴 ⇒ = 𝒚𝒆𝒙𝒚 . 𝐱 + 𝒆𝒙𝒚
𝝏𝒙 𝝏𝒚
𝝏𝒇 𝝏𝑵
= 𝟐𝒚 + 𝒙𝒆𝒙𝒚 = 𝑵 ⇒ = 𝟎 + 𝒙𝒆𝒙𝒚 . 𝒚 + 𝒆𝒙𝒚
𝝏𝒚 𝝏𝒙
𝝏𝑴 𝝏𝑵
The equation is exact because =
𝝏𝒚 𝝏𝒙
𝒚𝒆𝒙𝒚
𝒇 𝒙, 𝒚 = (𝟏 + 𝒚𝒆𝒙𝒚 )𝒅𝒙 + 𝒌(𝒚) ⇒ 𝒇(𝒙, 𝒚) = 𝒙 + + 𝒌 𝒚 … … . . 𝟏)
𝒚
𝝏𝒇 𝝏𝒇
= 𝟎 + 𝒙𝒆𝒙𝒚 + 𝒌′ 𝒚 ⇒ =𝑵
𝝏𝒚 𝝏𝒚
𝒙𝒆𝒙𝒚 + 𝒌′ 𝒚 = 𝟐𝒚 + 𝒙𝒆𝒙𝒚 ⇒ 𝒌′ 𝒚 = 𝟐𝒚
𝒙 + 𝒆𝒙𝒚 +26𝒚𝟐 = C
Ex.3
𝒚
(𝒙 + )𝒅𝒙 + (𝒚𝟐 + 𝐥𝐧 𝒙)𝒅𝒚 = 𝟎
𝟑
𝒙
𝒚
1) M= (𝒙𝟑 + )𝒅𝒙 N= (𝒚𝟐 + 𝒍𝒏 𝒙)𝒅𝒚
𝒙
𝝏𝑴 𝟏 𝝏𝑵 𝟏
= =
𝝏𝒚 𝒙 𝝏𝒙 𝒙
𝝏𝑴 𝝏𝑵
The eq. is exact because =
𝝏𝒚 𝝏𝒙
𝒚
2)𝒇 𝒙, 𝒚 = (𝒙𝟑 + )𝒅𝒙+k(y)
𝒙
𝒙𝟒
= + 𝒚 𝐥𝐧 𝒙 + 𝒌(𝒚)……1)
𝟒
𝝏𝒇
= 𝟎 + 𝐥𝐧 𝒙 + 𝒌′ (y)
𝝏𝒚
′ 𝟐
𝒚𝟑
𝒌 𝒚 = 𝒚 𝒅𝒚 ⇒ 𝒌 𝒚 = … … 𝟐)
𝟑
Substitute eq.2 in eq.1
𝒙𝟒 𝒚𝟑
𝒇 𝒙, 𝒚 = + 𝒚 𝒍𝒏 𝒙 + ….𝒇 𝒙, 𝒚 = 𝑪
𝟒 𝟑
𝐱𝟒 𝐲𝟑
+ 𝐲 𝐥𝐧 𝐱 + =C 27
𝟒 𝟑
Where M(x,y)dx+N(x,y)dy=0
𝝏𝑴 𝝏𝑵
The equation is said to be exact if = and the solution of f(x,y)=C
𝝏𝒚 𝝏𝒙
𝝏𝑴 𝝏𝑵
If ≠ then the equation is not exact, therefore we find an integrating factor to
𝝏𝒚 𝝏𝒙
make it exact and solve to find the general solution of it.
Let I(x,y) be an integrating factor then
𝑰 𝒙, 𝒚 ∗ 𝑴 𝒙, 𝒚 𝒅𝒙 + 𝑰 𝒙, 𝒚 ∗ 𝑵 𝒙, 𝒚 𝒅𝒚 = 𝟎
𝑴𝒚 −𝑵𝒙
𝒅𝒚
𝑰 𝒚 =𝒆 −𝑴
28
Ex:4)
𝟐𝒙 + 𝟑𝒚 + 𝟏 𝒅𝒚 + 𝒚 + 𝟐 𝒅𝒙 = 𝟎
M(x,y)= 𝒚 + 𝟐 𝒅𝒙 and N(x,y)= 𝟐𝒙 + 𝟑𝒚 + 𝟏 𝒅𝒚
𝝏𝑴 𝝏𝑴
1) = 𝒚 + 𝟐 𝒅𝒙 ⇒ =𝟏
𝝏𝒚 𝝏𝒚
𝝏𝑵 𝝏𝑵 𝝏𝑴 𝝏𝑵
= 𝟐𝒙 + 𝟑𝒚 + 𝟏 ⇒ =𝟐 since ≠ then the eq. is not exact
𝝏𝒙 𝝏𝒙 𝝏𝒚 𝝏𝑿
𝑴𝒚 −𝑵𝒙
𝒅𝒚
2) 𝑰 𝒚 = 𝒆 −𝑴
𝟏−𝟐 −𝟏
𝒅𝒚 𝒅𝒚
𝑰 𝒚 =𝒆 −(𝒚+𝟐) = 𝑰 𝒚 =𝒆 −(𝒚+𝟐)
𝒚 + 𝟐 𝟐𝒙 + 𝟑𝒚 + 𝟏 𝒅𝒚 + 𝒚 + 𝟐 𝒚 + 𝟐 𝒅𝒙=0
𝟐𝒙𝒚 + 𝟑𝒚𝟐 + 𝒚 + 𝟒𝒙 + 𝟔𝒚 + 𝟐 𝒅𝒚 + 𝒚 + 𝟐 𝟐 𝒅𝒙 = 𝟎
𝟐𝒙𝒚 + 𝟑𝒚𝟐 + 𝟕𝒚 + 𝟒𝒙 + 𝟐 𝒅𝒚 + 𝒚 + 𝟐 𝟐 𝒅𝒙 = 𝟎
𝝏𝑴
=𝟐 𝒚+𝟐 ⇒ 2y+4
𝝏𝒚
𝝏𝑵 𝝏𝑴 𝝏𝑵
= 𝟐𝒚 + 𝟒 𝒕𝒉𝒆𝒏 =
𝝏𝒙 𝝏𝒚 𝝏𝒙
29
𝒇 𝒙, 𝒚 = (𝒚 + 𝟐)𝟐 𝒅𝒙 + 𝒌(𝒚)
=(𝒚 + 𝟐)𝟐 𝒙 + 𝒌 𝒚 … … … 𝟏)
𝝏𝒇
= 𝟐𝒙 𝒚 + 𝟐 + 𝒌′ (𝒚)
𝝏𝒚
𝝏𝒇
= 𝑵 ⇒ 𝟐𝒙𝒚 + 𝟒𝒙 + 𝒌′ (𝒚)=𝟐𝒙𝒚 + 𝟑𝒚𝟐 + 𝟕𝒚 + 𝟒𝒙 + 𝟐 (where N =I*N)
𝝏𝒚
𝒌′ 𝒚 = 𝟑𝒚𝟐 + 𝟕𝒚 + 𝟐
𝒌′ 𝒚 = (𝟑𝒚𝟐 + 𝟕𝒚 + 𝟐)𝒅𝒚
𝟕
𝒌 𝒚 = 𝒚𝟑 + 𝒚𝟐 + 𝟐𝒚 + 𝑪 …….2) substitute eq.2 in eq.1
𝟐
𝟕
𝒇 𝒙, 𝒚 = (𝒚 + 𝟐)𝟐 𝒙 + 𝒚𝟑 + 𝒚𝟐 + 𝟐𝒚 + 𝑪
𝟐
Or
𝟐 𝟑
𝟕 𝟐
(𝒚 + 𝟐) 𝒙 + 𝒚 + 𝒚 + 𝟐𝒚 = 𝑪
𝟐
30
Example:5
(2x-2y-1) dx - (x+1) dy = 0
𝝏𝑴
M(x,y)=(2x-2y-1 ) dx = −𝟐
𝝏𝒚
𝝏𝑵 𝝏𝑴 𝝏𝑵
N(x,y)=(-x-1) dy = −1 because ≠ the eq. is not exact
𝝏𝒙 𝝏𝒚 𝝏𝒙
We find Integrating factor to make it exact:
𝑴𝒚 −𝑵𝒙
𝒅𝒙
𝑰 𝒙 =𝒆 𝑵
−𝟐+𝟏 𝟏
𝒅𝒙 𝒅𝒙
𝑰 𝒙 =𝒆 −(𝒙+𝟏) =𝒆 (𝒙+𝟏) 𝑰 𝒙 = 𝒆𝐥𝐧(𝒙+𝟏) = (𝒙 + 𝟏)
𝑰 𝒙 =x+1 integ. factor
(x+1)*(2x-2y-1) dx – (x+1)*(x+1) dy = 0
31
2) 𝒇 𝒙, 𝒚 = 𝑵 𝒙, 𝒚 𝒅𝒚 = − 𝒙 + 𝟏 𝟐 𝒅𝒚 + 𝒌(𝒙)
=−(𝒙 + 𝟏)𝟐 𝒚 + 𝒌(𝒙) ………1)
𝝏𝒇
3) = −𝟐𝒚 𝒙 + 𝟏 + 𝒌′(x)
𝝏𝒙
𝝏𝒇
= −𝟐𝒚𝒙 − 𝟐𝒚 + 𝒌′ 𝒙 ⇒ =𝑴
𝝏𝒙
= −𝟐𝒚𝒙 − 𝟐𝒚 + 𝒌′ 𝒙 = 𝟐𝒙𝟐 − 𝟐𝒙𝒚 + 𝒙 − 𝟐𝒚 − 𝟏
𝒌′ 𝒙 = 𝟐𝒙𝟐 + 𝒙 − 𝟏
𝒌′ 𝒙 = (𝟐𝒙𝟐 + 𝒙 − 𝟏 )𝒅𝒙
𝟐 𝒙𝟐
𝒌 𝒙 = 𝒙𝟑 + − 𝒙 + 𝑪 ……….2) substitute eq.(2) in eq.(1)
𝟑 𝟐
𝟐 𝒙𝟐
𝒇 𝒙, 𝒚 = −(𝒙 + 𝟏)𝟐 𝒚 + 𝒙𝟑 + −𝒙+𝑪 or
𝟑 𝟐
𝒇 𝒙, 𝒚 = 𝑪
𝟐 𝟑 𝒙𝟐
−𝒚𝒙𝟐 − 𝟐𝒚𝒙 − 𝒚 + 𝒙 + −𝒙=𝑪
𝟑 𝟐
32