Topic 4. EMS 112-2021
Topic 4. EMS 112-2021
TOPIC 4: ORDINARY
DIFFERENTIAL EQUATIONS
Mobile: 0679595630/0742987389
Email: llydia@mzumbe.ac.tz
OUTLINE:
dv c (Dependent
9.8 v variable) unknown
function to be
dt M determined
INTRODUCTION TO DES
6
dv c
9.8 v
dt M
(independent variable)
the variable with respect to which other
variables are differentiated
INTRODUCTION TO DES
Examples:
dx(t )
x(t ) et First order ODE
dt
2
d x(t ) dx(t )
2
5 2 x(t ) cos(t ) Second order ODE
dt dt
3
d x(t )
2
dx(t )
2
2 x 4 (t ) 1 Second order ODE
dt dt
INTRODUCTION TO DES
12
Examples :
dx(t ) First order ODE of
x(t ) et
dt degree 1
d 2 x(t ) dx(t )
2
5 2 x(t ) cos(t ) Second order ODE of
dt dt degree 1
3
d x(t )
2
dx(t )
2
2 x 4 (t ) 1 Second order ODE of
dt dt degree 3
14
Introduction to DEs
𝑑𝑛 𝑦 𝑑 𝑛−1 𝑦 𝑑𝑦
𝑎0 (𝑥) 𝑑𝑥𝑛 +𝑎1 (𝑥) 𝑑𝑥𝑛−1 +…+𝑎𝑛−1 (𝑥) 𝑑𝑥 +𝑎𝑛 𝑥 𝑦 = b(x), where 𝑎0 ≠ 0
15
Introduction to DEs
• Note:
-For Linear ODEs, there are no multiplications among
dependent variables and their derivatives. All
coefficients are functions of independent variables
-The unknown function and its derivatives appear to
power one
16
Introduction to DEs
𝑑𝑛 𝑦 𝑑 𝑛−1 𝑦 𝑑𝑦
𝑎0 (𝑥) 𝑑𝑥𝑛 +𝑎1 (𝑥) 𝑑𝑥𝑛−1 +…+𝑎𝑛−1 (𝑥) 𝑑𝑥 +𝑎𝑛 𝑥 𝑦 = b(x), where 𝑎0 ≠ 0
INTRODUCTION TO DES
Examples :
dx(t )
x(t ) et Linear ODE
dt
d 2 x(t ) dx(t ) Linear ODE
2
5 2t 2
x(t ) cos(t )
dt dt
3
d x(t ) dx(t )
2
2 x(t ) 1 Non-linear ODE
dt dt
INTRODUCTION TO DES
Is it unique?
Conditions
d 2 x (t )
4 x (t ) 0 Second order ODE
dt 2
x ( 0) a Two conditions are
x (0) b needed to uniquely
specify the solution
24
Boundary-Value and Initial value Problems
2 t
x 2 x x e x 2 x x e 2t
x(0) 1, x (0) 2.5 x(0) 1, x(2) 1.5
same different
SOLUTION OF ODES
25
• Order
-First order ODE
-Second order ODE
-nth order ODE
CLASSIFICATION CONTINUED
• Auxiliary conditions
-Initial value problems
-Boundary value problems
• Linearity
-Linear ODE
-Nonlinear ODE
FIRST ORDER ODES
• The first order ODEs for the function y=y(x) are of the
form:
𝑑𝑦
= 𝑓 𝑥, 𝑦 , (4)
𝑑𝑥
𝑑𝑦
• ODE of the form = f(x) or one that can be
𝑑𝑥
arranged in such a form that can be simply solved
by direct integration.
𝑑𝑦
• Example: Solve =4𝑥 3 -2x+1
𝑑𝑥
SOLVING BY DIRECT INTEGRATION
𝑑𝑦
dx= 4𝑥 3 −2x+1 dx
𝑑𝑥
Solving, y(x)= 𝑥 4 - 𝑥 2 +x
SEPARATION OF VARIABLES
𝑑𝑦
• Example: Solve 2 + y = 3, with y(0) = 2.
𝑑𝑥
Solution.
By separating the variable
𝑑𝑦 1 𝑑𝑦 1
= (3-y)→ = dx
𝑑𝑥 2 3−𝑦 2
SEPARATION OF VARIABLES
𝑦 1
• Solving, - 𝑙𝑛 3 − 𝑦 2 =2 x
1
ln(3−y) –ln(1)= − x
2
1
ln(3−y) = − x, since ln (1)=0
2
3-y=𝑒 − 1
2
x
y(x)=3- 𝑒 −
1
2
x
HOMOGENEOUS ODES
3 𝑑𝑦
• Example : Solve 𝑥 = 𝑥 2 y-2 𝑦 3
𝑑𝑥
3 𝑑𝑦 𝑑𝑦 𝑦 𝑦 𝟑
• Solution: 𝑥 = 𝑥 2 y-2 𝑦 3 → = -2 (6)
𝑑𝑥 𝑑𝑥 𝑥 𝑥
𝑦 𝑑𝑦 𝑑𝑣
Let v= → y=xv, =v + x (7)
𝑥 𝑑𝑥 𝑑𝑥
HOMOGENEOUS ODES
𝑑𝑣 3 𝑑𝑣
v+ x =v-2 𝑣 →x = -2 𝑣 3
𝑑𝑥 𝑑𝑥
−3 −2
𝑣 dv= dx
𝑥
HOMOGENEOUS ODES
1 𝑥2 𝑥2
=-2ln 𝑥 → =4ln 𝑥 +c → =4ln 𝑥 +c
−2𝑣 2 𝑦2 𝑦2
𝑥
y(x)=
2 ln 𝑥 +𝑐
EXACT METHOD
𝑑𝑦
• We say the equation =f(x,y) is an exact
𝑑𝑥
differential equation if
𝑑𝑦 −𝑀(𝑥,𝑦)
= (8)
𝑑𝑥 𝑁(𝑥,𝑦)
𝜕𝑀 𝜕𝑁
• Note: The differential equation is exact if =
𝜕𝑦 𝜕𝑥
EXACT METHOD
3 𝜕𝑀
• Let M(x,y)= 2𝑥𝑦 + 2, = 6 x𝑦 2 , and
𝜕𝑦
2 2 𝑦 𝜕𝑁
N(x,y)=3𝑥 𝑦 + 𝑒 , = 6 x𝑦 2 ,
𝜕𝑥
𝜕𝑀 𝜕𝑁
• Since = , the given DE is exact differential
𝜕𝑦 𝜕𝑥
equation
EXACT METHOD
• Solving,
𝜕𝐹
= M(x,y)= 2𝑥𝑦 3 + 2,
𝜕𝑥
𝒙
• Assume 𝜇0 =1, then 𝝁(𝒙)= exp 𝒙𝟎
k(x)dx (15)
INTEGRATING FACTOR
𝜕𝑀 𝜕𝑁
−
𝜕𝑦 𝜕𝑥
k(x)=
𝑵
INTEGRATING FACTOR
𝜇(𝑦) 𝑦
ln = 𝑦0
k(y)d𝑦
𝜇0
• Applying the exponential throughout and
simplifying
𝑦
𝜇(𝑦)= 𝜇0 exp 𝑦0
k(y)d𝑦
𝒚
• Assume 𝜇0 =1, then 𝝁(𝒚)= exp 𝒚𝟎
k(y)d𝒚 (17)
•
INTEGRATING FACTOR
𝜕𝑀 𝜕𝑁
−
𝜕𝑦 𝜕𝑥
where k(y)=
−𝑴
INTEGRATING FACTOR
• Example: Solve (𝑥 2 - 𝑦 2 ) dy + xy dx = 0
Solution:
2 2 𝜕𝑁
• Here, N= 𝑥 - 𝑦 → =2x, and
𝜕𝑥
𝜕𝑀
M= xy→ =x
𝜕𝑦
Hence, it is not exact DE
INTEGRATING FACTOR
𝜕𝑀 𝜕𝑁
− 1
𝜕𝑦 𝜕𝑥
• 𝜇(𝑦)= exp 𝑘 𝑦 𝑑𝑦 , k(y)= =
−𝑴 𝑦
1
Then, 𝜇(𝑦)=exp( 𝑑𝑦)=𝑒 𝑙𝑛𝑦 =y
𝑦
INTEGRATING FACTOR
(𝑥 2 y- 𝑦 3 )dy+x 𝑦 2 dx =0
2 3 𝜕𝑁
• Now, N=𝑥 y- 𝑦 → =2xy, and
𝜕𝑥
2 𝜕𝑀
• M= x 𝑦 → =2xy, hence DE is exact
𝜕𝑦
INTEGRATING FACTOR
𝜕𝐹(𝑥,𝑦)
• = M(x,y)= x 𝑦 2 (18)
𝜕𝑥
𝜕𝐹(𝑥,𝑦)
• = N(x,y)= 𝑥 2 y- 𝑦 3 (19)
𝜕𝑦
𝑥 2 𝑦2
F(x,y)= + F(y) (20)
2
INTEGRATING FACTOR
𝜕𝐹(𝑥,𝑦) 2 dF(y)
=𝑥 y+ (21)
𝜕𝑦 dy
dF(y) −𝑦4
= −𝑦 3 → 𝐹 𝑦 = +C
dy 4
INTEGRATING FACTOR
𝑥 2 𝑦2 −𝑦4
F(x,y)= + +C
2 4
LINEAR DIFFERENTIAL EQUATIONS
𝑑𝑦
+ p(x)y = g(x), (22)
𝑑𝑥
𝑑
𝜇 𝑥 𝑦 = 𝜇(𝑥)g(x) (25)
𝑑𝑥
LINEAR DIFFERENTIAL EQUATIONS
𝑑𝑦
• Example: Solve + 2𝑦 = 𝑒 −𝑥 , with y(𝑥0 )=3 4
𝑑𝑥
Solution:
=exp( 2𝑑𝑥)=𝑒 2𝑥
LINEAR DIFFERENTIAL EQUATIONS
2𝑥 𝑑𝑦
•𝑒 + 𝑝 𝑥 𝑦 = 𝑒 2𝑥 𝑒 −𝑥 (26)
𝑑𝑥
𝑑
𝜇 𝑥 𝑦 = 𝜇(𝑥)g(x)
𝑑𝑥
𝑑
𝑒 2𝑥 𝑦 =𝑒 2𝑥 𝑒 −𝑥 (27)
𝑑𝑥
LINEAR DIFFERENTIAL EQUATIONS
𝑒 2𝑥 y = 𝑒 𝑥 dx = 𝑒 𝑥 + C
→ C = −1 4
LINEAR DIFFERENTIAL EQUATIONS
y(x)= 𝑒 −𝑥 − 1
4 𝑒 −2𝑥
BERNOULLI DIFFERENTIAL EQUATION
𝑛
• Divide equation (32) by 𝑣 1−𝑛 , leads to the First- order
Linear DE,
1 𝑑𝑦
+ p(x) 𝑣 1−𝑛 = g(x) (33)
1−𝑛 𝑑𝑥
2 𝑑𝑦
3𝑦 + 𝑦 3 = 𝑒 −𝑥
𝑑𝑥
BERNOULLI DIFFERENTIAL EQUATION
• Solution:
𝑑𝑦 1 𝑒 −𝑥 𝑦−2
+ y= (34)
𝑑𝑥 3 3
BERNOULLI DIFFERENTIAL EQUATION
𝑑𝑦 𝑑𝑦 𝑑𝑣 1 −2 𝑑𝑣
= = 𝑣 3 (35)
𝑑𝑥 𝑑𝑣 𝑑𝑥 3 𝑑𝑥
BERNOULLI DIFFERENTIAL EQUATION
−2
1 −2 𝑑𝑣 1 1 𝑒 −𝑥 𝑣 3
𝑣 3 + 𝑣 3 = (36)
3 𝑑𝑥 3 3
−2
• Dividing (36) by 𝑣 3 and simplifying, leads to
𝑑𝑣
+v=𝑒 −𝑥 (37)
𝑑𝑥
BERNOULLI DIFFERENTIAL EQUATION
𝑒 𝑥 v = x+C → v= (x+C) 𝑒 −𝑥
• But v= 𝑦 3 → 𝑦 3 = (x+C) 𝑒 −𝑥
BERNOULLI DIFFERENTIAL EQUATION
1 −𝑥
• y(x)= x+C 3 𝑒 3 is the general solution of
the DE
• Try this!! Solve
𝑑𝑦 1
− y=x𝑦 2
𝑑𝑥 𝑥
Answer: y(x)=-2x+c𝑥 −2
APPLICATION OF FIRST-ORDER DES
• Examples
(a) A second order, linear, homogeneous,
constant coefficients differential equation
is
𝑑2 𝑦 𝑑𝑦
+ 5 +6=0,
𝑑𝑥 2 𝑑𝑥
LINEAR SECOND ORDER ODES
• Examples
(b) A second order, linear, non-homogeneous,
constant coefficients equation is
𝑑2 𝑦 𝑑𝑦
− 3 + y = x,
𝑑𝑥 2 𝑑𝑥
LINEAR SECOND ORDER ODES
• Examples
(c) A second order, linear, non-homogeneous,
variable coefficients equation is
𝑑2 𝑦 𝑑𝑦
+ 2𝑥 - ln (x) y =𝑒 3𝑥 ,
𝑑𝑥 2 𝑑𝑥
HOMOGENEOUS , LINEAR SECOND ORDER ODES
WITH CONSTANT COEFFICIENTS,
HOMOGENEOUS , LINEAR SECOND ORDER
ODES WITH CONSTANT COEFFICIENTS,
by 2 determinant
𝑦1 (x) 𝑦2 (x) ′ ′
W(𝑦1 , 𝑦2 ) = = 𝑦1 (x) 𝑦2 (𝑥)- 𝑦2 (x) 𝑦1 (𝑥)
𝑦1 ′ (𝑥) ′
𝑦2 (𝑥)
PROPERTIES OF THE WRONSKIAN
𝑑2 𝑦 𝑑𝑦
Example: Solve 𝑑𝑥 2
−5
𝑑𝑥
=0
Solution:
Let y=𝑒 𝑚𝑥
𝑦 ′ = 𝑚𝑒 𝑚𝑥 and 𝑦 ′′ = 𝑚2 𝑒 𝑚𝑥
𝑑2 𝑦 𝑑𝑦
− 5 = 𝑚2 𝑒 𝑚𝑥 -5 𝑚𝑒 𝑚𝑥 =0
𝑑𝑥 2 𝑑𝑥
𝑚𝑥
𝑒 m(m-5)=0
HOMOGENEOUS , LINEAR SECOND ORDER
ODES WITH CONSTANT COEFFICIENTS,
m=0 or m=5
Then y(x)=𝑐1 𝑒 0𝑥 + 𝑐2 𝑒 5𝑥 = 𝑐1 + 𝑐2 𝑒 5𝑥
𝑑2 𝑥 𝑑𝑥
+ 5 +4x= 0, with y(0)= 1,𝑦 ′ (0)=-7
𝑑𝑡 2 𝑑𝑡
HOMOGENEOUS , LINEAR SECOND ORDER
ODES WITH CONSTANT COEFFICIENTS,
𝑦 ′ = 𝑚𝑒 𝑚𝑡 and 𝑦 ′′ = 𝑚2 𝑒 𝑚𝑡
𝑑2 𝑥 𝑑𝑥
• + 5 +4x = 𝑚2 𝑒 𝑚𝑡 + 5𝑚𝑒 𝑚𝑡 + 4𝑒 𝑚𝑡 =0
𝑑𝑡 2 𝑑𝑡
HOMOGENEOUS , LINEAR SECOND ORDER
ODES WITH CONSTANT COEFFICIENTS,
• 𝑒 𝑚𝑡 (𝑚2 +5m+4)=0
𝑚2 +5m+4=0
Solving, m=- 1 or -4
y(t)= 𝑐1 𝑒 −𝑡 + 𝑐2 𝑒 −4𝑡
HOMOGENEOUS , LINEAR SECOND ORDER
ODES WITH CONSTANT COEFFICIENTS,
y(0)= 1 → 1= 𝑐1 + 𝑐2
𝑦 ′ (0)=-7, -7= - 𝑐1 − 4 𝑐2
HOMOGENEOUS , LINEAR SECOND ORDER
ODES WITH CONSTANT COEFFICIENTS,
• Solving, 𝑐1 =- 1 and 𝑐2 =2
• Example 3: Solve
𝑦1 𝑦1 𝑣(𝑥)
W(𝑦1 , 𝑦2 )(x)= ′
𝑦1 𝑦1′ 𝑣(𝑥) + 𝑦1 𝑣 ′ (𝑥)
= 𝑦1 𝑦1′ 𝑣(𝑥) + 𝑦1 𝑦1 𝑣 ′ (x)- 𝑦1′ 𝑦1 𝑣(𝑥)
=𝑦12 𝑣 ′ (x) (44)
REDUCTION OF ORDER METHOD
• 𝑦12 𝑣 ′ (x)= 𝑐𝑒 − 𝑝 𝑥 𝑑𝑥
′ 𝑐 − 𝑝 𝑥 𝑑𝑥
→ 𝑣 (x)= 𝑒
𝑦12
Choose c=1
• Applying the integral on both sides, we have
1
v(x)= 𝑒− 𝑝 𝑥 𝑑𝑥
dx (46)
𝑦12
REDUCTION OF ORDER METHOD
𝑥2 𝑥 2 𝑣(𝑥)
W(𝑦1 , 𝑦2 )=
2𝑥 2𝑥𝑣 𝑥 + 𝑥 2 𝑣 ′ (𝑥)
= 2𝑥 3 𝑣 𝑥 + 𝑥 4 𝑣 ′ (𝑥)- 2𝑥 3 𝑣 𝑥
= 𝑥 4 𝑣 ′ (𝑥) (47)
REDUCTION OF ORDER METHOD
(EXAMPLE 1 CONTINUED)
• By Abel′ s theorem
2
− − 𝑑𝑥 ln 𝑥 2
W(𝑦1 , 𝑦2 )=c𝑒 𝑋 =c𝑒 =c𝑥 2 (48)
• Equating (47) and (48)
4 ′ 2 ′ 𝑐
𝑥 𝑣 (𝑥) =c𝑥 → 𝑣 (𝑥)= 2
𝑥
• Applying the integral throughout
−2 𝑐
v(x)= 𝑐𝑥 𝑑𝑥= − +d
𝑥
REDUCTION OF ORDER METHOD
(EXAMPLE 1 CONTINUED)
v(x)=−1 𝑥 → 𝑦2 =𝑥 2 ( −1 𝑥 )=-x
y(x)=𝑐1 𝑥 2 − 𝑐2 x
REDUCTION OF ORDER METHOD
(EXAMPLE 2)
• 𝐄𝐱𝐚𝐦𝐩𝐥𝐞 2: If it is known that 𝑦1 = 𝑥 is a solution of
𝑥 2 𝑦 ′′ − 𝑥(𝑥 + 2)𝑦 ′ + (𝑥 + 2)𝑦 = 0. Find its general
solution.
• Solution:
′′ (𝑥+2) ′ (𝑥+2) (𝑥+2)
Rewrite DE 𝑦 − 𝑦 + 2 𝑦 = 0, p(x)= −
𝑥 𝑥 𝑥
REDUCTION OF ORDER METHOD
(EXAMPLE 2 CONTINUED)
• 𝑦1 =x, let 𝑦2 =xv(x)
𝑥 𝑥𝑣(𝑥)
W(𝑦1 , 𝑦2 )=
1 𝑣 𝑥 + 𝑥𝑣 ′ (𝑥)
= x𝑣 𝑥 + 𝑥 2 𝑣 ′ (𝑥)- x𝑣 𝑥
= 𝑥 2 𝑣 ′ (𝑥) (49)
REDUCTION OF ORDER METHOD
(EXAMPLE 2 CONTINUED)
• By Abel′ s theorem
(𝑥+2)
− − 𝑑𝑥 x+ln 𝑥 2
W(𝑦1 , 𝑦2 )=c𝑒 𝑥 =c𝑒
𝑥 ln 𝑥 2
=c(𝑒 𝑒 ) =c(𝑥 2 𝑒 𝑥 ) (50)
• Equating (49) and (50) and apply the integral
v(x)=𝑒 𝑥 → 𝑦2 =𝑥 𝑒 𝑥
y(x)=𝑐1 𝑥 + 𝑐2 x𝑒 𝑥
NON-HOMOGENEOUS LINEAR SECOND ORDER
ODES WITH CONSTANT COEFFICIENTS,
NON-HOMOGENEOUS LINEAR SECOND ORDER
ODES ,
• Let x(t)= A𝑒 2𝑡
(4A-3(2A)-4A)𝑒 2𝑡 = 3𝑒 2𝑡
EXAMPLE 1 CONTINUED
• Solving, A=−1 2
2𝑡
𝑥𝑝 (t)= −1 2 𝑒
x(t)= 𝑥𝑐 (t)+𝑥𝑝 (t)= 𝑐1 𝑒 −4𝑡 + 𝑐2 𝑒 −𝑡 + −1 2 𝑒 2𝑡
Solving, 𝑐1 = 1 2 and 𝑐2 =1
Hence,
7 4
y(t) =𝑥𝑐 (t)+𝑥𝑝 (t)= 𝑐1 𝑒 + 𝑐2 𝑒
−𝑡 3𝑡
− cos 2𝑡 − sin(2𝑡)
13 13
METHOD OF UNDETERMINED COEFFICIENTS
• We change it into
y″ + p(x) y′ + q(x) y = 𝑓1 (t)
y″ + p(x) y′ + q(x) y = 𝑓2 (t)
:
y″ + p(x) y′ + q(x) y = 𝑓𝑛 (t)
METHOD OF UNDETERMINED COEFFICIENTS
Note
• There is a complication that occurs under a certain
circumstance.
• This is when the nonhomogeneous function, f(x) is a part of
the complementary solution.
• For this case, multiply the usual choice by t (independent
variable)
METHOD OF UNDETERMINED COEFFICIENTS
• Note;
-It is not possible to find exact values of two unknowns
𝑢1 and 𝑢2 using one equation obtained by substituting
y, 𝑦 ′ and 𝑦 ′′ .
- So one extra condition must be introduced to find the
solutions easily.
METHOD OF VARIATION OF PARAMETERS
Thus,
using 𝑦𝑝 = 𝑢1 (x) 𝑦1 (x)+ 𝑢2 (x) 𝑦2 (x)
𝑦𝑝′ = 𝑢1 𝑦1′ + 𝑢2 𝑦2′ +(𝑢1′ 𝑦1 + 𝑢2′ 𝑦2 )=0
Since 𝑢1′ 𝑦1 + 𝑢2′ 𝑦2 = 0 , 𝑦𝑝′ = 𝑢1 𝑦1′ + 𝑢2 𝑦2′
𝑦𝑝′′ = 𝑢1 𝑦1′′ + 𝑢2 𝑦2′′ + 𝑢1′ 𝑦1′ + 𝑢2′ 𝑦2′
METHOD OF VARIATION OF PARAMETERS
′ 𝑦1 𝑥 𝑓(𝑥) ′ 𝑦2 𝑥 𝑓(𝑥)
• Hence, 𝑢1 = - and 𝑢2 = (58)
𝑊(𝑥) 𝑊(𝑥)