0% found this document useful (0 votes)
47 views

Second Order Differential Equation: Method of Undetermined Coefficients

The document discusses the method of undetermined coefficients for solving second order linear differential equations. It provides three key steps: 1) Write the differential equation in D-operator form and derive the auxiliary/characteristic equation. 2) Solve the auxiliary equation to obtain the roots, which determine the form of the solutions. 3) Use the roots to write the general solution as a combination of exponential or polynomial functions. Examples are provided to illustrate the full process.

Uploaded by

Aliph Hamzah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views

Second Order Differential Equation: Method of Undetermined Coefficients

The document discusses the method of undetermined coefficients for solving second order linear differential equations. It provides three key steps: 1) Write the differential equation in D-operator form and derive the auxiliary/characteristic equation. 2) Solve the auxiliary equation to obtain the roots, which determine the form of the solutions. 3) Use the roots to write the general solution as a combination of exponential or polynomial functions. Examples are provided to illustrate the full process.

Uploaded by

Aliph Hamzah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

ODE 2nd order: method of undetermined 3/5/2022

coefficients

Method of Undetermined Coefficients

Mathematics Section UniKL MFI


Norhayati Bakri

Second Order Differential Equation


A second order linear differential equation can be
written in the form
𝑑2𝑦 𝑑𝑦
𝑎 2
+𝑏 + 𝑐𝑦 = 𝑑
𝑑𝑥 𝑑𝑥
Where 𝑎, 𝑏, 𝑐 and 𝑑 are constants or functions of 𝑥.
A second order linear differential equation with constant
coefficients is one where 𝑎, 𝑏 and 𝑐 are constants and
𝑑 can be either a constant or a function of 𝑥.

[email protected] 1
ODE 2nd order: method of undetermined 3/5/2022
coefficients

Second order linear differential equation


with constant coefficients – (homogeneous)
A second order linear differential equation with
constant coefficients is said to be homogeneous if
the function on the right side is zero
𝑑2 𝑦 𝑑𝑦
𝑎 2+𝑏 + 𝑐𝑦 = 0
𝑑𝑥 𝑑𝑥
𝑑 𝑑2
If 𝐷 represents 𝑑𝑥 and 𝐷2 represents 𝑑𝑥2 then the
above equation may be stated as
𝑎𝐷2 + 𝑏𝐷 + 𝑐 𝑦 = 0
This equation is said to be in ‘D-operator’ form.

𝑎𝑦′′ + 𝑏𝑦′ + 𝑐𝑦 = 0 This is only possible if the function


The sum of the three and its derivatives are like terms.
terms must equal zero

A possible solution: 𝑦 = 𝑒 𝑚𝑥
𝑦′ = 𝑚𝑒 𝑚𝑥
𝑦′′ = 𝑚2 𝑒 𝑚𝑥

Substitute into: 𝑎𝑦′′ + 𝑏𝑦′ + 𝑐𝑦 = 0

𝑎𝑚2 𝑒 𝑚𝑥 + 𝑏𝑚𝑒 𝑚𝑥 + 𝑐𝑒 𝑚𝑥 = 0

𝑒 𝑚𝑥 𝑎𝑚2 + 𝑏𝑚 + 𝑐 = 0

Since 𝑒 𝑚𝑥 ≠ 0 then 𝑎𝑚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: 𝑝 ± 𝑖𝑞

Either of the two values of 𝑚 makes the auxiliary


equation equal to zero. Thus, we get two solutions to
𝑎𝑦′′ + 𝑏𝑦′ + 𝑐𝑦 = 0,

𝑦1 = 𝑒 𝑚1 𝑥 and 𝑦2 = 𝑒 𝑚2 𝑥

Case 1: real and unequal roots


