# Choosing a contour for residue integral

How can I evaluate $$\int_0^{\infty}\frac{x\sin(bx)}{x^2+1}dx \quad(b>0)$$ using residue calculus? I tried computing the residue of $$\int_0^{\infty}\frac{z\exp(ibz)}{z^2+1}dz$$ at $$z=i$$ and taking the imaginary part of it, but what contour should I use so that only the integral over the real axis is left?

• What is $b$? If it is a positive real number then take half a circle. The complex function is $\frac{ze^{ibz}}{z^2+1}$. To bound it on the circle path you will probably need Jordan's lemma. – Mark Jun 13 at 19:36
• @Mark How can it be a semicircle if the limit is from 0 to infinity? Won't it be a quarter of a circle? – ranger281 Jun 13 at 19:43
• Yes, but the real function you integrate is even, so you can just find the integral from $-\infty$ to $\infty$ and then divide by $2$ to get the integral from $0$ to $\infty$. – Mark Jun 13 at 19:44
• Why is it even if there's x in the numerator? – ranger281 Jun 13 at 19:48
• Did you forget the $\color{blue}{\sin}$? – metamorphy Jun 13 at 19:59