Solution (source code)

= Solution

Complete the square: $x^2+2x+2=(x+1)^2+1$. In the <Fourier transform>, the substitution $u=x+1$ gives
$$
\boxed{\mathcal F\!\left(\frac1{x^2+2x+2}\right)(s)=\pi e^{-|s|}e^{is}.}
$$
The phase $e^{is}$ is important. Taking the real part at $s=a$ gives the cosine integral, since changing the sign in the exponential does not change its real part:
$$
\boxed{\int_{-\infty}^{\infty}\frac{\cos(ax)}{x^2+2x+2}\,dx=\pi e^{-|a|}\cos a\qquad(a\in\mathbb R).}
$$