A contour integral and the residue theorem for infinitely many singularities Consider the following integral $$\int_0^{\infty}\frac{1}{1+x^\alpha}dx, $$
where $\alpha > 1$. In the case where $\alpha$ is an integer, one can show, as I do below, that the integral evaluates to $\frac{\pi}{\alpha}\csc(\pi/\alpha)$. However, I think the integral evaluates to the same expression even for non-integer $\alpha$. I distinctly recall checking this on wolfram alpha, but now the calculation seems to require additional computation time, which I don't have. Maybe someone can check?
Anyway, for integer $\alpha = n \geq 2$, let $$f(z) = \frac{1}{1+z^\alpha} = \frac{1}{1+z^n}, $$
and consider the contour integral $$\int_{\gamma}f(z)dz, $$
where $\gamma$ is a wedge shaped contour of radius $R$, opening angle $2\pi/n$ and one of its sides on the $x$-axis (I hope this is clear!). 
It's trivial to show that the contribution from the circular segment vanishes when $R \to \infty$. Let $$I = \int_0^R \frac{1}{1+x^n}dx.$$
The path for the remaining contribution can be parametrized as $z(t) = te^{i2\pi/n}$, where $t$ goes from $R$ to $0$. The corresponding integral is $$\int_R^0\frac{1}{1+(te^{i2\pi/n})^n}e^{i2\pi/n}dt = -e^{i2\pi/n}I.$$ 
In the limit $R \to \infty$, we then have $$\int_{\gamma} f(z)dz = (1-e^{i2\pi/n})I.$$
It is also clear that $f$ has a single singularity inside $\gamma$, namely at $z = e^{i\pi/n}$. One finds that the residue is $-e^{i\pi/n}/n$, and by the residue theorem, we get $$\int_0^\infty \frac{1}{1+x^n}dx = (\pi/n)\csc(\pi/n).$$
Questions


*

*Is the generalization to non-integer $\alpha$ true?

*If true, how do we prove it?

*Regarding point 2, I remember I tried to generalize the argument some time ago. The problem is of course that that $f$ will have (countably) infinitely many singularities $z_k = e^{i\pi(2k+1)/\alpha}$, with $k \in \mathbb{Z}$. Can we apply the Residue Theorem in this scenario?
 A: Yes, the generalisation to non-integer $\alpha$ is correct. One proves it just like the integer case, using a wedge of angle $2\pi/\alpha$.
That works, and such a wedge contains only a single singularity, because we use a branch of the function $z\mapsto z^{\alpha}$ that is holomorphic on the wedge (minus the origin) - specifically the branch that is real on the positive real axis, and on the wedge that branch is injective. The branch attains positive real values on the two straight parts of the boundary of the wedge, but it attains negative real values only on the bisector.
A: One can also change variables: if $y=x^{\alpha}$, then $x=y^{1/\alpha}$ and $dx= y^{1/\alpha-1}/\alpha \, dy$, and thus
$$ \int_0^{\infty} \frac{dx}{1+x^{\alpha}} = \frac{1}{\alpha} \int_0^{\infty} \frac{y^{1/\alpha-1}}{1+y} \, dy, $$
and since $1/\alpha$ is not an integer, one can consider $z^{1/\alpha-1}/(1+z)$ on the keyhole contour. There's one pole inside the contour, and $y^{1/\alpha}$ takes different values on both sides of the positive real axis, so choosing the appropriate branch of $z^{1/\alpha}$ gives the integral in terms of the value at the pole.
One may also notice that this is one form of the Beta-function, which instantly gives its value as $\frac{1}{\alpha}B(1/\alpha,1-1/\alpha) = \Gamma(1+1/\alpha)\Gamma(1-1/\alpha)$.
