# Finding a contour to evaluate$\int_{-\infty}^{\infty}\frac{x\sin x}{x^2+a^2}\,dx$

I am looking to evaluate to evaluate the real integral $I=\int_{-\infty}^{\infty}\frac{x\sin x}{x^2+a^2}\,dx$ ($a>0$) using Cauchy's residue formula. My strategy is to use the residue theorem to calculate the value of a contour that encircles the a pole and has a side coincides with the real axis. My hope was that the other sides of the contour would be simple to evaluate, but I am struggling to find an appropriate contour.

Finding a Pole

Defining $f(z)=\frac{z\sin z}{z^2+a^2}$, we quickly see that $1/f$ vanishes at $z_{0}=ai$. Moreover one can check that $g(z)=\begin{cases} \frac{1}{f(z)} \text{ if } z\neq z_{0},\\ 0 \text{ if } z= z_{0}.\end{cases}$ is holomorphic, so $ai$ is indeed a pole of $f$.

Calculating the Residue

Writing $\frac{z\sin z}{z^2+a^2}=\frac{z\sin z}{(z+ai)(z-ai)}$ we see that $\text{res}_{z_{0}}f=$$\lim_{z\to ai}\frac{z\sin z}{(z+ai)}=\frac{\sin ai}{2}. Finding a "nice" Contour By the residue theorem we know that \int_{\gamma}f(z)\,dz=\pi i\sin ai where \gamma is a closed contour that contains our pole (note \gamma doesn't contain other poles). I was hoping to use the semi-circle of radius R with its base along the real line so that I=\pi i\sin ai -\lim_{R\to\infty}\int_{\gamma_{1}}f(z)\,dz where \gamma_{1} is the contour along the arc of the semi-circle. I'm finding it hard to evaluate \int_{\gamma_{1}}f(z)\,dz, is there a better choice of contour? • Poles are at z_{1/2}=\pm ai. Oct 1 '15 at 11:23 • Am aware, but I only need a single pole for my approach. Oct 1 '15 at 11:27 ## 1 Answer Hint Consider$$f(z)=\frac{ze^{iz}}{1+z^2}$$and integrate on$$\{[-r,r]\mid r>a\}\cup\{re^{i\theta}\mid \theta\in[0,\pi]\}.$$• Don't you need to take the imaginary part of your integral to get the OP integral? Oct 1 '15 at 11:26 • Yes, of course. – Surb Oct 1 '15 at 11:27 • So using Cauchy integral formula I got$\frac{\pi i}{e}$for the integral over the base, struggling with the arc though. Oct 1 '15 at 11:54 • Using the residue formula I have$\frac{1-2\pi i}{2e}$for the integral over the arc Oct 1 '15 at 12:02 • I don't know, I didn't do the computation. If it's this, then take the limit when$r\to\infty \$ and conclude.
– Surb
Oct 1 '15 at 12:05