If 𝑦1 = 𝑒 𝑚1 𝑥 and 𝑦2 = 𝑒 𝑚2 𝑥 are solutions to 𝑎𝑦′′ + 𝑏𝑦′ + 𝑐𝑦 =
0 then 𝑦 = 𝐴𝑦1 + 𝐵𝑦2 is also a solution, where 𝐴 and 𝐵 are
constants.
𝑦 = 𝐴𝑦1 + 𝐵𝑦2
𝑦′ = 𝐴𝑦1 ′ + 𝐵𝑦2 ′
𝑦′′ = 𝐴𝑦1 ′′ + 𝐵𝑦2 ′′
Substitute into: 𝑎𝑦′′ + 𝑏𝑦′ + 𝑐𝑦 = 0
𝑎 𝐴𝑦1 ′′ + 𝐵𝑦2 ′′ + 𝑏 𝐴𝑦1 ′ + 𝐵𝑦2 ′ + 𝑐 𝐴𝑦1 + 𝐵𝑦2 = 0
+ 𝐵 𝑎𝑦2 ′′ + 𝑏𝑦2 ′ + 𝑐𝑦2 = 0
𝐴 0 +𝐵 0 =0

The complete solution is of the form, 𝑦 = 𝐴𝑒 𝑚1 𝑥 + 𝐵𝑒 𝑚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 𝑑𝑥

Write in ‘D-operator’ form: 4𝐷2 − 1 𝑦 = 0


Auxiliary equation: 4𝑚2 − 1 = 0
Using 2𝑚 + 1 2𝑚 − 1 = 0
Factorization:
1 1
𝑚 = − ,𝑚 =
2 2
1 1
General Solution: 𝑦 = 𝐴𝑒 −2𝑥 + 𝐵𝑒 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

Solve the equations simultaneously using substitution / elimination


method, Cramer’s rule or use your calculator.
𝐴 = 3 , 𝐵 = −1
1 1
Particular
Solution:
𝑦 = 3𝑒 −2𝑥 − 𝑒 2𝑥

[email protected] 4
ODE 2nd order: method of undetermined 3/5/2022
coefficients

Case 2: real and equal roots


If the auxiliary equation has two real equal roots, the solution
becomes, 𝑦 = 𝐴𝑒 𝑚𝑥 + 𝐵𝑒 𝑚𝑥 .

𝑦 = 𝐴 + 𝐵 𝑒 𝑚𝑥 𝑦 = 𝐶𝑒 𝑚𝑥
cannot be a complete solution
for a second order equation

Assume a second solution: 𝑦 = 𝑢𝑒 𝑚𝑥 𝑢 is a function of 𝑥

𝑦 ′ = 𝑢′𝑒 𝑚𝑥 + 𝑢𝑚𝑒 𝑚𝑥
𝑦 ′′ = 𝑢′′𝑒 𝑚𝑥 + 𝑢′𝑚𝑒 𝑚𝑥 + 𝑢′𝑚𝑒 𝑚𝑥 + 𝑢𝑚2 𝑒 𝑚𝑥
𝑦 ′′ = 𝑢′′𝑒 𝑚𝑥 + 2𝑢′𝑚𝑒 𝑚𝑥 + 𝑢𝑚2 𝑒 𝑚𝑥

Substitute into: 𝑎𝑦′′ + 𝑏𝑦′ + 𝑐𝑦 = 0

𝑎 𝑢′′𝑒 𝑚𝑥 + 2𝑢′𝑚𝑒 𝑚𝑥 + 𝑢𝑚2 𝑒 𝑚𝑥 + 𝑏 𝑢′𝑒 𝑚𝑥 + 𝑢𝑚𝑒 𝑚𝑥 + 𝑐 𝑢𝑒 𝑚𝑥 = 0

𝑒 𝑚𝑥 𝑎𝑢′′ + 2𝑎𝑢′𝑚 + 𝑎𝑢𝑚2 + 𝑏𝑢′ + 𝑏𝑢𝑚 + 𝑐𝑢 = 0

𝑒 𝑚𝑥 𝑎𝑢′′ + 2𝑎𝑚 + 𝑏 𝑢′ + 𝑎𝑚2 + 𝑏𝑚 + 𝑐 𝑢 = 0

