Evaluate this contour integral: $ I = \int_{-\infty}^{\infty}{ \frac{a \cos(x) + x \sin(x)}{ x^2 + a^ 2} } dx $

complex integrationcontour-integration

Need to evaluate this using contour integration:

$$ I = \int_{-\infty}^{\infty}{ \frac{a \cos(x) + x \sin(x)}{ x^2 + a^ 2} } dx $$

I usually proceed by considering a semicircular region of radius R, and evaluate this as the difference between integral on closed semicircle (I1) and the integral on the semicircular arc (I2). Finally I take limit as R tends to infinity.

However here i am stuck calculating I2. Any leads will be appreciated.

Edit: I computed I1 using Cauchy formula. I need help with I2 only.

Edit 2: I was making a mistake in taking bound too, I2 vanishes.
$$ | I2 | < |e^{ix}| \frac{a + R} {R^2 – a^2} \times {\pi R} < e^{-R} \frac{a + R} {R^2 – a^2} \times {\pi R}. $$

The above vanishes as $ R \to \infty $.

Best Answer

For $a>0$ take the real part of $$\lim_{R \to \infty} \int_{\partial ([-R,R] + i [0,R])} \frac{a e^{ix} - ix e^{ix}}{ x^2 + a^ 2} dx = 2i \pi Res(\frac{a e^{ix} - ix e^{ix}}{ x^2 + a^ 2} ,ia)$$

The obtained expression will stay true for $\Re(a) > 0$ by analytic continuation.