Recitation 11 - Stony Brook AMS

AMS361 Recitation 03/04 Notes 9
1
Solution of Non-homogeneous Linear Higher Order DEs
Theorem 1. If yc is a general solution to Ly = 0 and yp is a particular solution to
Ly = f (x), then y = yc + yp is the general solution to the non-homogeneous DE Ly = f (x).
1.1
Undetermined Coefficients Method
Objective: Solve the non-homogeneous DE Ly = f (x).
• Step 1: Use the characteristic equation to solve the homogeneous DE Ly = 0, and
find the linearly independent solutions y1 , y2 , · · · .
• Step 2: Guess the formula of the particular solution yp according to the formula of
f (x). Pay attention to the cases of duplication where the initial guess is multiplied
by xs . There are undetermined coefficients in yp .
• Step 3: Substitute the particular solution yp into the non-homogeneous DE Ly = f (x)
and determine the coefficients.
• Step 4: Theorem 1 tells that the general solution to the non-homogeneous DE Ly =
f (x) is given by y = yc + yp .
The following table lists the functions that can be chosen as the particular solutions for a
given RHS. Three fundamental cases are listed.
f (x)
b0 + b1 x + · · · + bm xm
acos(kx) + bsin(kx)
aerx
(acos(kx) + bsin(kx))(c0 + · · · + cm xm )1
aerx (b0 + b1 x + · · · + bm xm )
aerx (bcos(kx) + csin(kx))1
yp
xs [A0 + A1 x + · · · + Am xm ]
xs [Acos(kx) + Bsin(kx)] 1
xs [Aerx ]
s
x (Acos(kx) + Bsin(kx))[C0 + · · · + Cm xm ]
xs erx [A0 + A1 x + · · · + Am xm ]
xs erx [Acos(kx) + Bsin(kx)]
How to determine the value of duplication s? First, we initially guess the formula of yp
according to f (x) without considering any duplication. Then, compare the formula of yp
you initially guess with yc . If there is some part that appears or partially appears in yc ,
then multiply a x to that part. Repeat this until there is no common term between yp
and yc .
1
Even if only cos(kx) function or only sin(kx) function appears in f (x), we still need to include both of
them in the particular solution yp
1
1.2
Problem 3.4.2
Question: Find the particular solution of the following DE
y 000 + y 00 + y 0 + y = x3 + x2
Solution: Let’s follow the steps.
Step 1: Use the characteristic equation to solve the homogeneous DE Ly = 0.
r3 + r2 + r + 1 = 0
⇒
r1 = −1, r2 = i, r3 = −i
⇒
yc = C1 e−x + C2 cos(x) + C3 sin(x)
Step 2: Guess the formula of the particular solution yp according to the formula of f (x).
Since f (x) = x3 + x2 neither of the components is part of yc , set s = 0. So, the formula of
the particular solution is
yp = A0 + A1 x + A2 x2 + A3 x3 .
Step 3: Substitute yp into the non-homogeneous DE.
y 0 = A1 + 2A2 x + 3A3 x2
y 00 = 2A2 + 6A3 x
y 000 = 6A3
Plugging this back to the DE and combine terms with same degree.
(6A3 ) + (2A2 + 6A3 x) + (A1 + 2A2 x + 3A3 x2 ) + (A0 + A1 x + A2 x2 + A3 x3 ) = x3 + x2
(A3 )x3 + (A2 + 3A3 )x2 + (A1 + 2A2 + 6A3 )x + (A0 + A1 + 2A2 + 6A + 3) = x3 + x2
Match the coefficient before each term and solve the linear system.

A3 = 1



A2 + 3A3 = 1
A1 + 2A2 + 6A3 = 0



A0 + A1 + 2A2 + 6A + 3 = 0
which gives

A3 = 1



A2 = −2
A = −2


 1
