You are on page 1of 9

Engineering Mathematics I Lecture 8: Non- Prof. Dr.

Emad Al-Hemiary
Second Year, First Semester Homogeneous ODE and
2022-2023 Higher Order ODEs

Non-Homogeneous ODE

Recalling the non-homogeneous 2nd order ODE given by:


𝑦 ′′ + 𝑝(𝑥)𝑦 ′ + 𝑞(𝑥)𝑦 = 𝑟(𝑥) (8.1)
With 𝑟(𝑥) ≢ 0, then the general solution is the sum of the general solution of the homogeneous
and particular solution:
𝑦(𝑥) = 𝑦ℎ (𝑥) + 𝑦𝑝 (𝑥) (8.2)

Two solution methods:


• Method of undetermined coefficients
• Method of variation of parameters

Methos of Undetermined Coefficients


Step 1: The homogeneous solution 𝑦ℎ (𝑥) is obtained by solving as we learned previously:
𝑦 ′′ + 𝑝(𝑥)𝑦 ′ + 𝑞(𝑥)𝑦 = 0
Step 2: The particular solution 𝑦𝑝 (𝑥) is obtained by assuming to be one of the forms given in
Table (8.1) and substitute into the given ODE.
Table (8.1)

Term in 𝒓(𝒙) Choice of 𝒚𝒑 (𝒙)


𝒆𝒂𝒙 𝑘𝑒 𝑎𝑥
𝒙𝒏 (𝒏 = 𝟎, 𝟏, 𝟐, … ) 𝑘𝑛 𝑥 𝑛 + 𝑘𝑛−1 𝑥 𝑛−1 + ⋯ + 𝑘1 𝑥 + 𝑘0
𝒙𝒏 𝒆𝒂𝒙 (𝒏 = 𝟎, 𝟏, 𝟐, … ) 𝑒 𝑎𝑥 (𝑘𝑛 𝑥 𝑛 + 𝑘𝑛−1 𝑥 𝑛−1 + ⋯ + 𝑘1 𝑥 + 𝑘0 )
𝐜𝐨𝐬 𝝎𝒙 𝒐𝒓 𝐬𝐢𝐧 𝝎𝒙 𝑘1 cos 𝜔𝑥 + 𝑘2 sin 𝜔𝑥
𝒆𝒂𝒙 𝐜𝐨𝐬 𝝎𝒙 𝒐𝒓 𝒆𝒂𝒙 𝐬𝐢𝐧 𝝎𝒙 𝑒 𝑎𝑥 (𝑘1 cos 𝜔𝑥 + 𝑘2 sin 𝜔𝑥)
where 𝑎, 𝑘, 𝑘0, … , 𝑘𝑛 are arbitrary.

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

Homogeneous part 𝑦ℎ (𝑥):


𝑦 ′′ + 5𝑦 ′ + 4𝑦 = 0 → 𝜆2 + 5𝜆 + 4 = 0 → (𝜆 + 1)(𝜆 + 4) = 0 → 𝜆1 = −1 𝑎𝑛𝑑 𝜆2 = −4
Thus:
𝑦ℎ (𝑥) = 𝑐1 𝑒 −𝑥 + 𝑐2 𝑒 −4𝑥
Non-homogeneous part 𝑦𝑝 (𝑥):

From table (8.1) select 𝑦𝑝 (𝑥) = 𝑘𝑒 −3𝑥 . Substitute 𝑦𝑝 (𝑥) in ODE:

𝑦 ′′ + 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:

𝑦(𝑥) = 𝑐1 𝑒 −𝑥 + 𝑐2 𝑒 −4𝑥 − 5𝑒 −3𝑥

Example 8.2:
Solve the initial value problem 𝑦 ′′ + 𝑦 = 0.001𝑥 2 𝑦(0) = 0, 𝑦 ′ (0) = 1.5
Solution:
The general solution is given by:
𝑦(𝑥) = 𝑦ℎ (𝑥) + 𝑦𝑝 (𝑥)

