Second Order Differential Equation: Method of Undetermined Coefficients
Second Order Differential Equation: Method of Undetermined Coefficients
coefficients
[email protected] 1
ODE 2nd order: method of undetermined 3/5/2022
coefficients
A possible solution: 𝑦 = 𝑒 𝑚𝑥
𝑦′ = 𝑚𝑒 𝑚𝑥
𝑦′′ = 𝑚2 𝑒 𝑚𝑥
𝑎𝑚2 𝑒 𝑚𝑥 + 𝑏𝑚𝑒 𝑚𝑥 + 𝑐𝑒 𝑚𝑥 = 0
𝑒 𝑚𝑥 𝑎𝑚2 + 𝑏𝑚 + 𝑐 = 0
[email protected] 2
ODE 2nd order: method of undetermined 3/5/2022
coefficients
𝑎𝑚2 + 𝑏𝑚 + 𝑐 = 0
auxiliary equation or characteristic equation
It is a quadratic equation and can be solved using factorization
or quadratic formula. It has two roots, 𝑚1 and 𝑚2 .
• Two real unequal roots: 𝑚1 and 𝑚2
• Two real equal roots: 𝑚1 = 𝑚2
• Two complex roots: 𝑝 ± 𝑖𝑞
𝑦1 = 𝑒 𝑚1 𝑥 and 𝑦2 = 𝑒 𝑚2 𝑥
[email protected] 3
ODE 2nd order: method of undetermined 3/5/2022
coefficients
Example 1
𝑑2𝑦 𝑑𝑦
Solve 4 − 𝑦 = 0 given = −2 , 𝑦 = 2 when 𝑥 = 0
𝑑𝑥 2 𝑑𝑥
Example 1 … continue
𝑑𝑦
given initial condition: 𝑦 = 2 given initial condition: = −2
𝑑𝑥
when 𝑥 = 0 when 𝑥 = 0
1 1 𝑑𝑦 𝟏 𝟏
General 𝑦 = 𝐴𝑒 −2𝑥 + 𝐵𝑒 2𝑥 = −𝟏𝟐𝐴𝑒 −𝟐𝑥 + 𝟏𝟐𝐵𝑒 𝟐𝑥
Solution: differentiate 𝑑𝑥
2 = 𝐴𝑒 𝟎 + 𝐵𝑒 𝟎
−2 = −𝟏𝟐𝐴𝑒 𝟎 + 𝟏𝟐𝐵𝑒 𝟎
𝐴+𝐵 =2
−𝐴 + 𝐵 = −4
[email protected] 4
ODE 2nd order: method of undetermined 3/5/2022
coefficients
𝑦 = 𝐴 + 𝐵 𝑒 𝑚𝑥 𝑦 = 𝐶𝑒 𝑚𝑥
cannot be a complete solution
for a second order equation
𝑦 ′ = 𝑢′𝑒 𝑚𝑥 + 𝑢𝑚𝑒 𝑚𝑥
𝑦 ′′ = 𝑢′′𝑒 𝑚𝑥 + 𝑢′𝑚𝑒 𝑚𝑥 + 𝑢′𝑚𝑒 𝑚𝑥 + 𝑢𝑚2 𝑒 𝑚𝑥
𝑦 ′′ = 𝑢′′𝑒 𝑚𝑥 + 2𝑢′𝑚𝑒 𝑚𝑥 + 𝑢𝑚2 𝑒 𝑚𝑥
*note 1: 𝑎𝑚2 + 𝑏𝑚 + 𝑐 = 0
*note 2: 𝑎𝑚2 + 𝑏𝑚 + 𝑐 = 0 has two equal roots
𝑏
𝑚=−
2𝑎
Hence, 2𝑎𝑚 + 𝑏 = 0
[email protected] 5
ODE 2nd order: method of undetermined 3/5/2022
coefficients
𝑢 is a function of 𝑥
𝑎𝑢′′ = 0
The second derivative of 𝑢 is zero
න 𝑢′′ 𝑑𝑥 = න 0 𝑑𝑥 𝑢′ = 𝑐
න 𝑢′ 𝑑𝑥 = න 𝑐 𝑑𝑥 𝑢 = 𝑐𝑥
𝑦 = 𝐴 + 𝐵𝑥 𝑒 𝑚𝑥
Example 2
𝑑2𝑦 𝑑𝑦
Solve − 10 + 25𝑦 = 0
𝑑𝑥 2 𝑑𝑥
General Solution: 𝑦 = 𝐴𝑥 + 𝐵 𝑒 5𝑥
[email protected] 6
ODE 2nd order: method of undetermined 3/5/2022
coefficients
𝑦 = 𝐴𝑒 𝑝𝑥 𝑒 𝑖𝑞𝑥 + 𝐵𝑒 𝑝𝑥 𝑒 −𝑖𝑞𝑥
𝑦 = 𝑒 𝑝𝑥 𝐴𝑒 𝑖𝑞𝑥 + 𝐵𝑒 −𝑖𝑞𝑥
𝑦 = 𝑒 𝑝𝑥 𝐴 + 𝐵 𝑐𝑜𝑠 𝑞𝑥 + 𝑖 𝐴 − 𝐵 𝑠𝑖𝑛 𝑞𝑥
Example 3
𝑑2𝑦 𝑑𝑦
Solve − 4 + 13𝑦 = 0
𝑑𝑥 2 𝑑𝑥
− −4 ± −4 2 − 4 1 13
Using Quadratic 𝑚=
formula: 2 1
4 ± −36
=
2
𝑚 = 2 ± 𝑖3
[email protected] 7
ODE 2nd order: method of undetermined 3/5/2022
coefficients
𝑑2 𝑢 + 𝑣 𝑑 𝑢+𝑣
𝑎 + 𝑏 +𝑐 𝑢+𝑣 =𝑓 𝑥
𝑑𝑥 2 𝑑𝑥
[email protected] 8
ODE 2nd order: method of undetermined 3/5/2022
coefficients
𝑑2 𝑢 𝑑𝑢 𝑑2𝑣 𝑑𝑣
𝑎 2 +𝑏 + 𝑐𝑢 + 𝑎 2+𝑏 + 𝑐𝑣 =𝑓 𝑥
𝑑𝑥 𝑑𝑥 𝑑𝑥 𝑑𝑥
𝑑2𝑣 𝑑𝑣
Then either one is 𝑓 𝑥 . If we let 𝑎 2+𝑏 + 𝑐𝑣 = 𝑓 𝑥
𝑑𝑥 𝑑𝑥
𝑑2𝑢 𝑑𝑢
Then 𝑎 2+𝑏 + 𝑐𝑢 = 0
𝑑𝑥 𝑑𝑥
𝑑2𝑢 𝑑𝑢
The general solution of 𝑎 2+𝑏 + 𝑐𝑢 = 0
𝑑𝑥 𝑑𝑥
contains two unknowns.
The method of solution of this equation is the same as the
homogeneous type. The function 𝑢 is called the
‘complementary function’ .
𝑑2𝑣 𝑑𝑣
The solution of 𝑎 2+𝑏 + 𝑐𝑣 = 𝑓 𝑥 which is 𝑣 ,
𝑑𝑥 𝑑𝑥
is called the ‘particular integral’ .
𝑦 =𝑢+𝑣
𝑦 = 𝑦𝑐 + 𝑦𝑝
[email protected] 9
ODE 2nd order: method of undetermined 3/5/2022
coefficients
𝑓 𝑥 is a constant, 𝑓 𝑥 = 𝑘 𝑣=𝐶
𝑓 𝑥 is a polynomial,
𝑓 𝑥 = 𝑎𝑥, 𝑓 𝑥 = 𝑎𝑥 + 𝑏 Linear, 𝑣 = 𝐶𝑥 + 𝐷
𝑓 𝑥 = 𝑎𝑥 2 , 𝑓 𝑥 = 𝑎𝑥 2 + 𝑏𝑥, Quadratic, 𝑣 = 𝐶𝑥 2 + 𝐷𝑥 + 𝐸
𝑓 𝑥 = 𝑎𝑥 2 + 𝑏𝑥 + 𝑐
𝑓 𝑥 is exponential, 𝑓 𝑥 = 𝑎𝑒 𝑥 𝑣 = 𝐶𝑒 𝑥
𝑓 𝑥 is a trigonometry
𝑓 𝑥 = 𝑎𝑠𝑖𝑛 𝑝𝑥 , 𝑓 𝑥 = 𝑎𝑐𝑜𝑠 𝑝𝑥 𝑣 = 𝐶𝑠𝑖𝑛 𝑝𝑥 + 𝐷𝑐𝑜𝑠 𝑝𝑥
𝑓 𝑥 = 𝑎𝑠𝑖𝑛 𝑝𝑥 + 𝑏𝑐𝑜𝑠 𝑝𝑥
𝑓 𝑥 is a sum,
𝑣 = 𝐶𝑥 2 + 𝐷𝑥 + 𝐸 + 𝐹𝑠𝑖𝑛 𝑝𝑥 + 𝐺𝑐𝑜𝑠 𝑝𝑥
𝑓 𝑥 = 𝑎𝑥 2 + 𝑏𝑠𝑖𝑛 𝑝𝑥
𝑓 𝑥 is a product,
𝑣 = 𝑒 𝑥 𝐶𝑠𝑖𝑛 𝑝𝑥 + 𝐷𝑐𝑜𝑠 𝑝𝑥
𝑓 𝑥 = 𝑎𝑒 𝑥 𝑐𝑜𝑠 𝑝𝑥
[email protected] 10
ODE 2nd order: method of undetermined 3/5/2022
coefficients
Example 4
𝑑2 𝑦 𝑑𝑦
Solve + 5 + 6𝑦 = 2𝑥
𝑑𝑥 2 𝑑𝑥
𝐷2 + 5𝐷 + 6 𝑢 = 0
Auxiliary
equation: 𝑚2 + 5𝑚 + 6 = 0
𝑚+3 𝑚+2 =0 Using
Factorization
𝑚 = −3 , 𝑚 = −2
complementary
function
𝑢 = 𝐴𝑒 −3𝑥 + 𝐵𝑒 −2𝑥
[email protected] 11
ODE 2nd order: method of undetermined 3/5/2022
coefficients
Example 4 … continue
𝐷 𝐶𝑥 + 𝐷 = 𝐶
using ‘D-operator’ form:
𝐷2 𝐶𝑥 + 𝐷 = 0
𝐷2 + 5𝐷 + 6 𝑣 = 2𝑥
𝐷2 + 5𝐷 + 6 𝐶𝑥 + 𝐷 = 2𝑥
𝐷2 𝐶𝑥 + 𝐷 + 5𝐷 𝐶𝑥 + 𝐷 + 6 𝐶𝑥 + 𝐷 = 2𝑥
0 + 5𝐶 + 6𝐶𝑥 + 6𝐷 = 2𝑥
Example 4 … continue
0 + 5𝐶 + 6𝐶𝑥 + 6𝐷 = 2𝑥
Compare the
coefficients of each
𝑥: 6𝐶 = 2 1 5
𝐶= ,𝐷 = −
terms on both sides
𝑐𝑜𝑛𝑠 : 5𝐶 + 6𝐷 = 0 3 18
of the equations:
Particular 1 5
integral 𝑣 = 𝐶𝑥 + 𝐷 𝑣= 𝑥−
3 18
[email protected] 12
ODE 2nd order: method of undetermined 3/5/2022
coefficients
Example 5
𝑑2𝑦 𝑑𝑦
Solve 2
−2 + 𝑦 = 10𝑐𝑜𝑠 2𝑥
𝑑𝑥 𝑑𝑥
𝑑𝑦
given that 𝑑𝑥 = 0 , 𝑦 = 1 when 𝑥 = 0
𝑑2𝑢 𝑑𝑢
Get the ‘complementary −2 +𝑢 =0
𝑑𝑥 2 𝑑𝑥
function’:
Write in ‘D-operator’ form:
𝐷2 − 2𝐷 + 1 𝑢 = 0
Auxiliary
equation: 𝑚2 − 2𝑚 + 1 = 0
𝑚−1 𝑚−1 =0 Using
𝑚 = 1 ,𝑚 = 1 Factorization
complementary
function 𝑢 = 𝐴𝑥 + 𝐵 𝑒 𝑥
Example 5 … continue
𝐷2 − 2𝐷 + 1 𝑣 = 10𝑐𝑜𝑠 2𝑥
𝐷2 − 2𝐷 + 1 𝐶𝑠𝑖𝑛 2𝑥 + 𝐷𝑐𝑜𝑠 2𝑥 = 10𝑐𝑜𝑠 2𝑥
[email protected] 13
ODE 2nd order: method of undetermined 3/5/2022
coefficients
Example 5 … continue
Compare the
coefficients of each
𝑐𝑜𝑠 2𝑥 : −4𝐷 − 4𝐶 + 𝐷 = 10
terms on both sides
of the equations: 𝑠𝑖𝑛 2𝑥 : −4𝐶 + 4𝐷 + 𝐶 = 0
Example 5 … continue
−4𝐶 − 3𝐷 = 10 8 6
𝐶=− ,𝐷 = −
−3𝐶 + 4𝐷 = 0 5 5
Particular
integral 𝑣 = 𝐶𝑠𝑖𝑛(2𝑥)+𝐷𝑐𝑜𝑠(2𝑥)
8 6
𝑣 = − 𝑠𝑖𝑛(2𝑥) − 𝑐𝑜𝑠(2𝑥)
5 5
[email protected] 14
ODE 2nd order: method of undetermined 3/5/2022
coefficients
Example 5 … continue
• 𝑦 = 1 when 𝑥 = 0
General 0
8 6
1= 𝐴 0 +𝐵 𝑒 − 𝑠𝑖𝑛(2 0 ) − 𝑐𝑜𝑠(2 0 )
Solution: 5 5
6 11
1=𝐵− 𝐵=
5 5
𝑑𝑦
• 𝑑𝑥 = 0 when 𝑥 = 0
8 6
General 𝑦 = 𝐴𝑥 + 𝐵 𝑒 𝑥 − 𝑠𝑖𝑛(2𝑥) − 𝑐𝑜𝑠(2𝑥)
Solution: 5 5
Derivative 𝑑𝑦 𝑥 𝑥 16 12
of General = 𝐴𝑒 + 𝐴𝑥 + 𝐵 𝑒 − 5 𝑐𝑜𝑠(2𝑥) + 𝑠𝑖𝑛(2𝑥)
𝑑𝑥 5
Solution:
0 0
16 12
0 = 𝐴𝑒 + 𝐴 0 + 𝐵 𝑒 − 𝑐𝑜𝑠(0) + 𝑠𝑖𝑛(0)
5 5
16
0=𝐴+𝐵− 𝐴=1
5
Particular 11 𝑥 8 6
Solution:
𝑦 = 𝑥 + 𝑒 − 𝑠𝑖𝑛(2𝑥) − 𝑐𝑜𝑠(2𝑥)
5 5 5
Example 6
𝑑2 𝑦 𝑑𝑦
Solve 2
− = 𝑒 3𝑥 + 6𝑦
𝑑𝑥 𝑑𝑥
[email protected] 15
ODE 2nd order: method of undetermined 3/5/2022
coefficients
Example 6 … continue
[email protected] 16
ODE 2nd order: method of undetermined 3/5/2022
coefficients
Example 6 … redo
Example 6 … redo
[email protected] 17
ODE 2nd order: method of undetermined 3/5/2022
coefficients