A0 = 0
Therefore, the particular solution is
yp = −2x − 2x2 + x3
2
1.3
Problem 3.4.5
Question: Find the general solution of the following DE
y 00 + 9y = cos(3x)
Solution: Follow the steps.
Step 1: Use the characteristic equation to solve the homogeneous DE Ly = 0.
r2 + 9 = 0
⇒ r1 = 3i, r2 = −3i
⇒ yc = C1 cos(3x) + C2 sin(3x)
Step 2: Guess the formula of the particular solution yp according to the formula of f (x).
Since f (x) = cos(3x) is part of yc and the order of duplication is 1, set s = 1. So the
formula of the particular solution is
yp = x(A1 cos(3x) + A2 sin(3x))
Step 3: Substitute yp into the non-homogeneous DE.
y 0 = (A1 + 3A2 x)cos(3x) + (A2 − 3A1 x)sin(3x)
y 00 = (6A2 − 9A1 x)cos(3x) + (−6A1 − 9A2 x)sin(3x)
Plugging this back to the DE and combine terms with same degree.
[(6A2 − 9A1 x)cos(3x) + (−6A1 − 9A2 x)sin(3x)] + 9[x(A1 cos(3x) + A2 sin(3x))] = cos(3x)
(6A2 )cos(3x) + (−6A1 )sin(3x) = cos(3x)
Match the coefficient before each term and solve the linear system.
6A2 = 1
−6A1 = 0
which gives
A2 = 61
A1 = 0
Therefore, the particular solution is
1
yp = xsin(3x)
6
and the general solution for the original non-homogeneous DE is
1
y = yc + yp = C1 cos(3x) + C2 sin(3x) + xsin(3x)
6
3
1.4
Extra Question
Question: Find the general solution for the following DE
y (4) + 18y 00 + 81 = cos(3x)
Solution: As usual, first of all, solve the characteristic equation of the homogeneous DE
r4 + 18r2 + 81 = 0
⇒
(r2 + 9) = 0
⇒
r1 = r2 = 3i, r3 = r4 = −3i
⇒
yc = (C1 + C2 x)cos(3x) + (C3 + C4 x)sin(3x)
Then, we need to decide the formula of the particular solution yp . Easy to observe that
f (x) = cos(3x) is part of yc and the order of duplication is 2. So, the formula is
yp = x2 (A1 cos(3x) + sin(3x))
After that, substitute yp into the non-homogeneous DE and solve for the undetermined
coefficients.
1.5
Problem 3.4.6
Question: Find the particular solution of the following DE
y 000 + y 00 + y 0 + y = 1 + cos(x) + sin(2x) + e−x
Solution: As usual, first of all, solve the characteristic equation of the homogeneous DE
r3 + r2 + r + 1 = 0
⇒ r1 = −1, r2 = i, r3 = −i
⇒ yc = C1 e−x + C2 cos(x) + C3 sin(x)
Then, we need to decide the formula of the particular solution yp . The RHS of the nonhomogeneous DE f (x) = 1 + cos(x) + sin(2x) + e−x contains cos(x) and e−x . They are part
of yc and the order of duplication is 1 for both of them. So, the formula of the particular
solution is
yp = A + [x(Bcos(x) + Csin(x))] + [Dcos(2x) + Esin(2x)] + F (xe−x )
After that, substitute yp into the non-homogeneous DE and solve for the undetermined
coefficients.
2
Variation of Parameters
Consider a 2nd order non-homogeneous DE
y 00 + P (x)y 0 + Q(x)y = f (x).
Compose a formula for the particular solution for the above DE.
4
• Step 1: Find the general solution for the homogeneous DE: yc = C1 y1 + C2 y2 .
• Step 2: Assume the particular solution is yp = u1 (x)y1 + u2 (x)y2 .
• Step 3: Obtain a linear system
y1 u01 (x) + y2 u02 (x) = 0
0
y1 u01 (x) + y20 u02 (x) = f (x)
which can also be written as
0
y1 y2
u1 (x)
0
=
y10 y20
u02 (x)
f (x)
• Step 3: Calculate Wronskian W (y1 , y2 )
• Step 4: Solve the linear system
2 f (x)
dx
− y(y
1 ,y2 )
R W
y1 f (x)
u2 (x) = W (y1 ,y2 ) dx
u1 (x) =
R
• Step 5: yp = u1 (x)y1 + u2 (x)y2
2.1
Extra Problem
Question: Using the variation of parameters method, solve
y 00 − 4y = sinh(2x)
No points will be awarded if any other method is used. Show all work.
Solution:Let’s follow the above steps.
Step 1: Solve the characteristic equation and obtain yc
r2 − 4 = 0
⇒ r1 = 2, r2 = −2
⇒ yc = C1 y1 + C2 y2
where y1 = e2x , y2 = e−2x
Step 2: Assume yp = u1 (x)y1 + u2 (x)y2 .
Step 3: Obtain the linear system
0 y1 y2
u1
0
=
y10 y20
u02
f (x)
e2x
e−2x
2x
2e
−2e−2x
u01
u02
y1 y2
y10 y20
=
Step 3: Calculate Wronskian
W (y1 , y2 ) =
5
0
e2x −e−2x
2
=
e2x
e−2x
2x
2e
−2e−2x
= −4
Step 4: Solve for u1 (x) and u2 (x)
Z
Z
e−2x (e2x − e−2x )
y2 f (x)
dx = −
dx
u1 (x) = −
W (y1 , y2 )
−4 ∗ 2
Z
1 − e−4x
x e−4x
=
dx = +
8
8
32
Z
Z 2x 2x
y1 f (x)
e (e − e−2x )
u2 (x) =
dx =
dx
W (y1 , y2 )
−4 ∗ 2
Z 4x
e −1
e4x x
=
dx = −
+
−8
32
8
Step 5: The particular solution is
yp = u1 (x)y1 + u2 (x)y2
e4x x −2x
x e−4x 2x
+
)e + (−
+ )e
8
32
32
8
2x
−2x
2x
−2x
xe
e
e
xe
=
+
−
+
8
32
32
8
xcosh(2x) sinh(2x)
=
−
4
16
=(
Step 6: The solution for the non-homogeneous DE is
y = yc + yp
= C1 e2x + C2 e−2x +
xcosh(2x) sinh(2x)
−
4
16
6