Roman C. answered 03/12/16
Tutor
5.0
(864)
Masters of Education Graduate with Mathematics Expertise
I would start with y = a(x) ex sin x + b(x) ex cos x, just based on the form of the right hand side.
y' = [a(x) + a'(x) - b(x)] ex sin x + [a(x) + b(x) + b'(x)] ex cos x
y'' = [2a'(x) + a''(x) - 2b(x) - 2b'(x)] ex sin x + [2a(x) + 2a'(x) + 2b'(x) + b''(x)] ex cos x
y'' - 2y' + 2y = [a''(x) - 2b'(x)] ex sin x + [2a'(x) + b''(x)] ex cos x
Thus we will be looking for functions a(x) and b(x) such that
(1): a''(x) - 2b'(x) = 2 - 10x + 6x2
(2): 2a'(x) + b''(x) = 2 - 2x - 6x2
Differentiating (2) and then isolating a''(x) gives
a''(x) = -b'''(x)/2 - 1 - 6x
Plugging this into (1) and simplifying gives
b'''(x) + 4b'(x) = -6 + 8x - 12x2
We can easily get a particular solution for b(x) (ignoring integration constants):
b''(x) + 4 b(x) = -6x + 4x2 - 4x3
b(x) = -1/2 + x2 - x3
plug this into (2) and solve for a(x)
b''(x) = 2 - 6x
2a'(x) + 2 - 6x = 2 - 2x - 6x2
a'(x) = 2x - 3x2
a(x) = x2 - x3
Thus a particular solution is
y = ex [(x2 - x3) sin x + (-1/2 + x2 - x3) cos x]
Note: The homogeneous equation yh'' - 2yh' + 2yh = 0 has solution
yh = ex (A sin x + B cos x).
Thus the coefficient -1/2 above can be absorbed into the coefficient B of the homogeneous component.
Therefore the best solution for the particular part is actually
yp = ex (x2 - x3) (sin x + cos x)
To make sure that this is correct, I verified this solution with Mathematica.