# how to solve it by residue theorem

i have to solve the folowing integral by using contour integration & residue theorem $$\int_{-\infty}^{\infty}\frac{\sin x}{x^2+2x+2}\ dx$$ i factorised $x^2+2x+2=(x+1+i)(x+1-i)$ where $x=-1+i$ & $x=-1-i$ are single poles $$\int_{-\infty}^{\infty}\frac{\sin x}{(x+1+i)(x+1-i)}\ dx$$ i got stuck here, don't know which contour is to to be used? please help me solve it

$$I=\int \limits^{\infty }_{-\infty }\frac{\sin \left( x\right) }{x^{2}+2x+2} dx=\Im \left[ \int \limits^{\infty }_{-\infty }\frac{e^{iz}}{z^{2}+2z+2} dz\right] =\Im \left[ 2\pi i \sum Res\left( f\left( z\right) , z_{0}\right) \right]$$ you have one pole inside your contour $z=i-1$ so your Residue will be $$2\pi i\lim \limits_{z\to i-1}\left( z+1-i\right) \frac{e^{iz}}{\left( z+1-i\right) \left( z+i+1\right) } =\Im \left( 2\pi i \left( \frac{e^{i\left( i-1\right) }}{2i} \right) \right) =\Im\left( \frac{\pi \left( \cos \left( 1\right) -i \sin \left( 1\right) \right) }{e}\right)$$ So the integral equal to $$\int \limits^{\infty }_{-\infty }\frac{\sin \left( x\right) }{x^{2}+2x+2} dx=\boxed{\frac{-\pi \sin \left( 1\right) }{e}}$$
• please tell me how you knew the pole $i-1$ is inside contour? – Bhaskara-III Sep 11 '16 at 12:04
• in the function $R(z) e^{imz}$ . Let $\sum Res(f(z), z_{0})$ be the sum of the residues of $R(z)e^{imz}$ in the upper half plane. So that $z=-i-1$ not in your contour. – Refaat M. Sayed Sep 11 '16 at 12:14
• You can use the lower half plane. but in this case your function will be $$\Im \left[ \int \limits^{\infty }_{-\infty }\frac{e^{-iz}}{z^{2}+2z+2} dz\right]$$ and you will take the second pole $z=-1-i$ read this (math.stackexchange.com/questions/530204/…) – Refaat M. Sayed Sep 11 '16 at 13:34
There are different ways to proceed. I think the easiest is to note that the ${\rm Re }\; e^{ix} = \sin (x)$ so that you may write the integral as the imaginary part of another one for which the contour becomes more 'obvious'.
• Refaat has already spelled out parts of the calculation, but you should add the (closed) contour-integral which consists of a real segment $[-R,R]$ and a half-circle (of radius $R$) in the upper half-plane. Note that in the upper half-plan $e^{iz}$ tends to zero fast so you proceed to show that the half-circle contribution goes to zero as $R\rightarrow \infty$ – H. H. Rugh Sep 11 '16 at 12:04