How do you solve this $\int\limits ^{\infty }_{0}\frac{\cos( x)}{x^{n} +1} dx,\ n >0$ Me and my friend have tried a wedge,a triangle, and we even tried Feynman's technique. None of these things got us an answer to the integral $\int\limits ^{\infty }_{0}\frac{\cos( x)}{x^{n} +1} dx,\ n >0$
Can someone show the process of solving this?
 A: The first note is that if $n$ is an odd number then there is no simple expression for this integral. So lets suppose n to be an even number.
That is $n=2m ;m=1,2,3,...$
Let's look at a more general integral
$$I(2m)=\int_0^{\infty}\frac{\cos(ax)}{x^{2m}+b^{2m}}dx$$
where $a,b$ are positive, real numbers.
This integral is equivalent to the following integral:
$$I(2m)=\frac{1}{2}\int_{-\infty}^{\infty}\frac{e^{iax}}{x^{2m}+b^{2m}}dx$$
(taking into account $e^{ix}=\cos x+i\sin x$)
The simplest way to compute this integral is to use the contour integration method.
Lets take the simplest contour,$C$, that means a semicircle, in the upper half plane, with radius $R\rightarrow \infty$ and consider along the contour the following complex integral
$$I(2m)=\frac{1}{2}\int_C\frac{e^{iaz}}{z^{2m}+b^{2m}}dz$$
Along the real axis we get the desired integral but along the circular half-arc the integral vanishes.
So we can apply Cauchy's Theorem of Residues
Isolated singularities of the integrand $$f(z)=\frac{e^{iaz}}{z^{2m}+b^{2m}}$$ we find by solving the equation
$$z^{2m}+b^{2m}=0$$
Solutions:
$$z_k=be^{i\frac{2k+1}{2m}\pi};k=0,1,2,...,2m-1$$
Only the first $m$ of them ($z_0,z_1,...z_{m-1}$) are located inside the countour.
The end result:
$$\int_0^{\infty}\frac{\cos(ax)}{x^{2m}+b^{2m}}dx=\frac{i\pi}{2m}\sum_{k=0}^{m-1}\frac{e^{iaz_k}}{z_k^{2m-1}}$$
So computing this integral boils down to the complex algebra.
An example:
$$\int_0^{\infty}\frac{\cos(x)}{x^6+1}dx=\frac{\pi}{6e}\left [1+\sqrt e (\cos\frac{\sqrt 3}{2} +\sqrt 3\sin\frac{\sqrt 3}{2}) \right ]$$