*note 1: 𝑎𝑚2 + 𝑏𝑚 + 𝑐 = 0
*note 2: 𝑎𝑚2 + 𝑏𝑚 + 𝑐 = 0 has two equal roots
𝑏
𝑚=−
2𝑎
Hence, 2𝑎𝑚 + 𝑏 = 0

The equation becomes: 𝑒 𝑚𝑥 𝑎𝑢′′ = 0


Since 𝑒 𝑚𝑥 ≠ 0 then 𝑎𝑢′′ = 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 𝑑𝑥 𝑢′ = 𝑐

න 𝑢′ 𝑑𝑥 = න 𝑐 𝑑𝑥 𝑢 = 𝑐𝑥

If 𝑦 = 𝐴𝑒 𝑚𝑥 is one of the solution, then the other solution is


𝑦 = 𝐵𝑥𝑒 𝑚𝑥

The complete solution is of the form, 𝑦 = 𝐴𝑒 𝑚𝑥 + 𝐵𝑥𝑒 𝑚𝑥

𝑦 = 𝐴 + 𝐵𝑥 𝑒 𝑚𝑥

Example 2

𝑑2𝑦 𝑑𝑦
Solve − 10 + 25𝑦 = 0
𝑑𝑥 2 𝑑𝑥

Write in ‘D-operator’ form: 𝐷2 − 10𝐷 + 25 𝑦 = 0


Auxiliary equation: 𝑚2 − 10𝑚 + 25 = 0

Using 𝑚−5 𝑚−5 =0


Factorization:
𝑚 = 5,𝑚 = 5

General Solution: 𝑦 = 𝐴𝑥 + 𝐵 𝑒 5𝑥

[email protected] 6
ODE 2nd order: method of undetermined 3/5/2022
coefficients

Case 3: complex roots


If the auxiliary equation has two complex roots, the solution
becomes, 𝑦 = 𝐴𝑒 𝑝+𝑖𝑞 𝑥 + 𝐵𝑒 𝑝−𝑖𝑞 𝑥 .

𝑦 = 𝐴𝑒 𝑝𝑥 𝑒 𝑖𝑞𝑥 + 𝐵𝑒 𝑝𝑥 𝑒 −𝑖𝑞𝑥
𝑦 = 𝑒 𝑝𝑥 𝐴𝑒 𝑖𝑞𝑥 + 𝐵𝑒 −𝑖𝑞𝑥

Using Euler’s Formula: 𝑒 𝑖𝜃 = 𝑐𝑜𝑠 𝜃 + 𝑖𝑠𝑖𝑛 𝜃

𝑦 = 𝑒 𝑝𝑥 𝐴 𝑐𝑜𝑠 𝑞𝑥 + 𝑖𝑠𝑖𝑛 𝑞𝑥 + 𝐵 𝑐𝑜𝑠 𝑞𝑥 − 𝑖𝑠𝑖𝑛 𝑞𝑥

𝑦 = 𝑒 𝑝𝑥 𝐴 + 𝐵 𝑐𝑜𝑠 𝑞𝑥 + 𝑖 𝐴 − 𝐵 𝑠𝑖𝑛 𝑞𝑥

The complete solution is of the form,


𝑦 = 𝑒 𝑝𝑥 𝐶𝑐𝑜𝑠 𝑞𝑥 + 𝐷𝑠𝑖𝑛 𝑞𝑥

Example 3

𝑑2𝑦 𝑑𝑦
Solve − 4 + 13𝑦 = 0
𝑑𝑥 2 𝑑𝑥

Write in ‘D-operator’ form: 𝐷2 − 4𝐷 + 13 𝑦 = 0


Auxiliary equation: 𝑚2 − 4𝑚 + 13 = 0

− −4 ± −4 2 − 4 1 13
Using Quadratic 𝑚=
formula: 2 1
4 ± −36
=
2
𝑚 = 2 ± 𝑖3