Homogeneous part 𝑦ℎ (𝑥):


𝑦 ′′ + 𝑦 = 0 → 𝜆2 + 1 = 0 → 𝜆2 = −1 → 𝜆1,2 = ∓𝑗.

Thus:
𝑦ℎ (𝑥) = 𝐴 cos 𝑥 + 𝐵 sin 𝑥
Non-homogeneous part 𝑦𝑝 (𝑥):

From table (8.1), since 𝑟(𝑥) contains 𝑥 2 , then:


𝑦𝑝 (𝑥) = 𝑘2 𝑥 2 + 𝑘1 𝑥 + 𝑘0 𝑤ℎ𝑒𝑟𝑒 𝑘0 , 𝑘1 , 𝑎𝑛𝑑 𝑘2 𝑎𝑟𝑒 𝑎𝑟𝑏𝑖𝑡𝑟𝑎𝑟𝑦. Sub. in ODE:

𝑦 ′′ + 𝑦 = 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

The general solution is thus given by:

𝑦(𝑥) = 𝐴 cos 𝑥 + 𝐵 sin 𝑥 + 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: 𝑦(𝑥) = 𝑦ℎ (𝑥) + 𝑦𝑝 (𝑥)

Homogeneous part 𝑦ℎ (𝑥):


𝑦 ′′ − 9𝑦 = 0 → 𝜆2 − 9 = 0 → (𝜆 + 3)(𝜆 − 3) = 0 → 𝜆1 = −3 𝑎𝑛𝑑 𝜆2 = +3
Thus:
𝑦ℎ (𝑥) = 𝑐1 𝑒 −3𝑥 + 𝑐2 𝑒 3𝑥
Non-homogeneous part 𝑦𝑝 (𝑥):

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

Methos of Variation of Parameters


• This method is used for particular part (non-homogeneous) is not in table (8.1)
• It can be used for higher order ODE’s
Given a 2nd order ODE:
𝑦 ′′ + 𝑝(𝑥)𝑦 ′ + 𝑞(𝑥)𝑦 = 𝑟(𝑥)
has a general solution:
𝑦(𝑥) = 𝑦ℎ (𝑥) + 𝑦𝑝 (𝑥)

The particular part 𝑦𝑝 (𝑥) has the form:

𝑦𝑝 (𝑥) = 𝑣1 𝑦1 (𝑥) + 𝑣2 𝑦2 (𝑥) (8.3)

You can solve either using procedure 1 or procedure 2


Procedure 1:
Step 1: Solve the set of linear system to find 𝑣1′ 𝑎𝑛𝑑 𝑣2′ :
𝑣1′ 𝑦1 + 𝑣2′ 𝑦2 = 0
(8.4)
𝑣1 𝑦1 + 𝑣2′ 𝑦2′ = 𝑟(𝑥)
′ ′

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: 𝑦(𝑥) = 𝑦ℎ (𝑥) + 𝑦𝑝 (𝑥)

Homogeneous part 𝑦ℎ (𝑥):

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 𝑦𝑝 (𝑥):

From the homogeneous part we get:


