Answer
See below
Work Step by Step
$y''+2y'+2y=2e^{-x}\sin x$
The complementary function is
$y_c(x)=c_1 e^{-x}\sin x+c_2 e^{-x}\cos x$
We consider the complex differential equation
$z''+2z'+2z=2e^{(-1+i)x}$
An appropriate complex-valued trial solution for this differential equation is:
$z_p(x)=A_0e^{(-1+i)x}$
where $A_0$ is a complex constant.
so that $z _p$ is a solution if and only if
$2iA_0e^{(-1+i)x}=2e^{(-1+i)x}\\
\rightarrow A_0=-\frac{i}{2}$
Hence, $z=-\frac{i}{2}xe^{(-1+i)x}$
A particular solution is:
$y_p(x)=Re_{\{z_p\}}=-e^{-x}x\cos x$
so that the general solution is
$y(x)=c_1e^{-x}\sin x+c_2e^{-x}\cos x x-e^{-x}x\cos x$