General Solution: 𝑦 = 𝑒 2𝑥 𝐴𝑐𝑜𝑠 3𝑥 + 𝐵𝑠𝑖𝑛 3𝑥

[email protected] 7
ODE 2nd order: method of undetermined 3/5/2022
coefficients

Procedure to solve Differential Equations of the form


𝑑2𝑦 𝑑𝑦
𝑎 2+𝑏 + 𝑐𝑦 = 0
𝑑𝑥 𝑑𝑥
𝑑2 𝑦 𝑑𝑦
• Rewrite the differential equations 𝑎 2 + 𝑏 + 𝑐𝑦 = 0
𝑑𝑥 𝑑𝑥
as 𝑎𝐷 2 + 𝑏𝐷 + 𝑐 𝑦 = 0
• Substitute 𝑚 for 𝐷 and solve the auxiliary equation
𝑎𝑚2 + 𝑏𝑚 + 𝑐 = 0 for 𝑚
• If the roots of the auxiliary equation are:
 Real and unequal (𝑚 = 𝛼 , 𝑚 = 𝛽), 𝑦 = 𝐴𝑒 𝛼𝑥 + 𝐵𝑒 𝛽𝑥
the general solution is

 Real and equal (𝑚 = 𝛼 , 𝑚 = 𝛼), 𝑦 = 𝐴𝑥 + 𝐵 𝑒 𝛼𝑥


the general solution is

 Complex (𝑚 = 𝛼 ± 𝑖𝛽), the 𝑦 = 𝑒 𝛼𝑥 𝐴𝑐𝑜𝑠 𝛽𝑥 + 𝐵𝑠𝑖𝑛 𝛽𝑥


general solution is

• Given boundary condition/initial condition, constants 𝐴, 𝐵 .. may be


determined and the particular solution of DE is obtained.

Second order linear differential equation


with constant coefficients – (nonhomogeneous)
A second order linear differential equation with
constant coefficients is said to be nonhomogeneous
if the function on the right side is not zero
𝑑2𝑦 𝑑𝑦
𝑎 2
+𝑏 + 𝑐𝑦 = 𝑓 𝑥
𝑑𝑥 𝑑𝑥

If we make the substitution 𝑦 = 𝑢 + 𝑣 , then

𝑑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’ .

Hence, the general solution of a non homogeneous second


order differential equation with constant coefficients
𝑑2 𝑦 𝑑𝑦
𝑎 2+𝑏 + 𝑐𝑦 = 𝑓 𝑥
𝑑𝑥 𝑑𝑥
is given by the sum of the ‘complementary function’ and
the ‘particular integral’,

𝑦 =𝑢+𝑣
𝑦 = 𝑦𝑐 + 𝑦𝑝

[email protected] 9
ODE 2nd order: method of undetermined 3/5/2022
coefficients

Method of Undetermined Coefficients


The method of undetermined coefficients is a technique for
finding the particular integral to a nonhomogeneous linear
constant-coefficient differential equation. This method is
based on making ‘good guesses’.
𝑑2 𝑦 𝑑𝑦
𝑎 2
+𝑏 + 𝑐𝑦 = 𝑓 𝑥
𝑑𝑥 𝑑𝑥
We use this method when the left side of the differential
equation has constant coefficients and the right side is an
exponential, sine, cosine, polynomials, or sums/products of
these functions.

Table of ‘guess solutions’ 𝑦𝑝 corresponding to the different


cases of 𝑓 𝑥
Type of function on the RHS of the Suggested particular integral based on 𝑓 𝑥 on
equation, 𝑓 𝑥 the RHS of the equation

𝑓 𝑥 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

• If the DE: 𝑎𝑦 ′′ + 𝑏𝑦 ′ + 𝑐𝑦 = 𝑥 2 + 3𝑥 then we would


