1. Ch 3.6: Nonhomogeneous Equations;
Method of Undetermined Coefficients
Recall the nonhomogeneous equation
where p, q, g are continuous functions on an open interval I.
The associated homogeneous equation is
In this section we will learn the method of undetermined
coefficients to solve the nonhomogeneous equation, which
relies on knowing solutions to homogeneous equation.
)()()( tgytqytpy =+′+′′
0)()( =+′+′′ ytqytpy
2. Theorem 3.6.1
If Y1, Y2 are solutions of nonhomogeneous equation
then Y1 - Y2 is a solution of the homogeneous equation
If y1, y2 form a fundamental solution set of homogeneous
equation, then there exists constants c1, c2such that
)()()()( 221121 tyctyctYtY +=−
)()()( tgytqytpy =+′+′′
0)()( =+′+′′ ytqytpy
3. Theorem 3.6.2 (General Solution)
The general solution of nonhomogeneous equation
can be written in the form
where y1, y2 form a fundamental solution set of homogeneous
equation, c1, c2 are arbitrary constants and Y is a specific
solution to the nonhomogeneous equation.
)()()()( 2211 tYtyctycty ++=
)()()( tgytqytpy =+′+′′
4. Method of Undetermined Coefficients
Recall the nonhomogeneous equation
with general solution
In this section we use the method of undetermined
coefficients to find a particular solution Y to the
nonhomogeneous equation, assuming we can find solutions
y1, y2 for the homogeneous case.
The method of undetermined coefficients is usually limited
to when p and q are constant, and g(t) is a polynomial,
exponential, sine or cosine function.
)()()( tgytqytpy =+′+′′
)()()()( 2211 tYtyctycty ++=
5. Example 1: Exponential g(t)
Consider the nonhomogeneous equation
We seek Y satisfying this equation. Since exponentials
replicate through differentiation, a good start for Y is:
Substituting these derivatives into differential equation,
Thus a particular solution to the nonhomogeneous ODE is
t
eyyy 2
343 =−′−′′
ttt
AetYAetYAetY 222
4)(,2)()( =′′=′⇒=
2/136
3464
22
2222
−=⇔=−⇔
=−−
AeAe
eAeAeAe
tt
tttt
t
etY 2
2
1
)( −=
6. Example 2: Sine g(t), First Attempt (1 of 2)
Consider the nonhomogeneous equation
We seek Y satisfying this equation. Since sines replicate
through differentiation, a good start for Y is:
Substituting these derivatives into differential equation,
Since sin(x) and cos(x) are linearly independent (they are not
multiples of each other), we must have c1= c2 = 0, and hence
2 + 5A = 3A = 0, which is impossible.
tyyy sin243 =−′−′′
tAtYtAtYtAtY sin)(,cos)(sin)( −=′′=′⇒=
( )
0cossin
0cos3sin52
sin2sin4cos3sin
21 =+⇔
=++⇔
=−−−
tctc
tAtA
ttAtAtA
7. Example 2: Sine g(t), Particular Solution (2 of 2)
Our next attempt at finding a Y is
Substituting these derivatives into ODE, we obtain
Thus a particular solution to the nonhomogeneous ODE is
tBtAtYtBtAtY
tBtAtY
cossin)(,sincos)(
cossin)(
−−=′′−=′⇒
+=
( ) ( ) ( )
( ) ( )
17/3,17/5
053,235
sin2cos53sin35
sin2cossin4sincos3cossin
=−=⇔
=−−=+−⇔
=−−++−⇔
=+−−−−−
BA
BABA
ttBAtBA
ttBtAtBtAtBtA
tyyy sin243 =−′−′′
tttY cos
17
3
sin
17
5
)( +
−
=
8. Example 3: Polynomial g(t)
Consider the nonhomogeneous equation
We seek Y satisfying this equation. We begin with
Substituting these derivatives into differential equation,
Thus a particular solution to the nonhomogeneous ODE is
1443 2
−=−′−′′ tyyy
AtYBAttYCBtAttY 2)(,2)()( 2
=′′+=′⇒++=
( ) ( )
( ) ( )
8/11,2/3,1
1432,046,44
14432464
144232
22
22
−==−=⇔
−=−−=+=−⇔
−=−−++−−⇔
−=++−+−
CBA
CBABAA
tCBAtBAAt
tCBtAtBAtA
8
11
2
3
)( 2
−+−= tttY
9. Example 4: Product g(t)
Consider the nonhomogeneous equation
We seek Y satisfying this equation, as follows:
Substituting derivatives into ODE and solving for A and B:
teyyy t
2cos843 −=−′−′′
( ) ( )
( ) ( ) ( )
( )
( ) ( ) teBAteBA
teBA
teBAteBAteBAtY
teBAteBA
tBetBetAetAetY
tBetAetY
tt
t
ttt
tt
tttt
tt
2sin342cos43
2cos22
2sin22sin222cos2)(
2sin22cos2
2cos22sin2sin22cos)(
2sin2cos)(
−−++−=
+−+
+−++−+=′′
+−++=
++−=′
+=
tetetYBA tt
2sin
13
2
2cos
13
10
)(
13
2
,
13
10
+=⇒==
10. Discussion: Sum g(t)
Consider again our general nonhomogeneous equation
Suppose that g(t) is sum of functions:
If Y1, Y2 are solutions of
respectively, then Y1 + Y2 is a solution of the
nonhomogeneous equation above.
)()()( tgytqytpy =+′+′′
)()()( 21 tgtgtg +=
)()()(
)()()(
2
1
tgytqytpy
tgytqytpy
=+′+′′
=+′+′′
11. Example 5: Sum g(t)
Consider the equation
Our equations to solve individually are
Our particular solution is then
teteyyy tt
2cos8sin2343 2
−+=−′−′′
tetettetY ttt
2sin
13
2
2cos
13
10
sin
17
5
cos
17
3
2
1
)( 2
++−+−=
teyyy
tyyy
eyyy
t
t
2cos843
sin243
343 2
−=−′−′′
=−′−′′
=−′−′′
12. Example 6: First Attempt (1 of 3)
Consider the equation
We seek Y satisfying this equation. We begin with
Substituting these derivatives into ODE:
Thus no particular solution exists of the form
tyy 2cos34 =+′′
tBtAtYtBtAtY
tBtAtY
2cos42sin4)(,2sin22cos2)(
2cos2sin)(
−−=′′−=′⇒
+=
( ) ( )
( ) ( )
t
ttBBtAA
ttBtAtBtA
2cos30
2cos32cos442sin44
2cos32cos2sin42cos42sin4
=
=+−++−
=++−−
tBtAtY 2cos2sin)( +=
13. Example 6: Homogeneous Solution (2 of 3)
Thus no particular solution exists of the form
To help understand why, recall that we found the
corresponding homogeneous solution in Section 3.4 notes:
Thus our assumed particular solution solves homogeneous
equation
instead of the nonhomogeneous equation.
tBtAtY 2cos2sin)( +=
tctctyyy 2sin2cos)(04 21 +=⇒=+′′
tyy 2cos34 =+′′
04 =+′′ yy
14. Example 6: Particular Solution (3 of 3)
Our next attempt at finding a Y is:
Substituting derivatives into ODE,
tBttAttBtA
tBttBtBtAttAtAtY
tBttBtAttAtY
tBttAttY
2cos42sin42sin42cos4
2cos42sin22sin22sin42cos22cos2)(
2sin22cos2cos22sin)(
2cos2sin)(
−−−=
−−−−+=′′
−++=′
+=
tttY
BA
ttBtA
2sin
4
3
)(
0,4/3
2cos32sin42cos4
=⇒
==⇒
=−
tyy 2cos34 =+′′