Difficulties evaluating $\int_0^{+\infty}\frac{\mathrm dx}{(1+x^2)^{1/n}}$ I was investigating the existence of the integrals $$\int_0^{+\infty}\frac{\mathrm dx}{(1+x^2)^{1/n}}$$ for positive integers $n.$ Of course this exists for $n=1.$ When one compares with the integral $$\int_1^{+\infty}x^{-2/n}\mathrm dx,$$ which dominates the above integral for each such $n$ for $x\ge 1,$ one discovers that convergence occurs only for $n\le 2.$ That is, the integral $$\int_0^{+\infty}\frac{\mathrm dx}{\sqrt{1+x^2}}$$ exists. I then went ahead to evaluate it.
First I tried the substitution $x=\tan\phi,$ which gives us that the integral is equal to $$\int_0^{π/2}\sec\phi\mathrm d\phi.$$ But this latter gives a nonsensical result, namely $-\infty.$ I tried another obvious substitution, namely $x=\sinh\psi,$ which says the integral is the same as $$\int_0^{+\infty}\mathrm d\psi=+\infty,$$ which though less nonsensical than the previous result, is still pretty silly, since the integral exists as a real number.
The fact that these two methods yield different results is even more perplexing than the fact that each one of them is separately nonsensical. My questions are as follows:

Clearly, I'd love to see what the integral evaluates to; but more importantly, exactly what is happening with the above attempts to evaluate the integral? What has gone wrong, and where? If nothing has gone wrong in the obvious way (as I suspect), what exactly is happening? Does this have to do with the fact that this is the last such integral that converges, as $n$ increases?

Thanks for your insights and explanations.
 A: It is not the case that $\int_1^\infty x^{-1} \; dx$ converges.  So your next integral doesn't exist for $n=2$.  You have $n<2$ not $n\leq 2.$
A: Incidentally, your original integral can be evaluated, for all $n\in\Bbb C$ satisfying $\Re\frac1n>\frac12$, with your chosen substitution $x=\tan\phi$ (followed by $t=\sin^2\phi=\frac{x^2}{1+x^2}$) as$$\int_0^{\pi/2}\cos^{2/n-2}\theta d\theta=\tfrac12\operatorname{B}(\tfrac1n-\tfrac12,\,\tfrac12)=\frac{\sqrt{\pi}\Gamma(\tfrac1n-\frac12)}{2\Gamma(\tfrac1n)}.$$
A: This integrand asymptotically goes as $\frac{1}{x^{2/n}}$, so the integral will converge for $n<2$. Then we can evaluate
$$I=\int_{0}^{\infty} \frac{dx}{(1+x^2)^{1/n}},~ n<2.$$
Let $x=\tan t \implies dx= \sec^2 t~ dt$ and use beta function (integral)
https://en.wikipedia.org/wiki/Beta_function
$$I=\int_{0}^{\pi/2} \cos^{2/n-2} dt =\frac12 \frac{\Gamma(1/2) \Gamma(1/n-1/2)}{\Gamma(1/n)}=\frac{\sqrt{\pi}}{2}\frac{\Gamma(1/n-1/2)}{\Gamma(1/n)}, n<2$$
A: That integral does not converge by the comparison test. Notice for $x\ge 1$ we have
$$\frac 1{2x}\leq\frac1{\sqrt{1+x^2}}$$
Because
$$2x\ge \sqrt{1+x^2}$$
due to the fact that
$$4x^2\geq 1+x^2$$
Since
$$\int_1^\infty \frac 1{2x}$$
does not converge, neither does your integral. 
