Maths (CH 2) 1
Maths (CH 2) 1
Nonhomogeneous ODEs
Consider the second order nonhomogeneous linear ODE of the following form.
Where, 𝑟(𝑥) ≠ 0
The general solution of (1) on an open interval 𝐼, is defined as 𝒚(𝒙) = 𝒚𝒉 (𝒙) + 𝒚𝒑 (𝒙) (2)
Where,
Method of undermined coefficients is used to determine any solution 𝑦𝑝 (𝑥) of (1). This method is
appropriate to find 𝑦𝑝 (𝑥) for linear ODEs with constant coefficients of the following form,
𝑦 ′′ + 𝑎𝑦 ′ + 𝑏𝑦 = 𝑟(𝑥) (3)
Where, 𝑎, 𝑏 are constants and 𝑟(𝑥) is a function that exists in one of the following form,
1. 𝑟(𝑥) is,
i. 𝑥 𝑛 , where 𝑛 ∈ ℕ or 𝑛 = 0
ii. 𝑒 𝑎𝑥 where 𝑎 is a non-zero constant.
iii. sin(𝑎𝑥 + 𝑏), where 𝑏 ≠ 0 and 𝑐 are constants.
iv. cos(𝑎𝑥 + 𝑏), where 𝑏 ≠ 0 and 𝑐 are constants.
2. 𝑟(𝑥) is defined as the sum or finite product of two or more functions of the types in (1).
Since, the derivatives of the function 𝑟(𝑥) in the above described form remain in the same or similar
form, so 𝑦𝑝 (𝑥) is choosen in form of 𝑟(𝑥) but with unknown coefficients whose values are to be
determined which signifies the name of the “Method of undetermined coefficients”.
As, 𝑦𝑝 (𝑥) is a solution of the nonhomogeneous ODE (3),
On comparing the coefficients in both sides of (4), the undetermined/unknown coefficients of 𝑦𝑝 (𝑥)
can be determined.
Consider the following table to choose 𝑦𝑝 (𝑥) using Method of undetermined coefficients.
Table-1
𝒓(𝒙) 𝒚𝒑 (𝒙)
𝑘𝑒 𝛾𝑥 𝐶𝑒 𝛾𝑥
𝑘𝑥 𝑛 (𝑛 = 0,1, … ) 𝐾𝑛 𝑥 𝑛 + 𝐾𝑛−1 𝑥 𝑛−1 + ⋯ + 𝐾1 𝑥 + 𝐾0
𝑘 𝑐𝑜𝑠 𝜔𝑥
𝑘 𝑠𝑖𝑛 𝜔𝑥 𝐾 𝑐𝑜𝑠 𝜔𝑥 + 𝑀 𝑠𝑖𝑛 𝜔𝑥
𝑘𝑒 𝛼𝑥 𝑐𝑜𝑠 𝜔𝑥
𝑒 𝛼𝑥 (𝐾 𝑐𝑜𝑠 𝜔𝑥 + 𝑀 𝑠𝑖𝑛 𝜔𝑥)
𝑘𝑒 𝛼𝑥 𝑠𝑖𝑛 𝜔𝑥
Basic Rule: If 𝑟(𝑥) in (3) is one of the function in the first column of Table-1, choose 𝑦𝑝 (𝑥) from the
corresponding row of the second column.
Modification Rule: If a term in the choice of 𝑦𝑝 (𝑥) is a solution of the corresponding homogeneous
ODE 𝑦 ′′ + 𝑎𝑦 ′ + 𝑏𝑦 = 0 then multiply this term by 𝑥 or 𝑥 2 respectively when this solution corresponds
to single or double root of the characteristic equation of the homogeneous ODE.
Sum Rule: If 𝑟(𝑥) is the sum of functions in the first column of Table-1, choose 𝑦𝑝 (𝑥) as the sum of
the functions in the corresponding rows of the second column.
Limitation of the method: If 𝑝(𝑥), 𝑞(𝑥) in the nonhomogeneous ODE (1) are not constants or
𝑟(𝑥) does not exist in one of the above specified form then this method is unsuitable to find 𝑦𝑝 (𝑥).
Examples
Example-1: (Basic Rule)
Solve the initial value problem, 𝑦 ′′ + 𝑦 = 0.001𝑥 2 , 𝑦(0) = 0, 𝑦 ′ (0) = 1.5
Solution:
Step-1: General solution of the homogeneous ODE 𝑦 ′′ + 𝑦 = 0 is 𝑦ℎ = 𝐴 cos 𝑥 + 𝐵 cos 𝑥
Step-2: As 𝑟(𝑥 ) = 0.001𝑥 2 , let 𝑦𝑝 = 𝐾2 𝑥 2 + 𝐾1 𝑥 + 𝐾0 . Substituting 𝑦𝑝 and 𝑦𝑝′′ in the given ODE,
The general solution of the given ODE is 𝑦 = 𝑦ℎ + 𝑦𝑝 = 𝐴 cos 𝑥 + 𝐵 cos 𝑥 + 0.001𝑥 2 − 0.002
Step-3: Using the initial conditions 𝑦(0) = 0, 𝑦 ′ (0) = 1.5, we get 𝐴 = 0.002, 𝐵 = 1.5.
So the solution of the IVP is 𝑦 = 0.002 cos 𝑥 + 1.5 cos 𝑥 + 0.001𝑥 2 − 0.002
Substituting 𝑦𝑝 , 𝑦𝑝′ and 𝑦𝑝′′ in the given ODE and comparing the coefficients of 𝑥 2 , 𝑥, 𝑥 0 and 𝑒 −1.5𝑥 on
both the sides, = −5 . So, 𝑦𝑝 = −5𝑥 2 𝑒 −1.5𝑥 .
Step-3: Using the initial conditions 𝑦(0) = 1, 𝑦 ′ (0) = 0, we get 𝑐1 = 1.5, 𝑐2 = 1.5.
So the solution of the IVP is 𝑦 = (1 + 1.5𝑥 − 5𝑥 2 )𝑒 −1.5𝑥
Step-2: As 𝑟(𝑥 ) = (2𝑐𝑜𝑠𝑥 − 0.25𝑠𝑖𝑛𝑥) + 0.09𝑥, , Choose 𝑦𝑝 = 𝑦𝑝1 + 𝑦𝑝2 where 𝑦𝑝1 = 𝐾 𝑐𝑜𝑠𝑥 +
𝑀 𝑠𝑖𝑛𝑥 and 𝑦𝑝2 = 𝐾1 𝑥 + 𝐾0 .
The general solution of the given ODE is 𝑦 = 𝑦ℎ + 𝑦𝑝 = 𝑐1 𝑒 −𝑥/2 + 𝑐2 𝑒 −3𝑥/2 + 𝑠𝑖𝑛𝑥 + 0.12𝑥 − 0.32
Step-3: Using the initial conditions 𝑦(0) = 2.78, 𝑦 ′ (0) = −0.43, we get 𝑐1 = 3.1, 𝑐2 = 0.
So the solution of the IVP is 𝑦 = 3.1𝑒 −𝑥/2 + 𝑠𝑖𝑛𝑥 + 0.12𝑥 − 0.32
Problems
Solve the following problems.
1. 𝑦 ′′ + 5𝑦 ′ + 6𝑦 = 2𝑒 −𝑥
2. 𝑦 ′′ + 3𝑦 ′ + 2𝑦 = 12𝑥 2
3. (3𝐷2 + 27𝐼 )𝑦 = 3 cos 𝑥 + cos 3𝑥
4. 𝑦 ′′ + 4𝑦 = −12 sin 2𝑥 , 𝑦(0) = 1.8, 𝑦 ′ (0) = 5
5. 8𝑦 ′′ − 6𝑦 ′ + 𝑦 = 6 cosh 𝑥 , 𝑦(0) = 0.2, 𝑦 ′ (0) = 0.05
*****