Sample Solutions for Homework 27, 28

Sample Solutions for Homework 27, 28
Winfried Just
Department of Mathematics, Ohio University
February 20, 2017
Winfried Just, Ohio University
MATH3400, Solutions for Homework 27, 28
Review: The method of variation of parameters
Consider a 2nd -order nonhomogeneous second-order linear DE
y 00 + a1 (x)y 0 + a0 (x)y = g (x).
1
(1)
Find two linearly independent solutions y1 (x), y2 (x) of the
associated homogeneous DE
y 00 + a1 (x)y 0 + a0 (x)y = 0
2
(2)
Calculate the Wronskian
y1 (x) y2 (x)
W = det
.
y10 (x) y20 (x)
3
The general solution of (1) is given by
Z
y (x) = y1 (x)
−y2 (x)g (x)
dx + y2 (x)
W
Ohio University – Since 1804
Winfried Just, Ohio University
Z
y1 (x)g (x)
dx.
W
Department of Mathematics
MATH3400, Solutions for Homework 27, 28
Review: Can the formula possibly be correct?
When we substitute y1 (x) = cos 3x and y2 (x) = sin 3x into
R
R
g (x)
dx + y2 (x) y1 (x)Wg (x) dx,
y (x) = y1 (x) −y2 (x)
W
we get
y (x) = cos 3x
R
− sin 3x g (x)
W
dx + sin 3x
R
cos 3x g (x)
W
dx.
But what if we switch names: y1 (x) = sin 3x and y2 (x) = cos 3x?
After substituting we get:
R
R
3x g (x)
yswitched (x) = sin 3x − cosW
dx + cos 3x
sin 3x g (x)
W
dx,
which seems to be −y (x).
Impossible!
If the method is correct, it must give the same result,
regardless of which function was labeled y1 (x).
Homework 25: Find an explanation of what is going on here.
Ohio University – Since 1804
Winfried Just, Ohio University
Department of Mathematics
MATH3400, Solutions for Homework 27, 28
Sample Solution for Homework 27
For the choice y1 (x) = cos 3x and y2 (x) = sin 3x we got W = 3.
For the choice y1 (x) = sin 3x and y2 (x) = cos 3x we get:
W = det
y1 (x) y2 (x)
y10 (x) y20 (x)
= det
sin 3x
3 cos 3x
cos 3x
−3 sin 3x
= −3.
The Wronskian also changes its sign! Substitution into
R
R
g (x)
y (x) = y1 (x) −y2 (x)
dx + y2 (x) y1 (x)Wg (x) dx
W
gives for y1 (x) = cos 3x and y2 (x) = sin 3x:
R
R cos 3x g (x)
g (x)
y (x) = cos 3x − sin 3x
dx
+
sin
3x
dx,
3
3
and for y1 (x) = sin 3x and y2 (x) = cos 3x:
R
R
3x g (x)
yswitched (x) = sin 3x − cos−3
dx + cos 3x
sin 3x g (x)
−3
dx.
The result does not change when we switch names.
But we need to keep track of which function is named y1 (x)!
Ohio University – Since 1804
Winfried Just, Ohio University
Department of Mathematics
MATH3400, Solutions for Homework 27, 28
Sample Solution for Homework 28(a)
with the Method of Undetermined Coefficients
Consider the DE y 00 − y 0 = x.
The characteristic polynomial m2 − m = m(m + 1) has roots
m1 = 0 and m2 = 1 with multiplicity k1 = k2 = 1.
The complementary solution is yc (x) = c1 + c2 e x .
The tentative form of yp (x) is yptentative (x) = Ax + B.
Multiplying with x k2 = x we get
yp = Ax 2 + Bx. Differentiate and substitute in the DE:
yp0 = 2Ax + B and yp00 = 2A,
2A − 2Ax − B = x.
Match coefficients: −2A = 1, 2A − B = 0.
Solve: A = −0.5, B = −1.
The general solution is: y (x) = c1 + c2 e x − 0.5x 2 − x.
Ohio University – Since 1804
Winfried Just, Ohio University
Department of Mathematics
MATH3400, Solutions for Homework 27, 28
Sample Solution for Homework 28(a)
with the Method of Variation of Parameters
Consider the DE y 00 − y 0 = x.
Choose y1 (x) = 1 and y2 (x) = e x
as two linearly independent solutions of the complementary DE.
1 ex
= ex .
Then W = det
0 ex
The general solution is given by
R
R
(x)
y (x) = y1 (x) −y2 (x)g
dx + y2 (x)
W
Substitute: y (x) = 1
R
−e x x
ex
dx + e x
R
y1 (x)g (x)
W
(1)x
ex
dx.
dx.
Simplify and integrate. Use integration by parts for the second integral:
R
R
y (x) = −x dx + e x xe −x dx = −0.5x 2 + c1 + e x (−xe −x − e −x + c2 ).
The general solution is: −0.5x 2 − x + c1 − 1 + c2 e x .
Since c1 − 1 is an arbitrary constant, we get the same solution as before.
Ohio University – Since 1804
Winfried Just, Ohio University
Department of Mathematics
MATH3400, Solutions for Homework 27, 28
Sample Solution for Homework 28(b)
with the Method of Undetermined Coefficients
Consider the DE y 00 + 2y 0 + 5y = 2e x
The characteristic polynomial m2 + 2m + 5 = (m + 1)2 + 22 has
roots m1 = −1 + i and m2 = −1 − i with multiplicity k1 = k2 = 1.
The complementary solution is
yc (x) = c1 e −x sin 2x + c2 e −x cos 2x.
The tentative form of yp (x) is the correct form here:
yp = Ae x . Differentiate and substitute in the DE:
yp0 = Ae x and yp00 = Ae x ,
Ae x + 2Ae x + 5Ae x = 2e x .
Match coefficients: A + 2A + 5A = 2.
Solve: A = 41 .
The general solution is:
y (x) = c1 e −x sin 2x + c2 e −x cos 2x + 41 e x .
Ohio University – Since 1804
Winfried Just, Ohio University
Department of Mathematics
MATH3400, Solutions for Homework 27, 28
Sample Solution for Homework 28(b)
with the Method of Variation of Parameters
Consider the DE y 00 + 2y 0 + 5y = 2e x .
Choose y1 (x) = e −x sin 2x and y2 (x) = e −x cos 2x
as two linearly independent solutions of the complementary DE.
e −x sin 2x
e −x cos 2x
W = det
=
e −x (2 cos 2x − sin 2x) e −x (−2 sin 2x − sin 2x)
−2x
.
−2e
The general solution is given by
R
R
(x)
y (x) = y1 (x) −y2 (x)g
dx + y2 (x)
W
y1 (x)g (x)
W
dx.
Substitute:
y (x) = e −x sin 2x
R
−(e −x cos 2x)2e x
−2e −2x
dx + e −x cos 2x
R
(e −x sin 2x)2e x
−2e −2x
dx.
Simplify:
R
R
y (x) = e −x sin 2x (cos 2x)e 2x dx − e −x cos 2x (sin 2x)e 2x dx.
Ohio University – Since 1804
Winfried Just, Ohio University
Department of Mathematics
MATH3400, Solutions for Homework 27, 28
Sample Solution for Homework 28(b)
with the Method of Variation of Parameters, completed
Consider the DE y 00 + 2y 0 + 5y = 2e x .
We found that the general solution is:
R
R
y (x) = e −x sin 2x (cos 2x)e 2x dx − e −x cos 2x (sin 2x)e 2x dx.
Integration by parts shows that
R
2x 2x
(cos 2x)e 2x dx = cos 2x+sin
e + c1 and
4
R
2x 2x
(sin 2x)e 2x dx = sin 2x−cos
e + c2
4
Substitute into the formula for y (x) and simplify:
y (x) = c1 e −x sin 2x + c2 e −x cos 2x +
sin 2x cos 2x+sin2 2x−cos 2x sin 2x+cos2 2x x
e
4
Thus we get the same solution as before:
y (x) = c1 e −x sin 2x + c2 e −x cos 2x + 41 e x
Ohio University – Since 1804
Winfried Just, Ohio University
Department of Mathematics
MATH3400, Solutions for Homework 27, 28
Sample Solution for Homework 28(c)
with the Method of Undetermined Coefficients
Consider the DE y 00 − 2y 0 + y = cos 2x − e x .
The complementary solution is yc (x) = c1 e x + c2 xe x .
The tentative form of yp (x) is yptentative = A sin 2x + B cos 2x + Ce x
Multiply the last term with x k = x 2 : yp = A sin 2x + B cos 2x + Cx 2 e x .
Differentiate and substitute in the DE:
yp0 = 2A cos 2x − 2B sin 2x + Cx 2 e x + 2Cxe x ,
yp00 = −4A sin 2x − 4B cos 2x + Cx 2 e x + 4Cxe x + 2Ce x ,
cos 2x − e x = −4A sin 2x − 4B cos 2x + Cx 2 e x + 4Cxe x + 2Ce x
−2(2A cos 2x − 2B sin 2x + Cx 2 e x + 2Cxe x ) + A sin 2x + B cos 2x + Cx 2 e x .
Match coefficients: −3A + 4B = 0, −3B − 4A = 1, 2C = −1.
Solve: A =
−4
25 ,
B=
−3
25 ,
C = −0.5.
The general solution is:
y (x) = c1 e x + c2 xe x −
4
25
sin 2x −
Ohio University – Since 1804
Winfried Just, Ohio University
3
25
cos 2x − 0.5x 2 e x .
Department of Mathematics
MATH3400, Solutions for Homework 27, 28
Sample Solution for Homework 28(c)
with the Method of Variation of Parameters
Consider the DE y 00 − 2y 0 + y = cos 2x − e x .
Choose y1 (x) = e x and y2 (x) = xe x
as two linearly independent solutions of the complementary DE.
x
e
xe x
W = det
= e 2x .
e x e x (1 + x)
The general solution is given by
R
R
(x)
y (x) = y1 (x) −y2 (x)g
dx + y2 (x)
W
Substitute: y (x) = e x
R
−xe x (cos 2x−e x )
e 2x
y1 (x)g (x)
W
dx.
dx + xe x
R
e x (cos 2x−e x )
e 2x
dx.
Simplify:
R
R
y (x) = e x (−xe −x cos 2x − x) dx + xe x (e −x cos 2x − 1) dx.
After performing tedious integration by parts we will get the same result
as before.
Ohio University – Since 1804
Winfried Just, Ohio University
Department of Mathematics
MATH3400, Solutions for Homework 27, 28