𝑦1 = 𝑒 𝑥 → 𝑦1′ = 𝑒 𝑥
𝑦2 = 𝑥𝑒 𝑥 → 𝑦2′ = 𝑥𝑒 𝑥 + 𝑒 𝑥
𝑒𝑥 𝑥𝑒 𝑥 𝑥 𝑥 𝑥 𝑥 𝑥 2𝑥
𝑊=| 𝑥 𝑥 𝑥 | = 𝑒 (𝑥𝑒 + 𝑒 ) − 𝑥𝑒 𝑒 = 𝑥𝑒 + 𝑒 2𝑥 − 𝑥𝑒 2𝑥 = 𝑒 2𝑥
𝑒 𝑥𝑒 + 𝑒
𝑥 𝑥
𝑥𝑒 𝑥𝑒
𝑦2 𝑟 𝑦1 𝑟 𝑥𝑒 𝑒
𝑦𝑝 (𝑥) = −𝑦1 ∫ 𝑑𝑥 + 𝑦2 ∫ 𝑑𝑥 = −𝑒 𝑥 ∫ 2𝑥𝑥 𝑑𝑥 + 𝑥𝑒 𝑥 ∫ 2𝑥𝑥 𝑑𝑥 =
𝑊 𝑊 𝑒 𝑒
1
= −𝑒 𝑥 ∫ 𝑑𝑥 + 𝑥𝑒 𝑥 ∫ 𝑑𝑥 = −𝑒 𝑥 𝑥 + 𝑥𝑒 𝑥 ln|𝑥| = (ln|𝑥| − 1)𝑥𝑒 𝑥
𝑥
Finally, we get:

𝑦(𝑥) = (𝑐1 + 𝑐2 𝑥)𝑒 𝑥 + (ln|𝑥| − 1)𝑥𝑒 𝑥

Example 8.5: Solve the 2nd order ODE using variation of parameters:
𝑦 ′′ + 2𝑦 ′ − 3𝑦 = 𝑒 𝑥 − 𝑥 − 1

Solution:
Our general solution is: 𝑦(𝑥) = 𝑦ℎ (𝑥) + 𝑦𝑝 (𝑥)

Homogeneous part 𝑦ℎ (𝑥):


𝑦 ′′ + 2𝑦 ′ − 3𝑦 = 0 → 𝜆2 + 2𝜆 − 3 = 0 → (𝜆 − 1)(𝜆 + 3) = 0 → 𝜆1 = 1 𝑎𝑛𝑑 𝜆21 = −3
Thus:
𝑦ℎ (𝑥) = 𝑐1 𝑒 𝑥 + 𝑐2 𝑒 −3𝑥
Non-homogeneous part 𝑦𝑝 (𝑥):

From the homogeneous part we get:


𝑦1 = 𝑒 𝑥 → 𝑦1′ = 𝑒 𝑥
𝑦2 = 𝑒 −3𝑥 → 𝑦2′ = −3𝑒 −3𝑥
5
Engineering Mathematics I Lecture 8: Non- Prof. Dr. Emad Al-Hemiary
Second Year, First Semester Homogeneous ODE and
2022-2023 Higher Order ODEs
𝑥
𝑊 = |𝑒 𝑥 𝑒 −3𝑥 | = −3𝑒 𝑥 𝑒 −3𝑥 − 𝑒 −3𝑥 𝑒 𝑥 = −4𝑒 −2𝑥
𝑒 −3𝑒 −3𝑥
𝑦2 𝑟 𝑦1 𝑟 𝑒 −3𝑥 (𝑒 𝑥 − 𝑥 − 1) 𝑒 𝑥 (𝑒 𝑥 − 𝑥 − 1)
𝑦𝑝 (𝑥) = −𝑦1 ∫ 𝑑𝑥 + 𝑦2 ∫ 𝑑𝑥 = −𝑒 𝑥 ∫ 𝑑𝑥 + 𝑒 −3𝑥
∫ 𝑑𝑥 =
𝑊 𝑊 −4𝑒 −2𝑥 −4𝑒 −2𝑥
𝑒𝑥 𝑒 −3𝑥
= ∫(1 − 𝑥𝑒 −𝑥 − 𝑒 −𝑥 ) 𝑑𝑥 − ∫(𝑒 4𝑥 − 𝑒 3𝑥 𝑥 − 𝑒 3𝑥 ) 𝑑𝑥
4 4
𝑒𝑥 −𝑥 −𝑥 −𝑥
𝑒 −3𝑥 𝑒 4𝑥 𝑥𝑒 3𝑥 𝑒 3𝑥 𝑒 3𝑥
= {𝑥 − (−𝑥𝑒 − 𝑒 ) + 𝑒 } − { −( − )− }
4 4 4 3 9 3
𝑒𝑥 𝑒 −3𝑥 𝑒 4𝑥 𝑥𝑒 3𝑥 2𝑒 3𝑥 1 𝑥 2
= (𝑥 + 𝑥𝑒 −𝑥 + 2𝑒 −𝑥 ) − ( − − ) = (𝑥𝑒 𝑥 + 𝑥 + 2 − 𝑒 𝑥 + + )
4 4 4 3 9 4 3 9
1 4 20
= (𝑥𝑒 𝑥 − 𝑒 𝑥 + 𝑥 + )
4 3 9
Finally, we get:
1 4 20
𝑦(𝑥) = 𝑐1 𝑒 𝑥 + 𝑐2 𝑒 −3𝑥 + (𝑥𝑒 𝑥 − 𝑒 𝑥 + 𝑥 + )
4 3 9