guess 𝑦𝑝 = 𝐶𝑥 2 + 𝐷𝑥 + 𝐸 where 𝐶, 𝐷, 𝐸 are constants
to be determined.
• If the DE: 𝑎𝑦 ′′ + 𝑏𝑦 ′ + 𝑐𝑦 = 𝑒 6𝑥 or 𝑎𝑦 ′′ + 𝑏𝑦 ′ + 𝑐𝑦 = 34𝑒 6𝑥
then 𝑦𝑝 = 𝐶𝑒 6𝑥 where 𝐶 is the constant to be determined.

• If the DE: 𝑎𝑦 ′′ + 𝑏𝑦 ′ + 𝑐𝑦 = 𝑒 6𝑥 + 3𝑠𝑖𝑛 2𝑥 then


𝑦𝑝 = 𝐶𝑒 6𝑥 + 𝐷𝑠𝑖𝑛 2𝑥 + 𝐸𝑐𝑜𝑠 2𝑥

• If the DE: 𝑎𝑦 ′′ + 𝑏𝑦 ′ + 𝑐𝑦 = 𝑒 6𝑥 𝑐𝑜𝑠 3𝑥 then


𝑦𝑝 = 𝑒 6𝑥 𝐶𝑠𝑖𝑛 3𝑥 + 𝐷𝑐𝑜𝑠 3𝑥

Example 4

𝑑2 𝑦 𝑑𝑦
Solve + 5 + 6𝑦 = 2𝑥
𝑑𝑥 2 𝑑𝑥

Get the ‘complementary 𝑑2𝑢 𝑑𝑢


2
+5 + 6𝑢 = 0
function’: 𝑑𝑥 𝑑𝑥
Write in ‘D-operator’ form:

𝐷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

Get the ‘particular integral’:

Since the term on the RHS is a


𝑑2𝑣 𝑑𝑣 linear function, let the particular
+ 5 + 6𝑣 = 2𝑥 integral also be a linear function,
𝑑𝑥 2 𝑑𝑥 𝑣 = 𝐶𝑥 + 𝐷

𝐷 𝐶𝑥 + 𝐷 = 𝐶
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

General Solution: 𝑦 =𝑢+𝑣


1 5
𝑦 = 𝐴𝑒 −3𝑥 + 𝐵𝑒 −2𝑥 + 𝑥 −
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

Get the ‘particular integral’:


Since the term on the RHS is
𝑑2𝑣 𝑑𝑣 a trigonometric function, let
the particular integral also be
− 2 + 𝑣 = 10𝑐𝑜𝑠 2𝑥
𝑑𝑥 2 𝑑𝑥 a trigonometric function,
𝑣 = 𝐶𝑠𝑖𝑛 2𝑥 + 𝐷𝑐𝑜𝑠 2𝑥
using ‘D-operator’ form:

𝐷2 − 2𝐷 + 1 𝑣 = 10𝑐𝑜𝑠 2𝑥
𝐷2 − 2𝐷 + 1 𝐶𝑠𝑖𝑛 2𝑥 + 𝐷𝑐𝑜𝑠 2𝑥 = 10𝑐𝑜𝑠 2𝑥

𝐷2 𝐶𝑠𝑖𝑛 2𝑥 + 𝐷𝑐𝑜𝑠 2𝑥 − 2𝐷 𝐶𝑠𝑖𝑛 2𝑥 + 𝐷𝑐𝑜𝑠 2𝑥


+ 𝐶𝑠𝑖𝑛 2𝑥 + 𝐷𝑐𝑜𝑠 2𝑥 = 10𝑐𝑜𝑠 2𝑥

[email protected] 13
ODE 2nd order: method of undetermined 3/5/2022
coefficients

Example 5 … continue

𝐷2 𝐶𝑠𝑖𝑛 2𝑥 + 𝐷𝑐𝑜𝑠 2𝑥 − 2𝐷 𝐶𝑠𝑖𝑛 2𝑥 + 𝐷𝑐𝑜𝑠 2𝑥


