TITLE: Integral $\int_0^\infty \frac{1}{(1+x^m)(1+x^2)}\,dx$
QUESTION [6 upvotes]: I saw somewhere that the above integral is equal to $\pi/4$ for all real number $m$.
This seems to be surprising. Does anyone have a nice proof?

REPLY [10 votes]: Let
$$\begin{align}
I(m) &= \int_0^\infty \frac{dx}{(1+x^m)(1+x^2)}\tag{$x = t^{-1}$}\\
&= \int_0^\infty \frac{t^{-2}\,dt}{(1+t^{-m})(1+t^{-2})}\\
&= \int_0^\infty \frac{dt}{(1+t^{-m})(1+t^2)}\\
&= I(-m).
\end{align}$$
But
$$\begin{align}
I(m) + I(-m) &= \int_0^\infty \left(\frac{1}{1+x^m} + \frac{1}{1+x^{-m}}\right)\frac{dx}{1+x^2}\\
&= \int_0^\infty \left(\frac{1}{1+x^m} + \frac{x^m}{1+x^{m}}\right)\frac{dx}{1+x^2}\\
&= \int_0^\infty \frac{dx}{1+x^2}\\
&= \frac{\pi}{2}.
\end{align}$$