0% found this document useful (0 votes)
29 views33 pages

CALENG3 - Lecture 5 - N-TH Order Nonhomogeneous Linear ODE-1

Uploaded by

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

CALENG3 - Lecture 5 - N-TH Order Nonhomogeneous Linear ODE-1

Uploaded by

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

CALENG3

Differential
Equations
Lecture 5
n-th Order Non-homogeneous Linear Ordinary
Differential Equations

Luis F. Razon, Ph.D.


Chemical Engineering Department
De La Salle University
1
Non-Homogeneous Linear ODE with
Constant Coefficients
The general solution to a non-homogeneous linear ODE with
constant coefficients
dny d n 1 y dy
a0 n  a1 n1  ...  a n1  a n y  R( x )
dx dx dx
is y = yc + yp

where yc is the complementary solution to the corresponding


homogeneous equation
dny d n 1 y dy
a0 n  a1 n1  ...  a n1  an y  0
dx dx dx

and yp is the particular solution to the nonhomogeneous equation.

2
Method of Undetermined
Coefficients
Consider an ODE with constant coefficients
dny d n 1 y dy
f ( D ) y  a0 n  a1 n1  ...  a n1  a n y  R( x )  f 1 ( x )  f 2 ( x )
dx dx dx

If an ODE can be constructed from f 1(x) and f2(x)


then the solution from the reconstructed ODE can
be used to form a proposed particular solution to

f ( D ) y  R( x )
3
Method of Undetermined
Coefficients
• To use the Method of Undetermined Coefficients, R(x)
must be a solution to a homogeneous or convertible to
one.
• Which of the following functions is a solution to a
homogeneous linear ODE and what are the roots that
correspond to them?
2
( )
𝑅 𝑥 =5 𝑥+ 3 𝑥 𝑅 ( 𝑥 )=3 𝑥 cos ⁡(4 𝑥)
𝑅 ( 𝑥 )=4 𝑒
−8 𝑥
sin ⁡(2 𝑥) 𝑅 ( 𝑥 )=3 ln ⁡(𝑥)
7 𝑅 ( 𝑥 )=cosh ⁡(3 𝑥)
𝑅 ( 𝑥 )=
𝑥 𝑅 ( 𝑥 )=sin ( 𝑥 ) cos ⁡( 𝑥 )
4
Finding the Annihilating Operator
Given a function R(x), then if L is a linear differential
operator with constant coefficients, then if
L(R(x)) = 0
then L is the annihilating operator of R(x).
To find the annihilating operator
1. Determine the roots: m1, m2,… mn of the characteristic
equation that would correspond to f(x)
2. Construct the characteristic equation f(m) that would
give the roots: m1, m2,… mn
3. Obtain the Annihilating Operator L = f(D)
Thus, for the non-homogeneous differential equation,
5
Finding the Annihilating Operator
2
( )
𝑅 𝑥 =5 𝑥+ 3 𝑥
Recall that solutions of the form correspond to the repeated roots,
m1=m2=…= mn=a.

The characteristic equation roots that correspond to the function


are

The characteristic equation is


3
𝑚 =0
and the corresponding differential equation is
3
𝐷 𝑦=0
The annihilating operator is
𝑓 ( 𝐷 ) = 𝐷3

6
Finding the Annihilating Operator
−8 𝑥
( )
𝑅 𝑥 =4 𝑒 sin ⁡(2 𝑥)
Recall, solutions of the form:
correspond to the roots and

The characteristic equation roots that correspond to the function


are and

The characteristic equation is


[ 𝑚− ( −8 +2 𝑖 ) ][ 𝑚 − ( − 8 −2 𝑖 ) ]=0

and the corresponding differential equation is


[ 𝐷 − ( − 8+ 2𝑖 ) ] [ 𝐷 − (− 8 − 2 𝑖 ) ] 𝑦 =0

The annihilating operator is

7
Finding the Annihilating Operator
𝑅 ( 𝑥 )=3 𝑥 cos ⁡4 𝑥
Recall, solutions of the form:

correspond to the roots and

The characteristic equation roots that correspond to the function