Higher Order ODE


In general, nth order ODE is written as:
𝑦 (𝑛) + 𝑝𝑛−1 (𝑥)𝑦 𝑛−1 + ⋯ + 𝑝1 (𝑥)𝑦 𝑛−1 + 𝑝0 (𝑥)𝑦 = 𝑟(𝑥) (8.5)
has the general solution:
𝑦(𝑥) = 𝑦ℎ (𝑥) + 𝑦𝑝 (𝑥)

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𝑥

Example 8.7: Solve the 3rd order ODE given by:


𝑒𝑥
𝑦 ′′′ − 3𝑦 ′′ + 2𝑦 ′ =
1 + 𝑒 −𝑥
Solution:
The general solution is: 𝑦(𝑥) = 𝑦ℎ (𝑥) + 𝑦𝑝 (𝑥)

Homogeneous part 𝑦ℎ (𝑥):


𝜆3 − 3𝜆2 + 2𝜆 = 0 → 𝜆(𝜆2 − 3𝜆 + 2) = 0 → 𝜆(𝜆 − 1)(𝜆 − 2) = 0 → 𝜆1 = 0, 𝜆2 = 1, 𝑎𝑛𝑑 𝜆3 = 2
𝑦ℎ (𝑥) = 𝑐1 + 𝑐2 𝑒 𝑥 +𝑐3 𝑒 2𝑥
Non-homogeneous part 𝑦𝑝 (𝑥):

From the homogeneous part we get:


𝑦1 = 1 → 𝑦1′ = 0 → 𝑦1′′ = 0
𝑦2 = 𝑒 𝑥 → 𝑦2′ = 𝑒 𝑥 → 𝑦2′′ = 𝑒 𝑥
𝑦3 = 𝑒 2𝑥 → 𝑦2′ = 2𝑒 2𝑥 → 𝑦2′′ = 4𝑒 2𝑥
We then form the linear system:

7
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𝑥 = 0 𝑣1′ + 𝑣2′ 𝑒 𝑥 + 𝑣3′ 𝑒 2𝑥 = 0


