3.5: Nonhomogeneous Equations;Method of Undetermined CoefficientsUndetermined CoefficientsElementary Differential Equations and Boundary Value Problems, 9th edition, by William E. Boyce and Richard C. DiPrima, ©2009 by John Wiley & Sons, Inc.
Recall the nonhomogeneous equationRecall the nonhomogeneous equation
where p q g are continuous functions on an open interval I)()()( tgytqytpy (1)
where p, q, g are continuous functions on an open interval I.The associated homogeneous equation is
0)()( ytqytpy (2)In this section we will learn the method of undetermined coefficients to solve the nonhomogeneous equation, which relies on knowing solutions to the homogeneous equation
)()( yqypy ( )
relies on knowing solutions to the homogeneous equation.
1
Theorem 3.5.1
If Y d Y l ti f th h tiIf Y1 and Y2 are solutions of the nonhomogeneous equation)()()( tgytqytpy ---- (1)
then Y1 - Y2 is a solution of the homogeneous equation0)()( ytqytpy ---- (2)
If, in addition, {y1, y2} forms a fundamental solution set of the homogeneous equation, then there exist constants c1 and c2 such that2
)()()()( 221121 tyctyctYtY ---- (3)
2
Theorem 3.5.2 (General Solution)
Th l l ti f th h tiThe general solution of the nonhomogeneous equation
can be written in the form)()()( tgytqytpy ---- (1)
can be written in the form
where y1 and y2 form a fundamental solution set for the )()()()( 2211 tytyctycty p ---- (2)
y1 y2homogeneous equation, c1 and c2 are arbitrary constants, and
is a particular solution to the nonhomogeneous equation.)(typ
3
Method of Undetermined Coefficients
Recall the nonhomogeneous equationRecall the nonhomogeneous equation
with general solution)()()( tgytqytpy ---- (1)
with general solution
In this section we use the method of undetermined ---- (2))()()()( 2211 tytyctycty p
coefficients to find a particular solution to the nonhomogeneous equation, assuming we can find solutions y1 y2 for the homogeneous case
)(typ
y1, y2 for the homogeneous case.The method of undetermined coefficients is usually limitedto when p and q are constant, and g(t) is a polynomial, exponential, sine or cosine function.
4)(tgcyybya
Table 3.1 Method of Undetermined Coefficients
(t)yfor choice g(t) p
Ceke rtrt
sincos sin,cos... 0,1,...)(n 01
11
tNtMtktkKtKtKtKkt n
nn
nn
)sincos( sin,cos,
tNtMetketkeN
rtrtrt
)(tgcyybya
)()()()(
(1)
5
)()()()( 2211 tytyctycty p (2)
)(tgcyybya (1)
Rule for the method of undetermined coefficients
Basic ruleBasic ruleIf g(t) in (1) is one of the functions in the first column in Table 3.1 choose in the same line and determine its undetermined coefficients by substituting and its derivatives into (1)
)(typ
coefficients by substituting and its derivatives into (1) Modification Rule
If a term in your choice for happens to be a solution of the h ODE di (1) l i l h i f
)(typ
homogeneous ODE corresponding to (1), multiply your choice of by t (or by t2 if this solution corresponds to a double root of
the characteristic equation of the homogeneous ODE))(typ
Sum RuleIf g(t) is a sum of functions in the first column of Table 3.1, choose for the sum of the functions in the corresponding lines of the )(typ
second column
6
Example 1: Exponential g(t)Consider the nonhomogeneous equationConsider the nonhomogeneous equation
We seek Y satisfying this equation. Since exponentials
teyyy 2343 ---- (1)y g q p
replicate through differentiation, a good start for Y is:t
pt
pt
p AetyAetyAety 222 4)(,2)()( ---- (2)Substituting these derivatives into the differential equation,
2/1363464
22
2222
AAeAeAeAe
tt
tttt ---- (3)
Thus a particular solution to the nonhomogeneous ODE is2/136 AeAe tt
tt 21)( tp ety 2
2)(
7
Example 2: Sine g(t), First Attempt (1 of 2)
Consider the nonhomogeneous equationConsider the nonhomogeneous equation
We seek Y satisfying this equation. Since sines replicate tyyy sin243 ---- (1)
through differentiation, a good start for Y is:
S bstit ting these deri ati es into the differential eq ationtAtytAtytAtyp sin)(,cos)(sin)( ---- (2)
Substituting these derivatives into the differential equation,
0cos3sin52sin2sin4cos3sin
tAtAttAtAtA ---- (3)
Since sin(x) and cos(x) are not multiples of each other, we
0cossin
0cos3sin52
21
tctctAtA
must have c1= c2 = 0, and hence 2 + 5A = 3A = 0, which is impossible.
8
tyyy sin243 ---- (1)
Example 2: Sine g(t), Particular Solution (2 of 2)
Our next attempt at finding a Y isOur next attempt at finding a Y is
tBtAtytBtAty
tBtAty
pp
p
cossin)(,sincos)(
cossin)(
---- (2)
Substituting these derivatives into ODE, we obtainpp
sin2cossin4sincos3cossin ttBtAtBtAtBtA
053,235sin2cos53sin35
BABAttBAtBA ---- (3)
Thus a particular solution to the nonhomogeneous ODE is
17/3 ,17/5 BA
tttyp cos173sin
175)(
9
Example 3: Product g(t)Consider the nonhomogeneous equationConsider the nonhomogeneous equation
We seek Y satisfying this equation, as follows:teyyy t 2cos843 ---- (1)
y g q ,
tBetBetAetAety
tBetAetytttt
p
ttp
2cos22sin2sin22cos)(
2sin2cos)(
---- (2)
tBA
teBAteBAteBAtyteBAteBA
t
tttp
tt
222
2sin22sin222cos2)(2sin22cos2
---- (3)
Substituting these into the ODE and solving for A and B:
teBAteBA
teBAtt
t
2sin342cos432cos22
---- (4)
g gtetetyBA tt
p 2sin1322cos
1310)(
132 ,
1310
10
---- (5)
Discussion: Sum g(t)
C id i l h tiConsider again our general nonhomogeneous equation
Suppose that g(t) is sum of functions:
)()()( tgytqytpy
Suppose that g(t) is sum of functions:
)()()( 21 tgtgtg
If are solutions of
)()()( 1 tgytqytpy
)(),( 21 tyty pp
respectively, then is a solution of the
)()()( 2 tgytqytpy
)(),( 21 tyty pp
nonhomogeneous equation above.
11
Example 4: Sum g(t)Consider the equationConsider the equation
Our equations to solve individually are
teteyyy tt 2cos8sin2343 2 ---- (1)Our equations to solve individually are
teyyy t
sin243343 2
(2)
teyyytyyy
t 2cos843sin243
---- (2)
Our particular solution is then
ttt 210531 2 tetettety tttp 2sin
1322cos
1310sin
175cos
173
21)( 2
12
---- (3)
Example 5: First Attempt (1 of 3)
Consider the nonhomogeneous equationConsider the nonhomogeneous equation
We seek Y satisfying this equation. We begin with
teyyy 243 ---- (1)y g q g
Substituting these derivatives into differential equation,
tp
tp
tp AetyAetyAety )(,)()( ---- (2)
Since the left side of the above equation is always 0, no value of A can be found to make a solution to the
tt eeAAA 2)43(
tp Aety )(
---- (3)
nonhomogeneous equation.To understand why this happens, we will look at the solution f th di h diff ti l ti
py )(
of the corresponding homogeneous differential equation
13
Example 5: Homogeneous Solution (2 of 3)
To solve the corresponding homogeneous equation:To solve the corresponding homogeneous equation:
We use the techniques from Section 3 1 and get043 yyy ---- (1)
We use the techniques from Section 3.1 and get
Thus our assumed particular solution solvestp Aety )(
tt etyety 421 )(and)( ---- (2)
Thus our assumed particular solution solves the homogeneous equation instead of the nonhomogeneous equation.
py )(
So we need another form for to arrive at the general solution of the form:
)()( 421 tyececty tt (3)
)(typ
)()( 21 tyececty p
14
---- (3)
teyyy 24'3---- (1)
Example 5: Particular Solution (3 of 3)
Our next attempt at finding a is:
(1)
)(tyOur next attempt at finding a is:
ttp
tp
AteAety
Atety
)(
)( ---- (2))(typ
Substituting these into the ODE, ttttt
p
p
AeAteAteAeAety
y 2)(
)(
tttttt AAAAA 24332tttt
tttttt
AeAteAteAteeAteAteAeAeAte
25/2
255024332
��
---- (3)
So the general solution to the IVP is
tp tety
52)(
20
30
40y�t�
ttt eteety 5/24)( 4
So the general solution to the IVP isttt etececty 5/2)( 4
210.0 0.2 0.4 0.6 0.8 1.0
t
10
15
Summary – Undetermined Coefficients (1 of 2)
For the differential equationFor the differential equation
where a, b, and c are constants, if g(t) belongs to the class )(tgcyybya
, , , g( ) gof functions discussed in this section (involves nothing more than exponential functions, sines, cosines, polynomials or sums or products of these) the method ofpolynomials, or sums or products of these), the method of undetermined coefficients may be used to find a particular solution to the nonhomogeneous equation.The first step is to find the general solution for the corresponding homogeneous equation with g(t) = 0.
)()()( tyctycty )()()( 2211 tyctyctyC
16
Summary – Undetermined Coefficients (2 of 2)
Th d t i t l t i t f (t) fThe second step is to select an appropriate form, g(t) for the particular solution, , to the nonhomogeneous equation and determine the derivatives of that function.
)(typ
After substituting into the nonhomogeneous differential equation, if the form for is correct all the coefficients in can be determined
)(typ
)(ty
)()(),( tyandtyty ppp
is correct, all the coefficients in can be determined.Finally, the general solution to the nonhomogeneous differential equation can be written as
)(typ
)()()()()()( 2211 tytyctyctytyty ppgen h
17
3 6: Variation of Parameters3.6: Variation of ParametersElementary Differential Equations and Boundary Value Problems, 9th edition, by William E. Boyce and Richard C. DiPrima, ©2009 by John Wiley & Sons, Inc
Recall the nonhomogeneous equationRecall the nonhomogeneous equation
where p, q, g are continuous functions on an open interval I.)()()( tgytqytpy
The associated homogeneous equation is0)()( ytqytpy
In this section we will learn the variation of parametersmethod to solve the nonhomogeneous equation. As with the method of undetermined coefficients, this procedure relies on , pknowing solutions to the homogeneous equation.
Variation of parameters is a general method, and requires no d il d i b l i f H idetailed assumptions about solution form. However, certain integrals need to be evaluated, and this can present difficulties.
18
Example 1: Variation of Parameters (1 of 6)
We seek a particular solution to the equation below.We seek a particular solution to the equation below.
We cannot use the undetermined coefficients method since ( ) i ti t f i i t d f d t
tyy csc34 ---- (1)
g(t) is a quotient of sint or cost, instead of a sum or product. Recall that the solution to the homogeneous equation is
tctctyh 2sin2cos)( 21 ---- (2)To find a particular solution to the nonhomogeneous equation, we begin with the form
yh )( 21
2i)(2)()(
(2)
Thenttuttuty p 2sin)(2cos)()( 21
ttuttuttuttutyp 2cos)(22sin)(2sin)(22cos)()( 2211
---- (3)
orttuttuttuttutyp 2sin)(2cos)(2cos)(22sin)(2)( 2121
19 ---- (4)
Example: Derivatives, 2nd Equation (2 of 6)
From the previous slideFrom the previous slide,
Note that we need two equations to solve for u1 and u2. The ttuttuttuttutyp 2sin)(2cos)(2cos)(22sin)(2)( 2121
---- (4)q 1 2
first equation is the differential equation. To get a second equation, we will require
02sin)(2cos)( ttuttu (5)Then
02sin)(2cos)( 21 ttuttu
ttuttutyp 2cos)(22sin)(2)( 21
---- (5)
---- (6)Next,
ttuttuttuttutyp 2sin)(42cos)(22cos)(42sin)(2)( 2211
( )
20
---- (7)
Example: Two Equations (3 of 6)
Recall that our differential equation isRecall that our differential equation is
Substituting y'' and y into this equation, we obtain แทนสมการ (7) (3)
tyy csc34 ---- (1)Substituting y and y into this equation, we obtain แทนสมการ (7), (3)
tttuttuttuttuttuttu
csc32sin)(2cos)(42sin)(42cos)(22cos)(42sin)(2
21
2211
---- (8)
This equation simplifies to
21
tttuttu csc32cos)(22sin)(2 21 ---- (9)Thus, to solve for u1 and u2, we have the two equations:
csc32cos)(22sin)(2 21 tttuttu
( )
---- (9)
02sin)(2cos)( 21 ttuttu
21
---- (5 จาก slide 20)
Example: Solve for u1' (4 of 6)
To find u1 and u2 , we first need to solve for 21 and uu To find u1 and u2 , we first need to solve for
02sin)(2cos)(csc32cos)(22sin)(2
21
21
ttuttutttuttu
21
---- (5 จาก slide 20)
---- (9)
From second equation,
tttutu
2sin2cos)()( 12
(5 จาก slide 20)
---- (10)
Substituting this into the first equation, แทน(10) ลงใน (9) จะได้
ttttuttu csc32cos2i2cos)(22sin)(2 11
---- (11)
ttttttuttutmul
t
cossin2322i)(2
2sincsc32cos)(22sin)(2;2sin)11(2sin
)()(
22
21
21
11
---- (12) ttu
ttttttu
cos3)(sin
cossin232cos2sin)(2
1
221
22
(12)
---- (13)
Example : Solve for u1 and u2 (5 of 6)
From the previous slide สมการที่ (13 10)From the previous slide, สมการท (13, 10)
Thtttututtu
2sin2cos)()(,cos3)( 121
Then
tt
tttt
ttttu
sin2sin213
cossin2sin21cos3
2sin2coscos3)(
22
2
---- (14)
tttt
tsin3csc
23
sin2sin2
sin213
2
---- (15)
Thus
111 sin3cos3)()( cttdtdttutu ---- (16)
222 cos3cotcscln23sin3csc
23)()( ctttdtttdttutu
23---- (17)
Example: General Solution (6 of 6)
Recall our equation and homogeneous solution yh:Recall our equation and homogeneous solution yh:
Using the expressions for u1 and u2 on the previous slide, the tctctytyy h 2sin2cos)(,csc34 21
g p 1 2 p ,general solution to the differential equation is
tyttuttuty h
3)(2sin)(2cos)()( 21 ---- (18)
tyttttttt
tyttttttt h
)(2sincotcscln32cossin2sincos3
)(2sincos32sincotcscln232cossin3
tyttttttt
tyttttttt
h
h
)(2sincotcscln231cos2sincossin23
)(2sincotcscln2
2cossin2sincos3
22
tctctttt 2sin2cos2sincotcscln23sin3 21
24
---- (19)
)()()( tgytqytpy
SummarySuppose y1 y2 are fundamental solutions to the homogeneous
)()()()()( 2211 tytutytutyp
Suppose y1, y2 are fundamental solutions to the homogeneous equation associated with the nonhomogeneous equation above, where we note that the coefficient on y'' is 1.To find u1 and u2, we need to solve the equations
)()()()()(0)()()()( 2211
tgtytutytutytutytu (5),(9) จาก slide 21
Doing so, and using the Wronskian, we obtain
)()()()()( 2211 tgtytutytu
)()()()( tgtytgty
Thus
)(,)()()(,
)(,)()()(
21
12
21
21 tyyW
tgtytutyyW
tgtytu ---- (1)
Thus
221
121
21
21 )(,
)()()(,)(,
)()()( cdttyyW
tgtytucdttyyW
tgtytu
25
---- (2)
)()()( tgytqytpy
Theorem 3.6.1Consider the equations
)()()()()( 2211 tytutytutyp
Consider the equations
0)()()()()(
ytqytpytgytqytpy
---- (2)
---- (1)
If the functions p, q and g are continuous on an open interval I, and if y1 and y2 are fundamental solutions to Eq. (2), then a
ti l l ti f E (1) i
( )
particular solution of Eq. (1) is
dttyyW
tgtytydttyyW
tgtytytyp )()()()(
)()()()()( 1
22
1 ---- (3)
and the general solution is
tyyWtyyW )(,)(, 2121
)()()()( )()()()( 2211 tytyctycty p
26
---- (4)