Professional Documents
Culture Documents
Emad Al-Hemiary
Second Year, First Semester Homogeneous ODE and
2022-2023 Higher Order ODEs
Non-Homogeneous ODE
Example 8.1:
Solve the following 2nd order ODE using undetermined coefficients method:
𝑦 ′′ + 5𝑦 ′ + 4𝑦 = 10𝑒 −3𝑥
Solution:
Our general solution is: 𝑦(𝑥) = 𝑦ℎ (𝑥) + 𝑦𝑝 (𝑥)
1
Engineering Mathematics I Lecture 8: Non- Prof. Dr. Emad Al-Hemiary
Second Year, First Semester Homogeneous ODE and
2022-2023 Higher Order ODEs
𝑦 ′′ + 5𝑦 ′ + 4𝑦 = 10𝑒 −3𝑥
𝑑2𝑦 𝑑𝑦
2
(𝑘𝑒 −3𝑥 ) + 5 (𝑘𝑒 −3𝑥 ) + 4𝑘𝑒 −3𝑥 = 10𝑒 −3𝑥
𝑑𝑥 𝑑𝑥
9𝑘𝑒 −3𝑥 − 15𝑘𝑒 −3𝑥 + 4𝑘𝑒 −3𝑥 = 10𝑒 −3𝑥 → −2𝑘 = 10 → 𝑘 = −5
Finally:
Example 8.2:
Solve the initial value problem 𝑦 ′′ + 𝑦 = 0.001𝑥 2 𝑦(0) = 0, 𝑦 ′ (0) = 1.5
Solution:
The general solution is given by:
𝑦(𝑥) = 𝑦ℎ (𝑥) + 𝑦𝑝 (𝑥)
Thus:
𝑦ℎ (𝑥) = 𝐴 cos 𝑥 + 𝐵 sin 𝑥
Non-homogeneous part 𝑦𝑝 (𝑥):
𝑦 ′′ + 𝑦 = 0.001𝑥 2
𝑑2𝑦
(𝑘 𝑥 2 + 𝑘1 𝑥 + 𝑘0 ) + (𝑘2 𝑥 2 + 𝑘1 𝑥 + 𝑘0 ) = 0.001𝑥 2 → (2𝑘2 ) + (𝑘2 𝑥 2 + 𝑘1 𝑥 + 𝑘0 ) = 0.001𝑥 2
𝑑𝑥 2 2
2
Engineering Mathematics I Lecture 8: Non- Prof. Dr. Emad Al-Hemiary
Second Year, First Semester Homogeneous ODE and
2022-2023 Higher Order ODEs
𝑘2 = 0.001
{ 𝑘1 = 0 → 𝑘0 = −2𝑘2 = −2(0.001) = −0.002
2𝑘2 + 𝑘0 = 0
We therefore get:
𝑦𝑝 (𝑥) = 0.001𝑥 2 − 0.002
Example 8.3:
Solve the following 2nd order ODE using undetermined coefficients method:
𝑦 ′′ − 9𝑦 = 18 cos 𝜋𝑥
Solution:
Our general solution is: 𝑦(𝑥) = 𝑦ℎ (𝑥) + 𝑦𝑝 (𝑥)
From table (8.1) select 𝑦𝑝 (𝑥) = 𝑘1 cos 𝜋𝑥 + 𝑘2 sin 𝜋𝑥. Substitute 𝑦𝑝 (𝑥) in ODE:
𝑦 ′′ − 9𝑦 = 18 cos 𝜋𝑥
𝑑2𝑦
(𝑘 cos 𝜋𝑥 + 𝑘2 sin 𝜋𝑥) − 9(𝑘1 cos 𝜋𝑥 + 𝑘2 sin 𝜋𝑥) = 18 cos 𝜋𝑥
𝑑𝑥 2 1
𝑑𝑦
(−𝜋𝑘1 sin 𝜋𝑥 + 𝜋𝑘2 cos 𝜋𝑥) − 9𝑘1 cos 𝜋𝑥 − 9𝑘2 sin 𝜋𝑥 = 18 cos 𝜋𝑥
𝑑𝑥
−𝜋 2 𝑘1 cos 𝜋𝑥 − 𝜋 2 𝑘2 sin 𝜋𝑥 − 9𝑘1 cos 𝜋𝑥 − 9𝑘2 sin 𝜋𝑥 = 18 cos 𝜋𝑥
18
−𝜋 2 𝑘2 − 9𝑘2 = 0 → 𝑘2 = 0 → −𝜋 2 𝑘1 − 9𝑘1 = 18 → 𝑘1 = −
𝜋2+9
Finally, we get:
18
𝑦(𝑥) = 𝑐1 𝑒 −3𝑥 + 𝑐2 𝑒 3𝑥 − cos 𝜋𝑥
𝜋2+9
3
Engineering Mathematics I Lecture 8: Non- Prof. Dr. Emad Al-Hemiary
Second Year, First Semester Homogeneous ODE and
2022-2023 Higher Order ODEs
Step 2: Integrate 𝑣1′ 𝑎𝑛𝑑 𝑣2′ to obtain 𝑣1 𝑎𝑛𝑑 𝑣2 discarding all constants of integration.
Procedure 2:
The particular part can be evaluated directly from Lagrange method:
𝑦ℎ (𝑥) = 𝑐1 𝑦1 + 𝑐2 𝑦2
𝑦2 𝑟 𝑦1 𝑟
𝑦𝑝 (𝑥) = −𝑦1 ∫ 𝑑𝑥 + 𝑦2 ∫ 𝑑𝑥
𝑊 𝑊
𝑊 = 𝑊𝑟𝑜𝑛𝑠𝑘𝑖𝑎𝑛 = 𝑦1 𝑦2′ − 𝑦2 𝑦1′
Example 8.4: Solve the 2nd order ODE using variation of parameters:
′′ ′
𝑒𝑥
𝑦 − 2𝑦 + 𝑦 =
𝑥
Solution:
Our general solution is: 𝑦(𝑥) = 𝑦ℎ (𝑥) + 𝑦𝑝 (𝑥)
4
Engineering Mathematics I Lecture 8: Non- Prof. Dr. Emad Al-Hemiary
Second Year, First Semester Homogeneous ODE and
2022-2023 Higher Order ODEs
𝑦 ′′ − 2𝑦 ′ + 𝑦 = 0 → 𝜆2 − 2𝜆 + 1 = 0 → (𝜆 − 1)2 = 0 → 𝜆1,2 = 1
Thus:
𝑦ℎ (𝑥) = (𝑐1 + 𝑐2 𝑥)𝑒 𝑥
Non-homogeneous part 𝑦𝑝 (𝑥):
Example 8.5: Solve the 2nd order ODE using variation of parameters:
𝑦 ′′ + 2𝑦 ′ − 3𝑦 = 𝑒 𝑥 − 𝑥 − 1
Solution:
Our general solution is: 𝑦(𝑥) = 𝑦ℎ (𝑥) + 𝑦𝑝 (𝑥)
where:
𝑦ℎ (𝑥) = 𝑐1 𝑦1 + 𝑐2 𝑦2 + ⋯ + 𝑐𝑛 𝑦𝑛
{ (8.6)
𝑦𝑝 (𝑥) = 𝑣1 𝑦1 (𝑥) + 𝑣2 𝑦2 (𝑥) + ⋯ + 𝑣𝑛 𝑦𝑛 (𝑥)
Solution of (8.6) can be carried out using procedure 1 above. The following examples illustrate
this.
Example 8.6: Solve the 4th order ODE given by:
𝑦 (4) − 5𝑦 ′′ + 4𝑦 = 0
Solution:
This is a homogeneous equation; it has the characteristic equation:
𝜆4 − 5𝜆2 + 4 = 0 → (𝜆2 − 1)(𝜆2 − 4) = 0 → (𝜆 − 1)(𝜆 + 1)(𝜆 − 2)(𝜆 + 2) = 0 → 𝜆1 = 1, 𝜆2
= −1, 𝜆3 = 2, 𝜆4 = −2
6
Engineering Mathematics I Lecture 8: Non- Prof. Dr. Emad Al-Hemiary
Second Year, First Semester Homogeneous ODE and
2022-2023 Higher Order ODEs
𝑦(𝑥) = 𝑐1 𝑒 𝑥 + 𝑐2 𝑒 −𝑥 + 𝑐3 𝑒 2𝑥 + 𝑐2 𝑒 −2𝑥
7
Engineering Mathematics I Lecture 8: Non- Prof. Dr. Emad Al-Hemiary
Second Year, First Semester Homogeneous ODE and
2022-2023 Higher Order ODEs
8
Engineering Mathematics I Lecture 8: Non- Prof. Dr. Emad Al-Hemiary
Second Year, First Semester Homogeneous ODE and
2022-2023 Higher Order ODEs
1 1
∴ 𝑦𝑝 (𝑥) = 𝑣1 𝑦1 + 𝑣2 𝑦2 + 𝑣3 𝑦3 = {𝑒 𝑥 + 1 − ln|𝑒 𝑥 + 1|} − 𝑒 𝑥 ln(𝑒 𝑥 + 1) − 𝑒 2𝑥 ln(𝑒 −𝑥 + 1)
2 2
Finally:
1 1
𝑦(𝑥) = 𝑐1 + 𝑐2 𝑒 𝑥 + 𝑐3 𝑒 2𝑥 + {𝑒 𝑥 + 1 − ln|𝑒 𝑥 + 1|} − 𝑒 𝑥 ln(𝑒 𝑥 + 1) − 𝑒 2𝑥 ln(𝑒 −𝑥 + 1)
2 2