Start by solving the homogeneous equation:
#y'''+3y''+4y'+2y=0#
As this is a differential equation with constant coefficients, we solve the corresponding characteristic equation:
#lambda^3 +3lambda^2+4lambda+2=0#
#lambda^3 +3lambda^2+3lambda+1 +lambda +1=0#
#(lambda+1)^3 +lambda +1 = 0#
#(lambda +1)((lambda +1)^2 +1) = 0#
So the solutions are:
#lambda = -1#
#lambda = -1+-i#
And the corresponding general solution of the homogeneous equation is:
#y(t) = e^(-t) (a +bsint+c cost)#
Using now the method of similar solution note that the known term is in the form:
#f(t) = P(t) e^(alphat) sin(betat)#
where #P(t) = 1# is a polynomial of degree zero and#
#bar lambda = alpha + i beta = 2i#
is not a solution of the characteristic equation. Therefore we look for a solution in the form:
#phi(t) = p cos2t+q sin2t#
by direct substitution:
#phi'(t) = -2p sin 2t +2q cos2t#
#phi''(t) = -4pcos 2t -4q sin 2t#
#phi'''(t) = 8p sin 2t - 8q cos 2t#
#phi'''+3phi''+4phi'+2phi= 8p sin 2t - 8q cos 2t -12pcos 2t -12q sin 2t -8p sin 2t +8q cos2t +2p cos2t+2q sin2t#
#phi'''+3phi''+4phi'+2phi= -10pcos 2t -10q sin 2t #
then:
#p=0#
#q = -1/10#
and the general solution is:
#y(t) = e^(-t) (a +bsint+c cost)-1/10 sin2t#