You are on page 1of 38

TARLAC STATE UNIVERSITY

College of Engineering and Technology

M222C | ADVANCED MATHEMATICS FOR CE

Solutions to Nonhomogeneous
Linear Higher Order ODEs with
Constant Coefficient
Part 1 – Method of Undetermined Coefficients

ENGR. CHARMAINE CZENINIA O. REGUINDIN, M. Eng.


Instructor
NOR

General cases of higher odes

𝑦 (𝑛) + 𝑃𝑛−1 𝑥 ∙ 𝑦 𝑛−1 + ∙ ∙ ∙ + 𝑃1 𝑥 ∙ 𝑦′ + 𝑃0 𝑥 ∙ 𝑦 = 𝐺(𝑥)

1. Constant Coefficients (i.e., 𝑃(𝑥) is constant)


a. Homogeneous (𝑮(𝒙) = 𝟎)
b. Nonhomogeneous (𝐺(𝑥) ≠ 0)
2. Non-constant coefficients (i.e., 𝑃(𝑥) is a function of 𝑥)
a. Cauchy-Euler
b. Legendre, Bessel, etc.

College of Engineering and Technology M222C | Advanced Mathematics for CE


NOR

RECALL: LINEAR ORDINARY DIFFERENTIAL EQUATION

A linear ODE is an equation that can be written in the form

𝑦 (𝑛) + 𝑃𝑛−1 𝑥 ∙ 𝑦 𝑛−1 + ∙ ∙ ∙ + 𝑃1 𝑥 ∙ 𝑦′ + 𝑃0 𝑥 ∙ 𝑦 = 𝑔(𝑥)

In addition, if 𝑔(𝑥) = 0 (that is, 𝑔(𝑥) = 0 for all 𝑥 considered), the ODE
simplifies to
𝑦 (𝑛) + 𝑃𝑛−1 𝑥 ∙ 𝑦 𝑛−1 + ∙ ∙ ∙ + 𝑃1 𝑥 ∙ 𝑦′ + 𝑃0 𝑥 ∙ 𝑦 = 𝑔(𝑥)

and is called HOMOGENEOUS. If 𝑔(𝑥) ≠ 0 , the ODE is


NONHOMOGENEOUS.
College of Engineering and Technology M222C | Advanced Mathematics for CE
NOR

GENERAL SOLUTION OF nth ORDER NONHOMOGENEOUS LINEAR ODE

RECALL: THEOREM
Principle of Superposition
If the functions {𝑦1 , 𝑦2 , … , 𝑦𝑛 } is a set of fundamental solutions of nth
order homogeneous ODE, then every solution of the ODE can be
expressed as a linear combination of the solutions 𝑦1 , 𝑦2 , … , 𝑦𝑛 .

CAUTION: VALIDITY

Remember that this fundamental theorem is only valid for homogeneous


ODEs.

College of Engineering and Technology M222C | Advanced Mathematics for CE


SOLUTIONS OF
HIGHER NON-
HOMOGENEOUS
LINEAR ODE
NOR

Illustration: General Solution of nonhomogenous ode


Consider a second order linear ODE
𝑦" + 𝑝(𝑥)𝑦′ + 𝑞(𝑥)𝑦 = 𝑟(𝑥)
Let ℎ denotes a particular solution of the ODE such that
ℎ" + 𝑝(𝑥)ℎ′ + 𝑞(𝑥)ℎ = 𝑟(𝑥)
Suppose that 𝑗 is also a complementary solution of the corresponding
homogenous ODE, such that
𝑗′′ + 𝑝(𝑥)𝑗′ + 𝑞(𝑥)𝑗 = 0

where 𝑗 can be written as a linear combination 𝑗 = 𝑐1 𝑦1 + 𝑐2 𝑦2 .

College of Engineering and Technology M222C | Advanced Mathematics for CE


NOR

Illustration: General Solution of nonhomogeneous ode


