the solution to homework 2

Assignment 2
MATH 2270
DUE DATE: Please hand in solutions on February 28 in class.
Please write out complete solutions for each of the following 6 problems (one more will still be
added). You may, of course, consult with your classmates, the textbook or other resources, but
please write up your own solutions. Copying another student’s solution and handing it in as your
own is considered cheating. Don’t do it!
1. Find a 4th order, linear, non homogeneous differential equation whose general solution is
y = c1 + c2 x + c3 e2x cos x + c4 e2x sin x − xe−x
Explain your reasoning.
Once you have the differential equation, formulate an initial value problem and use Maple to
solve it. Indicate clearly what are the constants c1 , ...c4 for the solution to the initial value
problem.
SOLUTION: We know that a homogeneous linear equation of degree 4 with constant coefficients will have solution
yc = c1 + c2 x + c3 e2x cos x + c4 e2x sin x
precisely when its auxiliary polynomial has roots m = 0 with multiplicity 2 and complex roots
m = 2 + i and m = 2 − i, I.e., the auxiliary polynomial would be m2 (m − (2 − i)(m − (2 + i)) =
m2 (m2 − 4m + 5) = m4 − 4m3 + 5m2 .
This auxiliary equation will arise from the homogeneous differential equation
y (4) − 4y (3) + 5y 00 = 0.
So, we are looking for a non-homogeneous equation of the form
y (4) − 4y (3) + 5y 00 = g(x)
which has as a particular solution yp = −xex . Therefore
g(x) = yp(4) − 4yp(3) + 5yp00 = (−4ex − xex ) − 4(−3ex − xex ) + 5(−2ex − xex ) = −2ex − 2xex .
So g(x) = −2ex − 2xex , and so our differential equation is
y (4) − 4y (3) + 5y 00 = −2ex − 2xex .
Just to check my solution I used MAPLE to solve the DE. MAPLE gave the solution
y(x) = C1
3 2x
4
4
3
e cos(x) + C1 e2x sin(x) − C2 e2x cos(x) + C2 e2x sin(x) − xex + C3 x + C4
25
25
25
25
This is a bit odd since there are repetitions of the terms e2x sin(x) and e2x cos(x), but by
choosing constants A and B such that
3
4
A = C1 25
− C2 25
and
4
3
B = C1 25
+ C2 25
we can then rewrite MAPLE’s solution as
y = C4 + C3 x + Ae2x cos x + Be2x sin x − xe−x
which is clearly equivalent to the stated form of the desired solution.
For the last part of the question, I chose the initial value problem y 000 (0) = 4, y 00 (0) =
3, y 0 (0) = 2 and y(0) = 1. And MAPLE gave the solution
y(x) =
27 2
11
2
2
e x cos x + e2x sin x − xex + x −
25
25
5
25
2
c2 =
And so our constants can be read off easily: c1 = − 25
2
5
c3 =
27
25
c4 =
11
25
2. Problem 44 from section 4.4. Discuss how the method of section 4.4 can be used to find a
particular solution to y 00 + y = sin x cos 2x. Carry out your idea.
SOLUTION: We know that the complementary function is of the form
yc = C1 cos x + C + 2 sin x.
The general principle is that the particular solution should take a form that is a linear combination of functions formed from taking derivatives of the function g(x) = sin x cos 2x. In this
case that would be yield a particular solution of the form
yp = A sin x cos 2x + B sin x sin 2x + C cos x cos 2x + D cos x sin 2x.
I tried to carry this out but got a set of 4 linear equations in A, B, C and D that was
inconsistent (no solution!).
So, I then considered that sin x cos 2x = sin x(1 − 2 sin2 x) = sin x − 2 sin3 x
So using the method of superposition we are looking for two particular solutions, one with
g(x) = sin x. And another with g(x) = sin3 x. So for the first, a particular solution could take
the form
yp1 = A sin x + B cos x
Alas, this is the form of the complementary function so we need to multiply it by the factor x.
For the other function, we consider linear combinations of derivatives of g(x) and we can see
that the terms g 0 (x) = 3 sin2 x cos x can be rewritten as cos x − 3 cos3 x. So we can consider
linear combinations of sin3 x and cos3 x.
I.e., the particular solution, all together, has the form yp = Ax sin x + Bx cos x + C cos3 x +
D sin3 x. I had trouble solving this by hand, but the MAPLE solution suggests that A = C = 0
and B = D = 41 .
3. Problem 26 from section 4.6. Solve the differential equation y 000 + 4y 0 = sec 2x.
SOLUTION: The auxiliary equation is m3 +4m = m(m2 +4). So yc = c1 +c2 cos 2x+c3 sin 2x.
And the Wronskian W = 8. Since f (x) = sec 2x we obtain
u01 = 81 W1 =
1
4
sec 2x
u02
u03
= 18 W2 = − 14
= 18 W3 = − 14 tan 2x.
So, u1 = 18 ln | sec 2x + tan 2x|,
u2 = − 41 x and u3 =
1
8
ln | cos 2x|.
And so the solution is
y = c1 + c2 cos 2x + c3 sin 2x +
1
1
1
ln | sec 2x + tan 2x| + − x cos 2x + ln | cos 2x| sin 2x.
8
4
8
4. Use Maple to solve problem 26 from section 4.6 and explain why, although it may look
different, it really is the same solution you found by hand.
SOLUTION. My version of MAPLE gave the following as a solution:
1
1
1
1
y(x) = − C2 cos(2x) + C1 sin(2x) + sin(2x) − x cos(2x)+
2
2
8
4
1 2ix
1 −2ix
1 2ix
+ ie ln(2) − ie
ln(2) − ie ln(e2ix + e−2ix )+
16
16
16
1
1
1
1
+ ie2ix − i arctan(e2ix ) + ie−2ix ln(e2ix + e−2ix ) − ie−2ix + C3 .
16
4
16
16
Hmmmmmmm. I’m not sure if every student’s version of MAPLE produced this expression,
but one would need to repeatedly apply Euler’s formula eix = cos x + i sin x and show that the
above mess reduces to the found solution.
5. Problem 22 from section 4.7. Solve x2 y 00 − 2xy 0 + 2y = x4 ex using variation of parameters.
The associated homogeneous equation is a Cauchy Euler equation with auxiliary equation
m(m − 1) − 2m + 2 = m2 − 3m + 2 which has as roots m = 2 and m = 1. Therefore the
complementary function is yc = c1 x + c2 x2 .
SOLUTION: Looking for a particular solution, to use the method of variation of parameters,
we must put the equation is standard form: y 00 − x2 y 0 + x22 y = x2 ex . And so f (x) = x2 ex . The
Wronskian W (x, x2 ) = x2 , W1 = −x4 ex and W2 = x3 ex . So
u01 = −x2 ex and u02 = xex . Integrated these we obtain
u1 = −x2 ex + 2xex − 2ex and u2 = xex − ex . Thus
y = c1 x2 + c2 x + x(−x2 ex + 2xex − 2ex ) + x2 (xex − ex )
Simplifying this expression gives
y = c1 x2 + c2 x + x2 ex − 2xex