I know that this might be awfully late, but I just started learning about complexification this term and thought I would put up my solution--please excuse any incorrect language I might use as it's the idea I am trying to get across.
First we start off by defining a complex analogue to your function:
eq {1}:
$$
z''+2z'+2z=2e^xe^{ix}
$$
where $$z=RE(y)+i*IM(y)$$
Basically, we can recover the original diffEq by extracting the real part of our complex diffEq. The next step is to use the method of undetermined coefficients to find a guess for what our particular complex solution might be. Guess:
eq {2}:
$$ z=Ae^{x}e^{ix} $$ so that:
$$ z'=Ae^{x}e^{ix}+iAe^{x}e^{ix} $$ and $$ z''=i2Ae^{x}e^{ix} $$
Plugging this into {1}:
$$ i2Ae^{x}e^{ix} + 2(Ae^{x}e^{ix}+iAe^{x}e^{ix}) + 2(Ae^{x}e^{ix})= 2e^xe^{ix} $$
We can simplify by removing the common factor of $ e^{x}e^{ix} $:
$$ A(4+4i)=2 => A= \frac{1}{2 + 2i}$$
Convert A to complex polar form:
$$ A=\frac{\sqrt[]{2}}{4}e^{-i\frac{\pi}{4}} $$
Plugging this into {2}:
$$ z=\frac{\sqrt[]{2}}{4}e^{-i\frac{\pi}{4}}e^{x}e^{ix} $$
This can be simplified to eq {3}:
$$ z=\frac{\sqrt[]{2}}{4}e^{x}e^{i(x-\frac{\pi}{4})} $$
Since our particular solution should be of the form $cos(x)$, we take the real part of {3} and call that our particular x-solution:
$$ x = RE(z) = \frac{\sqrt[]{2}}{4}e^{x}cos(x-\frac{\pi}{4}) $$
Finally using our difference of cosine identity:
$$
\frac{\sqrt[]{2}}{4}e^{x}(cos(x)\frac{\sqrt[]{2}}{2} + sin(x)\frac{\sqrt[]{2}}{2})
$$
$$
\frac{\sqrt[]{2}}{4}\frac{\sqrt[]{2}}{2}e^{x}(cos(x) + sin(x))
$$
$$
\frac{2}{8}e^{x}(cos(x) + sin(x))
$$
$$
\frac{1}{4}e^{x}(cos(x) + sin(x))
$$
$QED$