Background
As I had found the integral
$$I=\int_0^{\infty} \frac{1}{\left(x+\frac{1}{x}\right)^2} d x =\frac{\pi}{4}, $$
by using $x\mapsto \frac{1}{x}$ yields
$\displaystyle I=\int_0^{\infty} \frac{\frac{1}{x^2}}{\left(\frac{1}{x}+x\right)^2} d x\tag*{} $
Averaging them gives the exact value of the integral
$\displaystyle \begin{aligned}I & =\frac{1}{2} \int_0^{\infty} \frac{1+\frac{1}{x^2}}{\left(x+\frac{1}{x}\right)^2} d x \\& =\frac{1}{2} \int_0^{\infty} \frac{d\left(x-\frac{1}{x}\right)}{\left(x-\frac{1}{x}\right)^2+4} d x \\& =\frac{1}{4}\left[\tan ^{-1}\left(\frac{x-\frac{1}{x}}{2}\right)\right]_0^{\infty} \\& =\frac{1}{4}\left[\frac{\pi}{2}-\left(-\frac{\pi}{2}\right)\right] \\& =\frac{\pi}{4}\end{aligned}\tag*{} $
I guess that we can similarly evaluate the general integral
$$
I_n=\int_0^{\infty} \frac{d x}{\left(x+\frac{1}{x}\right)^{2 n}}
$$
by mapping $x\mapsto \frac{1}{x}$ and then averaging.
$$
I_n=\frac{1}{2} \int_0^{\infty} \frac{1+\frac{1}{x^2}}{\left(x+\frac{1}{x}\right)^{2 n}} d x=\frac{1}{2} \int_0^{\infty} \frac{d\left(x-\frac{1}{x}\right)}{\left[\left(x-\frac{1}{x}\right)^2+4\right]^n}
$$
Letting $x-\frac{1}{x}=\tan \theta$ yields
$$
\begin{aligned}
I_n & =\frac{1}{2} \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \frac{2 \sec ^2 \theta d \theta}{4^n \sec ^{2 n} \theta} =\frac{1}{4^n} \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \cos ^{2 n-2} \theta d \theta= \boxed{\frac{\pi(2 n-3) ! !}{4^n(2 n-2) ! !}}
\end{aligned}
$$
where the last answer comes from the Wallis cosine formula.
My question: How many methods are there to evaluate $\int_0^{\infty} \frac{1}{\left(x+\frac{1}{x}\right)^{2n}}$?
Best Answer
In terms of the Gaussian hypergeometric function $$\int \frac{dx}{\left(x+\frac{1}{x}\right)^{2n}}=\frac{x^{1-2 n}}{2 n+1}\, _2F_1\left(2 n,\frac{2n+1}{2};\frac{2n+3}{2};-x^2\right)$$ which can also write $$\int \frac{dx}{\left(x+\frac{1}{x}\right)^{2n}}=(-1)^{n+1}\frac{i}{2} B_{-x^2}\left(n+\frac{1}{2},1-2 n\right)$$ $$\int_0^{\infty} \frac{dx}{\left(x+\frac{1}{x}\right)^{2n}}=\sqrt{\pi }\,\,\frac{ \Gamma \left(n-\frac{1}{2}\right)}{ 4^{n}\,\Gamma (n)}$$