Fourier series of complex diff eq Can I just use Euler's identity to construct the Fourier Series since it is complex? I was personally thinking I could, but I wanted to be doubly sure.
 A: Those roots directly give you a homogeneous solution of $c_1 e^{(-1+i)t} + c_2 e^{(-1-i)t}$, where $c_1$ and $c_2$ are in general complex constants. Through judicious choice of $c_1,c_2$ using Euler's formula, this can be recast into the form $b_1 e^{-t} \cos(t) + b_2 e^{-t} \sin(t)$, so that $b_1,b_2$ can be chosen to be real (provided the initial condition is real). Which one is convenient depends on how you plan to deal with the inhomogeneity.
A: To find the particular solution, we expand $y(x)$ in its complex Fourier Series as
$$y(x)=\sum_{n=-\infty}^{\infty} c_n\,e^{inx}$$
Now, formally differentiating term by term reveals that
$$y''(x)+2y'(x)+2y(x)=\sum_{n=-\infty}^{\infty} c_n\,\left(-n^2+i2n+2\right)\,e^{inx}=|x|$$
Let's find the complex Fourier Series for $|x|$.  Write,
$$|x|=\sum_{n=-\infty}^{\infty} d_n\,e^{inx}$$
with 
$$\begin{align}
d_n&=\frac{1}{2\pi}\int_{-\pi}^{\pi}|x|e^{-inx}dx\\\\
&=\frac{1}{\pi}\int_{0}^{\pi}x\cos(nx)dx\\\\
&=-\frac{1-(-1)^n}{\pi n^2}+(\pi/2) \delta_{n0}
\end{align}$$
where $\delta_{n0}$ is the Kronecker Delta and is equal to $1$ when $n=0$ and equal to $0$ otherwise.
Thus, $$c_n=-\left(\frac{1-(-1)^n}{\pi n^2}\right)\,\left(\frac{1}{-n^2+2in+2}\right)+(\pi/4) \delta_{n0}$$.
Note that the complex Fourier Series for $y(x)$ can be converted to a Fourier Series by use of Euler's identity.  Further note that the resulting series will have both cosine and sine series, and that only the odd indexed terms (other than $c_0$) are present.
