"Milk" the integral $\int_0^\infty\left(\frac{x^2}{x^4+2ax^2+1}\right)^r\frac{x^2+1}{x^2(x^s+1)}\mathrm dx$

First I will like to give some steps and maybe some more insight of this integral.$$I=\int_0^1\left(\frac{x^2}{x^4+2ax^2+1}\right)^r\frac{x^2+1}{x^2(x^s+1)}\mathrm dx+\int_1^\infty\left(\frac{x^2}{x^4+2ax^2+1}\right)^r\frac{x^2+1}{x^2(x^s+1)}\mathrm dx$$ With $x\rightarrow \frac{1}{x}$ in the second one we get: $$\int_1^\infty\left(\frac{x^2}{x^4+2ax^2+1}\right)^r\frac{x^2+1}{x^2(x^s+1)}\mathrm dx=\int_0^1 \left(\frac{x^2}{x^4+2ax^2+1}\right)^r\frac{x^2+1}{x^2\left(\frac{1}{x^s}+1\right)}\mathrm dx$$ Now if we add with first part of the integral that was splited using: $\displaystyle{\frac{1}{x^s+1}+\frac{1}{\frac{1}{x^s}+1}=1}\,$ this being the reason why the $s$ doesn't affect our integral. $$I=\int_0^1\left(\frac{x^2}{x^4+2ax^2+1}\right)^r\frac{x^2+1}{x^2}dx$$ Again via $x\rightarrow \frac{1}{x}$ we get: $$I=\int_1^\infty\left(\frac{x^2}{x^4+2ax^2+1}\right)^r\frac{x^2+1}{x^2}dx$$ $$\Rightarrow I=\frac12\int_0^\infty \left(\frac{x^2}{x^4+2ax^2+1}\right)^r\frac{x^2+1}{x^2}dx=\frac14 \int_{-\infty}^\infty \left(\frac{1}{x^2+\frac{1}{x^2}+2a}\right)^r\left(1+\frac{1}{x^2}\right)dx$$ And now by writting $\displaystyle{x^2+\frac{1}{x^2}=\left(x-\frac{1}{x}\right)^2+2}$ and do a $x-\frac{1}{x}=t$ we get: $$I=\frac12 \int_{-\infty}^\infty \frac{1}{(t^2+2(a+1))^r}dx$$ By letting $t=x\sqrt{2(a+1)}$ we get rather easy using beta function the result.


But the substitution $x-\frac{1}{x}$ reminds us of Glasser's Master theorem. Of course in order to milk it we can take the original integral and apply this theorem how many times we want. $$I=\frac12 \int_{-\infty}^\infty\left(\frac{x^2}{x^4+2ax^2+1}\right)^r\frac{x^2+1}{x^2(x^s+1)}\mathrm dx= \frac12 \int_{-\infty}^\infty \left(\frac{x^6-2x^4+x^2}{x^8+2ax^6-4x^6-4ax^4+7x^4+2ax^2-4x^2+1}\right)^r \frac{x^4-x^2+1}{(x^2-1)^2}dx$$ Where I have used $x\rightarrow x-\frac{1}{x}$ and $s=0$. Of course we can be mean and in the simplest form use $\int_{-\infty}^\infty f(x)dx=\int_{-\infty}^\infty f(x-\cot x)dx$ to get :$$I=\frac12 \int_{-\infty}^\infty \frac{1}{(x^2+2(a+1))^r}dx=\frac12 \int_{-\infty}^\infty \frac{1}{((x-\cot x)^2+2(a+1))^r}dx$$ And by setting $a+1=\frac12$ and $r=2$ to get: $$\int_0^\infty \frac{1}{((x-\cot x)^2 +1)^2}dx=\sqrt 2 \pi$$ One can do the same thing when there is $x^4$ in the denominator, but that's quite evilish.


Or another thing would be to let $x^2=t$ in order to get some Mellin transforms, for example: $$I=\frac12\int_0^\infty x^{r-1} \frac{1}{(x^2+2ax+1)^r}\left(\sqrt x+\frac{1}{\sqrt x}\right)dx$$

Also those two theorems might also do some milk with this integral: Laplace transform property and Plancherel theorem.