are and

The characteristic equation is


[ 𝑚− 4 𝑖][ 𝑚+ 4 𝑖]=0
and the corresponding differential equation is
[ 𝐷 − 4 𝑖 ] [ 𝐷+ 4 𝑖 ] 𝑦=0
The annihilating operator is

8
Finding the Annihilating Operator 3𝑥 −3 𝑥
𝑅 ( 𝑥 )=cosh ⁡(3 𝑥) 𝑒 +𝑒
𝑅 ( 𝑥 )=
2
Recall, solutions of the form:

correspond to the roots

The characteristic equation roots that correspond to the function


are and

The characteristic equation is


[ 𝑚− 3] [𝑚 +3]=0
and the corresponding differential equation is
[ 𝐷 −3 ] [ 𝐷+3 ] 𝑦=0
The annihilating operator is

9
Finding the Annihilating Operator
sin 2 𝑥
𝑅 ( 𝑥 )=sin ( 𝑥 ) cos ⁡( 𝑥 ) 𝑅 ( 𝑥 )=
2
Recall, solutions of the form:
correspond to the roots and

The characteristic equation roots that correspond to the function


are and

The characteristic equation is


[ 𝑚− 2 𝑖][ 𝑚+2 𝑖]=0
and the corresponding differential equation is
[ 𝐷 −2 𝑖 ] [ 𝐷+ 2𝑖 ] 𝑦 =0
The annihilating operator is