𝑣1′ 𝑦1 + 𝑣2′ 𝑦2 + 𝑣3′ 𝑦3 = 0
𝑣2′ 𝑒 𝑥 + 𝑣3′ 2𝑒 2𝑥 = 0 3−2 𝑣2′ 𝑒 𝑥 + 𝑣3′ 2𝑒 2𝑥 = 0
{ 𝑣1′ 𝑦1′ + 𝑣2′ 𝑦2′ + 𝑣3′ 𝑦3′ = 0 ⇒ ⇒
𝑒𝑥 𝑒𝑥
𝑣1′ 𝑦1′′ + 𝑣2′ 𝑦2′′ + 𝑣3′ 𝑦3′′ = 𝑟(𝑥) 𝑣 ′ 𝑥
𝑒 + 𝑣 ′
4𝑒 2𝑥
= 𝑣 ′
2𝑒 2𝑥
=
{ 2 3
1 + 𝑒 −𝑥 { 3
1 + 𝑒 −𝑥
′ ′ 𝑥 ′ 2𝑥
𝑣1 + 𝑣2 𝑒 + 𝑣3 𝑒 = 0
𝑣1′ + 𝑣2′ 𝑒 𝑥 + 𝑣3′ 𝑒 2𝑥 = 0
𝑒 −𝑥
𝑣2′ 𝑒 𝑥 + 𝑣3′ 2𝑒 2𝑥 = 0 𝑠𝑢𝑏 3 𝑖𝑛 2 𝑣2′ 𝑒 𝑥 + 𝑒 2𝑥 =0
⇒ −𝑥 ⇒ 1 + 𝑒 −𝑥
1 𝑒
𝑣3′ = ′
1 𝑒 −𝑥
{ 2 1 + 𝑒 −𝑥 𝑣 3 =
{ 2 1 + 𝑒 −𝑥
𝑒𝑥 1 𝑒𝑥
𝑣1′ + 𝑣2′ 𝑒 𝑥 + 𝑣3′ 𝑒 2𝑥 = 0 𝑣1′ − −𝑥
+ −𝑥
=0
1 1 + 𝑒 2 1 + 𝑒
𝑣2′ = − 𝑠𝑢𝑏 2 𝑎𝑛𝑑 3 𝑖𝑛1 1
⇒ 1 + 𝑒 −𝑥 ⇒ 𝑣2′ = −
1 𝑒 −𝑥 1 + 𝑒 −𝑥

𝑣3 = ′
1 𝑒 −𝑥
{ 2 1 + 𝑒 −𝑥 𝑣 3 =
{ 2 1 + 𝑒 −𝑥
𝑥
1 𝑒
𝑣1′ =
2 1 + 𝑒 −𝑥
1
⇒ 𝑣2′ = −
1 + 𝑒 −𝑥

1 𝑒 −𝑥
𝑣 =
{ 3 2 1 + 𝑒 −𝑥
Then we integrate with respect to x to find 𝑣𝑖 :
1 𝑒𝑥 1 𝑒𝑥
𝑣1 = ∫ 𝑑𝑥 = ∫ 𝑒 𝑥 𝑑𝑥
2 1 + 𝑒 −𝑥 2 𝑒𝑥 + 1
Let 𝑢 = 𝑒 𝑥 + 1 → 𝑑𝑢 = 𝑒 𝑥 𝑑𝑥
1 𝑢−1 1 1 1 1
𝑣1 = ∫ 𝑑𝑢 = {∫ 1 𝑑𝑢 − ∫ 𝑑𝑢} = {𝑢 − ln|𝑢|} = {𝑒 𝑥 + 1 − ln|𝑒 𝑥 + 1|}
2 𝑢 2 𝑢 2 2
1 1
𝑣2 = − ∫ −𝑥
𝑑𝑥 = − ∫ 𝑥 𝑒 𝑥 𝑑𝑥
1+𝑒 𝑒 +1
Let 𝑢 = 𝑒 𝑥 + 1 → 𝑑𝑢 = 𝑒 𝑥 𝑑𝑥
1
𝑣2 = − ∫ 𝑑𝑢 = − ln|𝑢| = − ln(𝑒 𝑥 + 1)
𝑢
1 𝑒 −𝑥
𝑣3 = ∫ 𝑑𝑥
2 1 + 𝑒 −𝑥
Let 𝑢 = 𝑒 −𝑥 + 1 → 𝑑𝑢 = −𝑒 −𝑥 𝑑𝑥
1 1 1 1
𝑣3 = − ∫ 𝑑𝑢 = − ln|𝑢| = − ln(𝑒 −𝑥 + 1)
2 𝑢 2 2

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

You might also like