We can show that the sum of the solutions ℎ and 𝑗 is the general
solution of the ODE. Substituting, we have
𝑦" + 𝑝 𝑥 𝑦 ′ + 𝑞 𝑥 𝑦 = ℎ + 𝑗 ′ + 𝑞(𝑥)(ℎ + 𝑗)
= ℎ′′ + 𝑝 𝑥 ℎ′ + 𝑞 𝑥 ℎ + [𝑗" + 𝑝(𝑥)𝑗′ + 𝑞(𝑥)𝑗]
= 𝑟 𝑥 + 0 = 𝑟(𝑥) ✓

The solution 𝑦 = ℎ + 𝑗 is the general solution of the nonhomogeneous


ODE.

College of Engineering and Technology M222C | Advanced Mathematics for CE


NOR

nonHomogeneous linear ode


DEFINITION
Complementary Solution, Particular Solution
A general solution of a 2nd order nonhomogeneous ODE on an open interval 𝐼
is a solution of the form
𝑦 = 𝑦𝑐 + 𝑦𝑝 ;
where 𝑦𝑐 = 𝑐1 𝑦1 + 𝑐2 𝑦2 is the general solution of the corresponding
homogenous ODE hereby referred to as the complementary solution and 𝑦𝑝 is
the particular solution containing no arbitrary constants.

Two methods can be used to solve for 𝑦𝑝 :


1. Method of Undetermined Coefficients (MUC)
2. Method of Variation of Parameters (MVP)

College of Engineering and Technology M222C | Advanced Mathematics for CE


NOR

Illustration: General Solution of nonhomogeneous ode


Consider the nonhomogeneous ODE
7 3 3𝑥
𝑦" − 𝑦′ + 3𝑦 = 𝑒
2 2
3𝑥
We can verify that 𝑦𝑐 = 𝑐1 𝑒 + 𝑐2 𝑒 2𝑥 is the complementary solution and 𝑦𝑝 = 𝑒 3𝑥 is
2

the particular solution of the ODE.


HOMOGENOUS CASE: The complementary solution is also the general solution of the
homogenous ODE.
3𝑥 3𝑥 3𝑥
3 9
𝑦𝑐 = 𝑐1 𝑒 + 𝑐2
2 𝑒 2𝑥
𝑦𝑐 ′ = 𝑐1 𝑒 + 2𝑐2 2 𝑒 2𝑥
𝑦𝑐 " = 𝑐1 𝑒 + 4𝑐2 𝑒 2𝑥 2
2 4
7 9 3𝑥
2𝑥
7 3 3𝑥
2𝑥
3𝑥
𝑦𝑐 " − 𝑦𝑐 ′ + 3𝑦𝑐 = 𝑐1 𝑒 2 + 4𝑐2 𝑒 − 𝑐1 𝑒 2 + 2𝑐2 𝑒 + 3 𝑐1 𝑒 2 + 𝑐2 𝑒 𝑥
2 4 2 2
7 9 21 3𝑥 NOTE: equals 0 because it’s
𝑦" − 𝑦′ + 3𝑦 = − + 3 𝑐1 𝑒 2 + (4 − 7 + 3)𝑐2 𝑒 2𝑥 = 0 The HOMOGENEOUS case
2 4 4
College of Engineering and Technology M222C | Advanced Mathematics for CE
NOR

Illustration: General Solution of nonhomogeneous ode


NON-HOMOGENOUS CASE: The particular solution does not contain arbitrary
constants and satisfies the given ODE.

𝑦𝑝 = 𝑒 3𝑥 7 3𝑥
7 3𝑥 3𝑥
3 3𝑥
𝑦𝑝 ′′ − 𝑦𝑝 ′ + 3𝑦𝑝 = 9𝑒 − 3𝑒 +3 𝑒 = 𝑒
2 2 2
𝑦𝑝 ′ = 3𝑒 3𝑥
𝑦𝑝 ′′ = 9𝑒 3𝑥 GENERAL SOLUTION: The general solution must satisfy the given ODE.
3𝑥 7 ′ 9 3𝑥 7 3 3𝑥
𝑦 ′′ − 𝑦 + 3𝑦 = 𝑐1 𝑒 2 + 4𝑐2 𝑒 𝑥 + 9𝑒 3𝑥 − 𝑐1 𝑒 2 + 2𝑐2 𝑒 𝑥 + 3𝑒 3𝑥
𝑦= 𝑐1 𝑒 2 + 𝑐2 𝑒 2𝑥 + 𝑒 3𝑥 2 4 2 2
3 3𝑥 3𝑥
+ 𝑐2 𝑒 𝑥 + 𝑒 3𝑥
𝑦′ = 𝑐1 𝑒 2 + 2𝑐2 𝑒 2𝑥 + 3𝑒 3𝑥 +3 𝑐1 𝑒 2
2
9 21 3𝑥 21
9 3𝑥 = − 𝑥 𝑥
+ 3 𝑐1 𝑒 + 4𝑐2 𝑒 + 4 − 7 + 3 𝑐2 𝑒 + 9 −
2 + 3 𝑒 3𝑥
𝑦′′ = 𝑐1 𝑒 2 + 4𝑐2 𝑒 2𝑥 + 9𝑒 3𝑥 4 4 2
4
College of Engineering and Technology = 0 + 3𝑒 3𝑥 = 3𝑒 3𝑥 M222C | Advanced Mathematics for CE
METHOD OF
UNDETERMINED
COEFFICIENTS
(MUC)
NOR

Method of undetermined coefficients


Method of obtaining the particular solution of a nonhomogeneous equation

𝑔 𝑥 = 𝑔1 𝑥 + 𝑔2 𝑥 + ⋯ + 𝑔𝑘 𝑥

PROVIDED THAT:
1. DE must be linear with constant coefficients
2. Repeated differentiation of each 𝑔𝑗 𝑥 terms produces only a finite
number of linearly independent terms

College of Engineering and Technology M222C | Advanced Mathematics for CE


NOR

nonHomogeneous linear ode

EXAMPLE 3.1

Determine the set of LI functions associated with the given


function
1
a. 𝑥 2 b. 2𝑥𝑒 −𝑥 c. 2 d. 𝑠𝑖𝑛𝑥
𝑥

College of Engineering and Technology M222C | Advanced Mathematics for CE


NOR
NOR
NOR
NOR
NOR

nonHomogeneous linear ode

EXAMPLE 3.1

Determine the set of LI functions associated with the given


function
1
a. 𝑥 2 b. 2𝑥𝑒 −𝑥 c. 2 d. 𝑠𝑖𝑛𝑥
𝑥

ANSWERS
a. 𝑒 −𝑥 , 𝑥𝑒 −𝑥 c. Infinitely many
b. 𝑥 2 , 𝑥, 1 d. sin 𝑥 , cos 𝑥

College of Engineering and Technology M222C | Advanced Mathematics for CE


NOR

Method of undetermined coefficients

• Verify that condition 1 is satisfied. DE must be linear with


STEP1 constant coefficients

• Identify the 𝑔𝑗 𝑥 ′𝑠 and verify that each one satisfies


condition 2. Repeated differentiation
STEP 2 of each 𝑔𝑗 𝑥 terms
produces only a finite
• Determine the finite family of solutions corresponding to number of linearly
each 𝑔𝑗 𝑥 . independent terms
STEP 3

Set the right hand side of


• Obtain the general solution of the homogeneous the ODE to equal to 0 to
STEP 4 equation. obtain
𝑦𝑐 = 𝑐1 𝑦1 + 𝑐2 𝑦2 + ⋯ + 𝑐n 𝑦n

College of Engineering and Technology M222C | Advanced Mathematics for CE


NOR

Method of undetermined coefficients

• Seek 𝑦𝑝1 𝑥 , tentatively, as a linear combination of the Refer to the table shown
terms in the family corresponding to 𝑔𝑗 𝑥 . below for different forms
STEP5 of 𝑔𝑗 𝑥

• Substitute the final version of 𝑦𝑝1 𝑥 , into equation, and


equate the coefficients of like terms. Then, solve the
resulting system of algebraic equations for the
STEP 6 undetermined coefficients.

• Repeat Steps 5-6 for 𝑦𝑝2 𝑥 , … , 𝑦𝑝𝑘 𝑥


STEP 7

College of Engineering and Technology M222C | Advanced Mathematics for CE


NOR

Method of undetermined coefficients


𝑔𝑗 𝑥 𝑦𝑃𝑘 𝑥
𝐺 𝑥 = 𝑎0 𝑥 𝑛 + 𝑎1 𝑥 𝑛−1 + ⋯ + 𝑎𝑛 𝑥 𝑠 (𝐴0 𝑥 𝑛 + 𝐴1 𝑥 𝑛−1 + ⋯ + 𝐴𝑛 )
𝐺 𝑥 = 𝑒 𝑎𝑥 𝑥 𝑠 (𝐴0 𝑥 𝑛 + 𝐴1 𝑥 𝑛−1 + ⋯ + 𝐴𝑛 )𝑒 𝑎𝑡
sin 𝛽𝑥 𝑥 𝑠 𝐴0 𝑥 𝑛 + 𝐴1 𝑥 𝑛−1 + ⋯ + 𝐴𝑛 𝑒 𝑎𝑡 cos 𝛽𝑥
𝐺 𝑥 = 𝑒 𝑎𝑥 ቊ + 𝐵0 𝑥 𝑛 + 𝐵1 𝑥 𝑛−1 + ⋯ + 𝐵𝑛 𝑒 𝑎𝑡 sin 𝛽𝑥
cos 𝛽𝑥

s is the smallest non-negative integer (s=0,1, 2,…) that will ensure that no term in 𝑦𝑝(𝑥) is a
solution of the corresponding homogeneous equation

𝑦 = 𝑦𝑐 + 𝑦𝑝

𝑦 = 𝑦𝑐 + 𝑦𝑝1 + 𝑦𝑝2 + ⋯ + +𝑦𝑝𝑘 (𝑥)

College of Engineering and Technology M222C | Advanced Mathematics for CE


NOR

nonHomogeneous linear ode

EXAMPLE 3.2

Solve the given ODE:


𝑦 (4) − 𝑦 2 = 3𝑥 2 − sin 2𝑥

College of Engineering and Technology M222C | Advanced Mathematics for CE


NOR
NOR
NOR
NOR
NOR
NOR

nonHomogeneous linear ode

EXAMPLE 3.2

Solve the given ODE:


𝑦 (4) − 𝑦 2 = 3𝑥 2 − sin 2𝑥

ANSWER

1 4 1
𝑦 = 𝑐1 + 𝑐2 𝑥 + 𝑐3 𝑒𝑥 + 𝑐4 𝑒 −𝑥 2
− 𝑥 − 3𝑥 − sin 2𝑥
4 20

College of Engineering and Technology M222C | Advanced Mathematics for CE


NOR

nonHomogeneous linear ode

EXAMPLE 3.3

Solve the initial value problem:


𝑦 ′′ − 2𝑦 ′ + 𝑦 = 𝑡𝑒 𝑡 + 4 𝑦 0 = 1, 𝑦 ′ 0 = 1

College of Engineering and Technology M222C | Advanced Mathematics for CE


NOR
NOR
NOR
NOR
NOR
NOR

nonHomogeneous linear ode

EXAMPLE 3.3

Solve the initial value problem:


𝑦 ′′ − 2𝑦 ′ + 𝑦 = 𝑡𝑒 𝑡 + 4 𝑦 0 = 1, 𝑦 ′ 0 = 1

ANSWER

1 3 𝑡
𝑦= −3𝑒 𝑡 + 4𝑡𝑒 𝑡 + 𝑡 𝑒 +4
6

College of Engineering and Technology M222C | Advanced Mathematics for CE


NOR

Homework 3
Solve the following initial value problem:
1. 5𝑦 ′′ + 𝑦 ′ = −6𝑥, 𝑦 0 = 0, 𝑦 ′ 0 = −10
2. 𝑦 ′′ + 4𝑦 + 5𝑦 = 35𝑒 4𝑥 , 𝑦 0 = −3, 𝑦 ′ 0 = 1

College of Engineering and Technology M222C | Advanced Mathematics for CE


NOR

references
Kreyszig, E., Kreyszig H., and Norminton, E. Advanced Engineering
Mathematics – 10th ed. (2011). John Wiley & Sons, Inc, Hoboken,
N.J.

College of Engineering and Technology M222C | Advanced Mathematics for CE


NOR|2022

Thank you!
“Run, Forrest, run!” – from Forrest Gump

You might also like