<s>[INST] How to evaluate $\int_0^\infty \frac{\cos(ax)}{1+x^N}dx$ for $a,N\in\mathbb{R}$ and $N> 1$ Interesting challenge: Does anyone know how to evaluate the integral $$\int_0^\infty\frac{\cos(ax)}{1+x^N}\text{d}x$$ for $a,N\in\mathbb{R}$ and $N>1$?
The $N=2$ case is quite easily done using the Residue Theorem as well as for general $N>1$ for $a=0$. Both exploit symmetries when path integrating, which do not work in the general case.
Let me know if you have any ideas! Cheers!
 [/INST] For even $N$ you can use the residue theorem as well. It suffices to consider $a>0$ and calculate the integral
$$\oint_{-\infty}^{\infty} \frac{e^{iax}}{1+x^N} \, {\rm d}x = \int_{0}^{\infty} \frac{2\cos(ax)}{1+x^N} \, {\rm d}x = 2\pi i \sum_{0 \leq k \leq \frac{N-1}{2}} {\rm Res}\left( \frac{e^{iax}}{1+x^N} \right)\Bigg|_{x=e^{\frac{i\pi+i2\pi k}{N}}} \\
=\frac{-2\pi i}{N} \sum_{k=0}^{N/2-1} e^{ia e^{\frac{i\pi+i2\pi k}{N}} + \frac{i\pi+i2\pi k}{N}} = \frac{-2\pi i}{N} \sum_{k=0}^{N/2-1} e^{ia \cos\left(\frac{\pi+2\pi k}{N}\right) + \frac{i\pi+i2\pi k}{N}}e^{-a\sin\left( \frac{\pi+2\pi k}{N} \right)} \\
=\frac{-2\pi i}{N} \sum_{k=0}^{N/2-1} \Bigg[\cos\left(a \cos\left(\frac{\pi+2\pi k}{N}\right) + \frac{\pi+2\pi k}{N}\right) \\ + i \sin\left(a \cos\left(\frac{\pi+2\pi k}{N}\right) + \frac{\pi+2\pi k}{N}\right)\Bigg]e^{-a\sin\left( \frac{\pi+2\pi k}{N} \right)} \\
=\frac{2\pi}{N} \sum_{k=0}^{N/2-1} \sin\left(a \cos\left(\frac{\pi+2\pi k}{N}\right) + \frac{\pi+2\pi k}{N}\right)e^{-a\sin\left( \frac{\pi+2\pi k}{N} \right)}$$
where the loop-integral on the LHS is closed in the upper half plane. The imaginary part is zero, since the LHS is real.
</s>