# How to show $\int_0^\infty\frac1{(1+x^2)(1+x^p)}$ doesn't depend on $p$?

$$\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)

Substitute $$t=\frac{1}{x}$$: $$I=\int_{\infty}^0 \frac{-\frac{1}{t^2}}{\left(1+\frac{1}{t^2}\right)\left(1+\frac{1}{t^p}\right)} \; \mathrm{d}t=\int_0^{\infty} \frac{t^p}{\left(t^2+1\right)\left(t^p+1\right)} \; \mathrm{d}t$$ Now add the original integral and remember that $$x$$ and $$t$$ are dummy variables, so we can just call both of them $$x$$: \begin{align*} 2I&=\int_0^{\infty} \frac{x^p+1}{\left(x^2+1\right)\left(x^p+1\right)} \; \mathrm{d}x\\ &=\int_0^{\infty} \frac{\mathrm{d}x}{x^2+1}\\ I&=\frac{\pi}{4}\\ \end{align*}

• Beautiful answer. I've never seen this integral trick before; does it have a name? Jun 16 '20 at 12:46
• Thank you. I don't think this method has a name. I would say the unfamiliar part for most people is adding the two integrals together to cancel the factor on the denominator. This is somewhat rare but can be very useful nonetheless.
– Ty.
Jun 16 '20 at 12:49
• @K.defaoite After $y=1/(x^2+1)$, it's an application of the King property on $[0,\,1]$.
– J.G.
Sep 23 '20 at 14:36

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$$.

• I only add this solution because it illuminates the substitution $u=1/x$. I wouldn't have seen this substitution otherwise. Sep 22 '20 at 23:33