How can I complexify the right hand side of this differential equation? I want to get a particular solution to the differential equation
$$
y''+2y'+2y=2e^x cos(x)
$$
and therefore I would like to 'complexify' the right hand side. This means that I want to write the right hand side as $q(x)e^{\alpha x}$ with $q(x)$ a polynomial. How is this possible?
The solution should be $(1/4)e^x(\sin(x)+\cos(x))$ but I cannot see that.

As $\cos x=\frac{e^{ix}+e^{-ix}}{2}$, $2e^x \cos x = e^{x+ix}+e^{x-ix}$, but that is not of the requested form.  Is it close enough?
