Trigonometric Integrals using residue

I need to calculate, for $a \geq 1$,$$\int_{-\infty}^\infty \frac{e^{iax}sin(x)}{x^2+1}dx$$

Attempt at Solution: $$Let \ \ f(z)=\frac{e^{iaz}e^{iz}}{z^2+1}=\frac{e^{iz(a+1)}}{z^2+1}$$ This has poles at $z=\pm i$.

I'm going to use Jordan's Lemma, so we only need to consider z=i. Calculating the residue: $$res(\frac{e^{iz(a+1)}}{(z+i)(z-i)},i)=\frac{e^{-(a+1)}}{2i}$$ Thus: $$\int_{-\infty}^\infty \frac{e^{iaz}e^{iz}}{z^2+1}dz = 2 \pi i \cdot \frac{e^{-(a+1)}}{2i}=\pi e^{a+1}$$

But taking the imaginary part: $$\int_{-\infty}^\infty \frac{e^{iax}sin(x)}{x^2+1}dx=Im(\int_{-\infty}^\infty \frac{e^{iaz}e^{iz}}{z^2+1}dz)=0$$

I don't think this is right? Where's the mistake? Thanks in advance.

• the imaginary part of $e^{iaz }e^{iz}$ is $\sin(a(z-1))$ NOT $e^{iaz }\sin(z)$ – tired May 17 '15 at 12:34
• Hint: Make the same calculations for $g(z)=\frac{e^{iaz} e^{-iz}}{1+z^2}$ and then calculate $g(x)+f(x)$ – tired May 17 '15 at 12:37
• Does $g(z)+f(z)$ not give me $\frac{2e^{iaz}cos(z)}{1+z^2}$? – Maths student May 17 '15 at 12:53
• yeah sorry there should be a minus sign obviously, furthermore you have to divide by $2i$ to be absolutely correct. – tired May 17 '15 at 12:54
• Jack's answer is correct, and can also be verified by a CAS. Please note that your integrand have imaginary components, so it would be a big surprise if they cancel out to zero in any case. i think your lecturer was just a little bit sloppy with his notation – tired May 17 '15 at 13:29

It is true that $\sin z=\text{Im}\left(e^{iz}\right)$, but $e^{ia z}\sin z \neq \text{Im}\left(e^{iaz}\cdot e^{iz}\right)$. Anyway, if you know that: $$\forall \alpha>0,\qquad \int_{-\infty}^{+\infty}\frac{e^{i\alpha z}}{1+z^2}\,dz = \frac{\pi}{e^{\alpha}},\tag{1}$$ it follows that: $$\forall a>1,\qquad\int_{-\infty}^{+\infty}\frac{e^{iax}\sin x}{1+x^2}\,dx = \frac{1}{2i}\left(\frac{\pi}{e^{a+1}}-\frac{\pi}{e^{a-1}}\right).\tag{2}$$