TITLE: How to show $\int_0^\infty\frac1{(1+x^2)(1+x^p)}$ doesn't depend on $p$?
QUESTION [12 upvotes]: $$\int_0^\infty\frac1{(1+x^2)(1+x^p)} \; \mathrm{d}x$$
This integral should have the same value for all $p$.
I showed that it converges for all $p.$  I confirmed the result for $p=0,1,2$:
$$\int_0^\infty\frac1{(1+x^2)(1+x^p)} \; \mathrm{d}x=\frac \pi4$$
Any ideas on how to solve this in general? Integration by parts or substitution doesn't seem to work.
(I suppose $p$ is a real, but it isn't mentioned in the problem)

REPLY [3 votes]: You could also define $S(p):=\int_0^\infty\frac{dx}{(x^2+1)(x^p+1)}$. Then $$S'(p)=\int_0^\infty\frac{\partial}{\partial p}\Bigg[\frac{1}{(x^2+1)(x^p+1)}\Bigg]dx=\int_0^\infty\frac{x^p\ln(1/x)dx}{(x^2+1)(x^p+1)^2}$$ The subtitution $u=1/x$ yields $$S'(p)=\int_0^\infty\frac{u^p\ln(u)du}{(u^2+1)(u^p+1)^2}=-S'(p)$$ Hence $S'(p)=0$ implying $S(p)\equiv \text{constant}$. Since $S(0)=\pi/4$ we have $S(p)=\pi/4$ for all $p$.