10
Method of Undetermined Coefficients
Example 𝑦 + 𝑦 ′−2 𝑦 =2 𝑥 −40 cos ⁡(2 𝑥

complementary solution
𝑦 + 𝑦 ′−2 𝑦 =
(𝐷¿¿2+𝐷 − 2) 𝑦=0¿
2
𝑚 +𝑚 − 2=0
(𝑚 −1)(𝑚+ 2)=0
𝑚1= 1 𝑚2 =−2

𝑥 − 2𝑥
𝑦 𝑐 =𝑐 1 𝑒 + 𝑐2 𝑒

11
Method of Undetermined Coefficients
Example 𝑦 + 𝑦 ′−2 𝑦 =2 𝑥 −40 cos ⁡(2 𝑥
particular solution
𝑅 (𝑥 )=2 𝑥 − 40 cos ⁡(2 𝑥)
obtain the annihilating operator

𝑚′1= 𝑚′2= 0 𝑚′3 =2 𝑖 𝑚′4 =− 2𝑖


obtain the corresponding characteristic equation
2
𝑚 ( 𝑚 −2 𝑖 ) (𝑚+ 2𝑖 )=0
obtain the annihilating operator
2
𝐿= 𝑓 ( 𝐷 ) = 𝐷 ( 𝐷 −2 𝑖 ) ( 𝐷+2 𝑖 )
apply to both sides of the given differential equation

12
Method of Undetermined Coefficients
Example 𝑦 + 𝑦 ′−2 𝑦 =2 𝑥 −40 cos ⁡(2 𝑥
solve the resulting homogeneous differential equation

𝑚1= 𝑚2= 0 𝑚3 =2 𝑖 𝑚4 =− 2𝑖 𝑚5 =1 𝑚6 =− 2

𝑦 =𝑐 1 +𝑐 2 𝑥 +𝑐 3 cos 2 𝑥 +𝑐 3 sin 2 𝑥 +𝑐 5 𝑒 𝑥 + 𝑐6 𝑒 −2 𝑥

particular solution complementary solution

𝑦 𝑝 = 𝐴+ 𝐵𝑥+ 𝐸 cos 2 𝑥 + 𝐹 sin 2 𝑥


need to find the constants A, B,
E and F that would satisfy the
differential equation

13
Method of Undetermined Coefficients
Example 𝑦 + 𝑦 ′−2 𝑦 =2 𝑥 −40 cos ⁡(2 𝑥
need to find the constants A, B,
𝑦 𝑝 = 𝐴+ 𝐵𝑥+ 𝐸 cos 2 𝑥 + 𝐹 sin 2 𝑥 E and F that would satisfy the
differential equation

𝑦 𝑝 =𝐵− 2 𝐸 sin 2 𝑥 +2 𝐹 cos 2 𝑥
′′
𝑦 𝑝 =− 4 𝐸 cos 2 𝑥 − 4 𝐹 sin 2 𝑥

plug into given differential equation

𝑦 + 𝑦 ′−2 𝑦 =2 𝑥 −40 cos ⁡(2 𝑥

14
Method of Undetermined Coefficients
Example 𝑦 + 𝑦 ′−2 𝑦 =2 𝑥 −40 cos ⁡(2 𝑥

match coefficients −6 𝐸+2 𝐹 ¿ − 40 𝐸=6


of similar terms −6 𝐹 −2 𝐸=0 𝐹 =− 2
− 2 𝐵 =2𝐵 =− 1
𝐵 −2 𝐴=0 𝐴=− 1
2
1
𝑦 𝑝 =− − 𝑥 +6 cos 2 𝑥 − 2 sin 2 𝑥
2
𝑥 − 2𝑥
𝑦 𝑐 =𝑐 1 𝑒 + 𝑐2 𝑒
𝑥 −2 𝑥 1
𝑦 = 𝑦 𝑐 + 𝑦 𝑝 =𝑐1 𝑒 +𝑐 2 𝑒 − − 𝑥 +6 cos 2 𝑥 −2 sin 2 𝑥
2
general solution 15
Example ( 𝐷 2 +9 ) 𝑦=5 𝑒 𝑥 −162 𝑥

complementary solution

( 𝐷 +9 ) 𝑦= 0
2

2
𝑚 + 9= 0
𝑚1= 3 𝑖𝑚2 =−3 𝑖
𝑦 𝑐 =𝑐 1 cos 3 𝑥+ 𝑐2 sin 3 𝑥

16
Example ( 𝐷 2 +9 ) 𝑦=5 𝑒 𝑥 −162 𝑥
particular solution
′′ 𝑥
𝑦 𝑝 + 9 𝑦 𝑝 =5 𝑒 − 162 𝑥
𝑥 𝑥 𝑥
𝑥
𝑅 ( 𝑥 )=5 𝑒 −162 𝑥 𝐴 𝑒 + 9( 𝐴 𝑒 + 𝐵+ 𝐸𝑥)=5 𝑒 −162 𝑥
𝑥 𝑥

𝑚1= 1 0
10 𝐴 𝑒 + 9 𝐵+9 𝐸𝑥=5 𝑒 − 162 𝑥
1
10 𝐴=5 𝐴=
𝑥
𝑦 𝑝 = 𝐴 𝑒 + 𝐵 + 𝐸𝑥 2

′ 𝑥
9 𝐵=0 𝐵 =0
𝑦 = 𝐴𝑒 +𝐸
𝑝 9 𝐸=−162 𝐸 =−18
′′ 𝑥
𝑦 𝑝= 𝐴 𝑒
1 𝑥
𝑦 𝑝= 𝑒 − 18 𝑥
2

Note that we have skipped the


𝑦 𝑐 =𝑐 1 cos 3 𝑥+ 𝑐2 sin 3 𝑥 whole part about finding the
annihilating operator and
1 𝑥 creating a new differential
𝑦 =𝑐 1 cos 3 𝑥+ 𝑐2 sin 3 𝑥+ 𝑒 −18 𝑥 equation. Most of the time this
2 can be done but care must be
taken as illustrated in the next
example. 17
Example 𝑦 −3 𝑦 ′−4 𝑦 = {𝑒} ^ {− 𝑥
complementary solution particular solution
𝑦 −3 𝑦 ′−4 𝑦 = 𝑅 ( 𝑥 )=𝑒
−𝑥

2 ′
𝑚 −3 𝑚 − 4=0 𝑚1= − 1
−𝑥
(𝑚 − 4)(𝑚+ 1)=0 𝑦 𝑝= 𝐴 𝑒
𝑚1= 4 𝑚2 =− 1 𝑦 ′𝑝 =− 𝐴 𝑒− 𝑥

4𝑥 −𝑥 𝑦 ′𝑝′ = 𝐴 𝑒 − 𝑥
𝑦 𝑐 =𝑐 1 𝑒 +𝑐 2 𝑒

′′ ′ −𝑥
𝑦 𝑝 −3 𝑦 𝑝 − 4 𝑦 𝑝 =𝑒
−𝑥 −𝑥 −𝑥 −𝑥
𝐴 𝑒 − 3(− 𝐴𝑒 )− 4 𝐴𝑒 =𝑒
−𝑥
0=𝑒
Oops, something’s wrong.

That’s because the proposed


particular solution is not
linearly independent of the
complementary solution. Need
to use annihilator method. 18
Example 𝑦 −3 𝑦 ′−4 𝑦 = {𝑒} ^ {− 𝑥
4𝑥 −𝑥 −𝑥
particular solution 𝑦 =𝑐 1 𝑒 +𝑐 2 𝑒 +𝑐 3 𝑥𝑒
−𝑥
𝑅 ( 𝑥 )=𝑒
complementary particular

𝑚1= − 1 solution solution

𝑚+1=0 ( 𝐷+ 1 ) 𝑦= 0 𝑦 𝑝 = 𝐴 𝑥𝑒− 𝑥

𝐿= 𝑓 ( 𝐷 ) =𝐷+1 𝑦 ′ 𝑝 = 𝐴 𝑒− 𝑥 − 𝐴𝑥 𝑒− 𝑥 = 𝐴 ( 1− 𝑥 ) 𝑒 −𝑥
−𝑥 −𝑥
−𝑥 𝑦 ′ ′ 𝑝 =− 𝐴 ( 1 − 𝑥 ) 𝑒 + 𝐴 ( −1 ) 𝑒
(𝐷¿¿2−3 𝐷 − 4) 𝑦=𝑒 ¿ −𝑥 −𝑥
𝑦 ′ ′ 𝑝 =− 2 𝐴 𝑒 + 𝐴𝑥 𝑒
( 𝐷+1 ) (𝐷¿¿ 2− 3 𝐷 − 4) 𝑦= ( 𝐷+1 ) 𝑒 −𝑥 ¿ ′′ ′ −𝑥
𝑦 𝑝 −3 𝑦 𝑝 − 4 𝑦 𝑝 =𝑒
( 𝐷+1 ) (𝐷¿¿ 2− 3 𝐷 − 4) 𝑦=0 ¿
( 𝑚+1 ) (𝑚¿¿ 2 −3 𝑚− 4)=0 ¿
(𝑚+1)(𝑚+ 1)(𝑚 − 4 )=0 −𝑥 −𝑥 𝐴=−
1

𝑚1= 4
−5 𝐴 𝑒 =𝑒 5
1 −𝑥
′ ′
𝑚2 =𝑚3 =− 1 𝑦 𝑝 =− 𝑥𝑒
5
4𝑥 −𝑥 1 −𝑥
𝑦 =𝑐 1 𝑒 +𝑐 2 𝑒 − 𝑥𝑒
5
general solution 19
Example 2
𝑑 𝑦
+ 𝑦 =12 𝑐𝑜𝑠 2
𝑥
2
𝑑𝑥

2 Can the method of undetermined coefficients


𝑅 ( 𝑥 )=12 cos 𝑥 be used? Can an annihilating operator be
found?

𝑅 ( 𝑥 )=12 ¿ ¿
Using a trig identity, yes.

The rest of the solution can


𝑅 ( 𝑥 )=6 +6 cos 2 𝑥 proceed as before

20
Method of Undetermined Coefficients
(A shortcut if R(x) = constant)
Find the particular solution:

This could be a very long solution. But, since we only


need the particular solution and m=0 is not one of the
roots obtained for the complementary solution, then
we can immediately propose:
𝑦 𝑝= 𝐴 since for
(4 )
𝑦 ′ 𝑝 =𝑦 ′ ′ 𝑝 = 𝑦 ′ ′ ′ 𝑝 =𝑦 =0 𝑝

0 +0 − 0+0 − 2 𝐴=9
9
𝐴=−
2
9
𝑦 𝑝 =−
2
21
Variation of Parameters
There are many functions for which an annihilating
operator cannot be found. For example:
For these, we use another technique called Variation of
Parameters.
It is important that Variation of Parameters be used only
when the Method of Undetermined Coefficients cannot be
used, because, as you will see, there are definite integrals
to be obtained in the end and these can be difficult to do.

22
Variation of Parameters
Given the differential equation f ( D ) y  R( x )
with the complementary solution
yc  c1 f1 ( x )  c2 f 2 ( x )  ...  cn f n ( x )
The variation of parameters technique proposes that a
particular solution of the form

y p  c1 ( x ) f 1 ( x )  c2 ( x ) f 2 ( x )  ...  cn ( x ) f n ( x )

exists and all that remains is to determine


c1(x), c2(x),…,cn(x).
23
Example 𝑦 + 𝑦 = sec ⁡( 𝑥 ) tan ⁡( 𝑥
complementary solution

𝑦+ 𝑦 =
( 𝐷 2 +1 ) 𝑦 =0
2
𝑚 +1=0
𝑚1= 𝑖 𝑚2 =−𝑖

𝑦 𝑐 =𝑐 1 sin 𝑥 +𝑐 2 cos 𝑥

particular solution

𝑦 𝑝 =𝑐1 ( 𝑥 )sin 𝑥 +𝑐 2 ( 𝑥 ) cos 𝑥


24
Example 𝑦 + 𝑦 = sec ⁡( 𝑥 ) tan ⁡( 𝑥
′′
particular solution
𝑦 + 𝑦 𝑝 =sec ⁡(𝑥) tan ⁡(𝑥)
𝑝
𝑦 𝑝 =𝑐1 ( 𝑥 )sin 𝑥 +𝑐 2 ( 𝑥 ) cos 𝑥

(1)

𝑦 𝑝 =𝑐1 ( 𝑥 ) cos 𝑥 − 𝑐 2 ( 𝑥 ) sin ( 𝑥 ) (2)

25
(1)

(2)

(1)
+
(2)

𝑢=cos 𝑥
𝑑𝑢=−sin 𝑥 𝑑𝑥

26
plug into
(1)

2
′ sin 𝑥 2
𝑐 ( 𝑥 )=−
2 2
=− tan 𝑥
cos 𝑥

𝑐 2 ( 𝑥 )=∫ − tan 𝑥 𝑑𝑥=∫ ¿¿


2 2 2
tan 𝑥=sec 𝑥 −1
𝑐 2 ( 𝑥 )= 𝑥 − tan 𝑥
𝑦 𝑝 =𝑐1 ( 𝑥 )sin 𝑥 +𝑐 2 ( 𝑥 ) cos 𝑥
𝑦 𝑝 =¿
𝑦 𝑝 =¿
𝑦 = 𝑦𝑐 + 𝑦𝑝
𝑦 =𝑐 1 sin 𝑥 + 𝑐 2 cos 𝑥 + ¿
𝑦 =𝑐 1 sin 𝑥 +𝑐 2 cos 𝑥 + ¿
27
Variation of Parameters
2nd Order Linear ODE Shortcut
2
d y dy
• Standard Form
2
 a1  a0 y  R ( x)
dx dx
yc  c1 f1 ( x)  c2 f 2 ( x) y p  c1 ( x) f1 ( x)  c2 ( x) f 2 ( x)

c1 ' ( x) f1 ( x)  c2 ' ( x) f 2 ( x)  0
c1 ' ( x) f1 ' ( x)  c2 ' ( x) f 2 ' ( x)  Rx 

28
Example
2 2𝑥
𝑑 𝑦 𝑑𝑦 𝑒
−3 +2 𝑦 = 2𝑥
𝑑𝑥
2
𝑑𝑥 1+ 𝑒
complementary solution
𝑑2 𝑦 𝑑𝑦
−3 +2 𝑦 =0
𝑑𝑥 2
𝑑𝑥
(𝐷¿¿2−3 𝐷+2) 𝑦=0¿
2
𝑚 − 3 𝑚+ 2= 0
(𝑚 −2)(𝑚 −1)=0
𝑚1 =𝑚 2 2 =1
𝑦 𝑐 =𝑐 1 𝑒 2 𝑥 +𝑐 2 𝑒 𝑥

particular solution
2𝑥 𝑥
𝑦 𝑝 =𝑐1 ( 𝑥 )𝑒 +𝑐 2 ( 𝑥) 𝑒
29
2𝑥 𝑥
𝑦 𝑝 =𝑐1 ( 𝑥 )𝑒 +𝑐 2 ( 𝑥) 𝑒

via the shortcut 𝑐 1 ′ (𝑥) 𝑓 1 (𝑥)+𝑐 2 ′ (𝑥) 𝑓 2 (𝑥)=0


𝑐 1 ′ (𝑥) 𝑓 1 ′ (𝑥)+𝑐 2 ′(𝑥 ) 𝑓 2 ′ (𝑥 )=𝑅 ( 𝑥 )
(1)
(2)

(2)
-
(1)
2𝑥
′ 2𝑥 𝑒 substitute into (1)
𝑐 ( 𝑥 )𝑒
1 = 2𝑥
1+ 𝑒 (1)

′ 1
𝑐 1 ( 𝑥 )= 2𝑥
1+𝑒
30
1 1
𝑐 1 ( 𝑥 )=ln|𝑢|− ln ¿𝑢 +1∨¿¿
′ 2
𝑐 ( 𝑥 )=
1 2𝑥
1+𝑒 2
1
1 𝑐 1 ( 𝑥 )=ln|𝑒 |− ln¿ 𝑒 +1∨¿¿
𝑥 2𝑥
𝑐 1 𝑥 =∫
( ) 2𝑥
𝑑𝑥 2
1+𝑒
1 2𝑥
𝑢=𝑒
𝑥
𝑑𝑢=𝑒 𝑑𝑥
𝑥
𝑐 1 ( 𝑥 )=𝑥 − ln ¿ 𝑒 +1∨¿ ¿
𝑥
2
𝑒
𝑐 1 ( 𝑥 )=∫ 𝑑𝑥
( 1+𝑒 ) 𝑒
2𝑥 𝑥

1
𝑐 1 ( 𝑥 )=∫ 𝑑𝑢
( 1+𝑢 ) 𝑢
2

𝑥 𝑥
𝑢=𝑒 𝑑𝑢=𝑒 𝑑𝑥
1= 𝐴 ( 𝑢 + 1 ) + ( 𝐵𝑢+ 𝐶 ) 𝑢
2

𝐴 + 𝐵=1 𝐶 =0 𝐴=1 𝐵=−1

𝑐 1 ( 𝑥 )=∫
( 1 𝑢
− 2
𝑢 𝑢 +1
𝑑𝑢
)
31
1 2𝑥
𝑐 1 ( 𝑥 )=𝑥 − ln ¿ 𝑒 +1∨¿ ¿
2
𝑦 𝑝 =𝑐1 ( 𝑥 )𝑒 2 𝑥 +𝑐 2 ( 𝑥) 𝑒 𝑥

𝑦 𝑝 =¿
2𝑥 1 2𝑥 2𝑥 𝑥 −1 𝑥
𝑦 𝑝 =𝑥 𝑒 − 𝑒 ln ¿ 𝑒 +1∨¿ − 𝑒 tan ( 𝑒 ) ¿
2

2𝑥 𝑥
𝑦 𝑐 =𝑐 1 𝑒 +𝑐 2 𝑒

2𝑥 𝑥 2𝑥 1 2𝑥 2𝑥 𝑥 −1 𝑥
𝑦 =𝑐 1 𝑒 +𝑐 2 𝑒 + 𝑥 𝑒 − 𝑒 ln ¿ 𝑒 + 1∨¿ − 𝑒 tan ( 𝑒 ) ¿
2

general solution

32
wolframalpha.com
• y”-3y’+2y=cos(e^(-x))

33

You might also like