i was doing some questions in my complex analysis booklet and have came across the following question that i don't seem to be able to get the answer for. Hoping someone on here can help!
So it's the integral is $$\int^\infty_{-\infty}\frac{\cos(x)}{x^2+4x+5} dx$$
Really would be a lot of help if someone could help me with this problem.
Thanks!
Hints:
Your integral is the real part of $$\int^\infty_{-\infty}f(z)dz$$ where $$f(z)=\frac{e^{iz}}{z^2+4z+5}$$
$f(z)$ vanishes on the upper half plane as $|z|\to\infty$.
Use a semicircle contour on the upper half plane centered at the origin.
Then apply residue theorem.
The only enclosed pole is at $-2+i$, and it is a simple pole.
$$\operatorname*{Res}_{z=-2+i}f(z)=\lim_{z\to-2+i}\frac{e^{iz}}{(z-(-2+i))(z-(-2-i))}\cdot(z-(-2+i))$$