# Complex analysis: Compute $\int_{-\infty}^\infty \frac{\cos(x)}{1+x^4} dx$.

This is a problem that I was trying to solve in preparation for an entrance exam. The first part of the problem was to solve $$\int_{-\infty}^\infty \frac{1}{1+x^4} dx$$ which is a fairly straight-forward application of complex analysis using a half-circle toy contour. I am not sure however, how I should proceed with this integral. One approach I thought to use was an "expanding rectangle" persae but that didn't seem to work. Any help is appreciated.

• you can find the indefinite integral by doing $x^4+1 = x^4+2x^2+1-2x^2 = (x^2+1)^2-(\sqrt{2}x)^2 = (x^2-\sqrt{2}x+1)(x^2+\sqrt{2}x+1)$ and then using partial fraction decomposition – mathworker21 Jul 25 at 2:10
• but if you wanna use complex analysis, idk, just make a big semicircle along $x$-axis centered at origin with radius tending to $\infty$. – mathworker21 Jul 25 at 2:11

Hint: Consider the integral $$\int_{-\infty}^\infty \frac{e^{ix}}{1+x^4}\,dx.$$ Integrate the corresponding complex function over a closed curve consisting of a line segment $$(-R,R)$$ and the semicircle from $$R$$ to $$-R$$ in the op upper half plane. Since $$|e^{iz}|=e^{-y}$$ is bounded in the upper half plane, we can conclude that the integral over the semicircle tends to zero. We obtain $$\int_{-\infty}^\infty \frac{e^{ix}}{1+x^4}\,dx=2\pi i \sum_{y>0} \text{Res } \frac{e^{iz}}{1+z^4}$$ Finally, taking the real part gives the answer.