For which values of $p \geq 0$ does the integral $\int_0^{\infty} \frac{dx}{x^{p}+x^{-p}}$ converge? For which values of $p \geq 0$ does the integral $$\int_0^{\infty} \frac{dx}{x^{p}+x^{-p}}$$ converge?
I tried applying the p-test, but I could not get the integrand into a suitable form.  So what type of argument should I use?
 A: For $x\gt0$, $x+\frac1x\ge2$; therefore, $\dfrac1{x^p+x^{-p}}\le\frac12$ and
$$
\int_0^1\frac{\mathrm{d}x}{x^p+x^{-p}}\le\frac12
$$
When $x\gt1$, $\dfrac1{2x^p}\le\dfrac1{x^p+x^{-p}}\le\dfrac1{x^p}$; therefore,
$$
\frac12\int_1^\infty\frac{\mathrm{d}x}{x^p}\le\int_1^\infty\frac{\mathrm{d}x}{x^p+x^{-p}}\le\int_1^\infty\frac{\mathrm{d}x}{x^p}
$$
Putting these together, we get
$$
\frac12\int_1^\infty\frac{\mathrm{d}x}{x^p}\le\int_0^\infty\frac{\mathrm{d}x}{x^p+x^{-p}}\le\frac12+\int_1^\infty\frac{\mathrm{d}x}{x^p}
$$
Thus, $\int_0^\infty\frac{\mathrm{d}x}{x^p+x^{-p}}$ converges if and only if $p\gt1$ since that is where $\int_1^\infty\frac{\mathrm{d}x}{x^p}$ converges.
A: For $p>1$ we have $~\displaystyle\int_0^{\infty}\frac{dx}{x^{p}+x^{-p}}~=~\frac\pi{2p}\cdot\sec\frac\pi{2p}~.~$ This can be shown by rewriting 
the integrand as $\dfrac{x^p}{x^{2p}+1}$ , from where we deduce that $2p-p>1$, since $~\displaystyle\int_0^{\infty}\frac{dx}{x+1}~$ 
diverges. Then, from the fact that the integrand lacks poles on $(0,\infty)$, the desired con- 
clusion soon follows. As to its value, this can be computed by letting $t=\dfrac1{x^{2p}+1}$ , and 
recognizing the expression of the beta function in the new integral, then using Euler's 
reflection formula for the $\Gamma$ function to brush up the final result.
