Victoria V. answered 03/17/18
Tutor
5.0
(402)
20+ years teaching Algebra 2 subjects & beyond.
Since the RHS is sine and cosine functions, I am going to guess that the actual solution will be of the form
y = Asinx + Bcosx + Csin(2x) + Dcos(2x).
I will take the first and second derivatives and plug them into the left side of the equation, and see if I can determine the coefficients A, B, C, and D that will give me the RHS of the equation.
y' = Acosx-Bsinx+2Ccos(2x)-2Dsin(2x)
y'' = -Asinx-Bcosx-4Csin(2x)-4Dcos(2x)
Plug all of this into the LHS and get
(A+2B)sinx + (B-2A)cosx + (4D-2C)sin(2x) + (-2D-4C)cos(2x)
Since the RHS has only a sinx term and a cos(2x) term, each with a coefficient of 1, we must make the coefficient of our sinx = 1, the coefficient of our cosx = 0, the coefficient of our sin(2x)=0, and the coefficient of our cos(2x) = 1
So you must solve:
A+2B=1
B-2A=0
4D-2C=0
-2D-4C=1
These will give the the coefficients you need to write the general solution for the diff eq.
(I got A = 1/5; B=2/5; C=-(1/5); D=-(1/10) - I checked it and these worked, but you should do the work and arrive at these coefficients yourself... :-) )