Answer
$y=e^{-x}(\sin x-\cos x)+ce^{-2x}$
Work Step by Step
The standard form of the given equation is:
$y'+2y=2e^{-x} \sin x$ ....(1)
The integrating factor is: $e^{\int 2 dx}=e^{2x}$
In order to determine the general solution, multiply equation (1) with the integrating factor and integrate both sides.
$\int [e^{2x}y]' =\int 2e^{x}\sin x dx$ ...(2)
Thus, equation (2) becomes:
$y=e^{-x}(\sin x-\cos x)+ce^{-2x}$