+ 𝐶𝑠𝑖𝑛 2𝑥 + 𝐷𝑐𝑜𝑠 2𝑥 = 10𝑐𝑜𝑠 2𝑥
𝐷 𝐶𝑠𝑖𝑛 2𝑥 + 𝐷𝑐𝑜𝑠 2𝑥 = 2𝐶𝑐𝑜𝑠 2𝑥 − 2𝐷𝑠𝑖𝑛 2𝑥
𝐷2 𝐶𝑠𝑖𝑛 2𝑥 + 𝐷𝑐𝑜𝑠 2𝑥 = −4𝐶𝑠𝑖𝑛 2𝑥 − 4𝐷𝑐𝑜𝑠 2𝑥

−4𝐶𝑠𝑖𝑛 2𝑥 − 4𝐷𝑐𝑜𝑠 2𝑥 − 2 2𝐶𝑐𝑜𝑠 2𝑥 − 2𝐷𝑠𝑖𝑛 2𝑥


+ 𝐶𝑠𝑖𝑛 2𝑥 + 𝐷𝑐𝑜𝑠 2𝑥 = 10𝑐𝑜𝑠 2𝑥

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

General Solution: 𝑦 =𝑢+𝑣


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𝑦
𝑑𝑥 𝑑𝑥

Get the ‘complementary


function’:

[email protected] 15
ODE 2nd order: method of undetermined 3/5/2022
coefficients

Example 6 … continue

Get the ‘particular integral’:

• Sometimes the guess 𝑦𝑝 from the table won’t work


because the function overlaps with the solution to the
homogeneous differential equation, 𝑎𝑦 ′′ + 𝑏𝑦 ′ + 𝑐𝑦 = 0.
In this case, take the function 𝑦𝑝 and multiply it by 𝑥 and
use it as the new guess.
𝑦′′ − 5𝑦′ + 4𝑦 = 𝑒 𝑥
Solving 𝑦 ′′ − 5𝑦 ′ + 4𝑦 = 0 produces 𝑢 = 𝐴𝑒 4𝑥 + 𝐵𝑒 𝑥
Our guess 𝑦𝑝 = 𝐶𝑒 𝑥 won’t work.
New guess 𝑦𝑝 = 𝐶𝑥𝑒 𝑥 should work.
• If the new guess still doesn’t work, then multiply it by 𝑥
again and so on.

[email protected] 16
ODE 2nd order: method of undetermined 3/5/2022
coefficients

Example 6 … redo

Get the ‘particular integral’:

Example 6 … redo

[email protected] 17
ODE 2nd order: method of undetermined 3/5/2022
coefficients

Procedure to solve Differential Equations of the form


𝑑2𝑦 𝑑𝑦
𝑎 2+𝑏 + 𝑐𝑦 = 𝑓 𝑥
𝑑𝑥 𝑑𝑥
• Rewrite the differential equations as 𝑎𝐷 2 + 𝑏𝐷 + 𝑐 𝑦 = 𝑓 𝑥
• Substitute 𝑚 for 𝐷 and solve the auxiliary equation 𝑎𝑚2 + 𝑏𝑚 + 𝑐 = 0
for 𝑚
• Obtain the ‘complementary function’ 𝑢 using the same process as
the homogeneous second order differential equation.
• Determine the ‘particular integral’ 𝑣 by assuming a particular
integral suggested by 𝑓 𝑥 which contains undetermined coefficients.
Refer to table ‘suggested substitutions for different functions of 𝑓 𝑥 ’
• Substitute the suggested particular integral into the differential
equation 𝑎𝐷2 + 𝑏𝐷 + 𝑐 𝑣 = 𝑓 𝑥 and equate relevant coefficients to
determine the constants introduced.
• The general solution is given by 𝑦 = 𝑪𝑭 + 𝑷𝑰 that is 𝑦 = 𝑢 + 𝑣
• Given boundary conditions, constants in the complementary function
may be determined and the particular solution of the differential
equation is obtained.

[email protected] 18

You might also like