I'm having difficulty in using contour Integration to evaluate the integral:

$\displaystyle \int_{0}^\infty \frac{cos(x)}{x^2 + a^2} dx $ where a>0.

Firstly I found that the function being integrated is an even function so this is equivalent to finding:

$\displaystyle \frac{1}{2} \int_{-\infty}^\infty \frac{cos(x)}{x^2 + a^2} dx$

Also $\displaystyle cos(x) = Re( exp(ix)) $ where Re dentoes the Real part of exp(ix) function. The integral in question is now:

$\displaystyle \frac{1}{2}Re\int_{-\infty}^\infty \frac{exp(ix)}{x^2 + a^2} dx$

so the complex function in question is:

$\displaystyle f(z)=\frac{exp(iz)}{z^2 + a^2}$ which is holomorphic everywhere in the complex plane except for the points ai, and -ai. That is what I've found so far.

What contour do I have to use? Also how would you integrate it because I'm seeing there will be much difficulty integrating $\displaystyle \frac{exp(iz)}{z^2 + a^2}$ with the z being replaced by the suitable parameterization.

Thanks