How to approach $\int_{0}^{\infty} \frac{x^{r-1}}{1+x^s} \,dx$ The integral I am trying to solve is $$\int_{0}^{\infty}\frac{x^{r-1}}{1+x^s} \,dx$$ where $0<r<s$ for its exact value.
I have been at this one on and off for a couple weeks now. I have tried inversion substitutions, exponential substitutions, attempted Feynman integration, integration by parts, adding different versions of it together, yet I still can't make any real progress on this. Trig or inverse trig substitutions don't look like they would seem to work. I have tried turning the denominator into an infinite geometric sum, but I don't think I can because of convergence issues. I just feel like I have exhausted all of the methods I know on this and I need some guidance, or a push in the right direction.
 A: Enforcing $x^s\mapsto x$ yields
$$\int_0^\infty\frac{x^{r-1}}{1+x^s}\,{\rm d}x\stackrel{x^s\mapsto x}=\frac 1s\int_0^\infty\frac{x^{\frac rs-1}}{1+x}\,{\rm d}x$$
Now, use the Beta Function and Euler's Reflection Formula to obtain
$$\frac1s\int_0^\infty\frac{x^{\frac rs-1}}{1+x}\,{\rm d}x=\frac1sB\left(\frac rs,1-\frac rs\right)=\frac1s\frac{\Gamma\left(\frac rs\right)\Gamma\left(1-\frac rs\right)}{\Gamma\left(\frac rs+1-\frac rs\right)}=\frac1s\frac{\pi}{\sin\left(\frac rs\pi\right)}$$
whenever $\frac rs\notin\Bbb Z$. As $0<r<s$ implies $\frac rs<1$ this case does not occur.

$$\therefore~\int_0^\infty\frac{x^{r-1}}{1+x^s}\,{\rm d}x=\frac1s\frac{\pi}{\sin\left(\frac rs\pi\right)}$$

Right now I do not if there is simpler way.
A: The following proof can be found in the book, Complex variables, page $223$:
Show that $$\int_0^\infty\frac{x^{p-1}}{1+x}dx,\quad 0<p<1.$$
Proof: Consider $\oint_C \frac{z^{p-1}}{1+z}dz$. Since $z=0$ is a branch point, choose $C$ as the contour of the figure below where the positive real axis is the branch line and where $AB$ and $GH$ are actually coincident with the $x$ axis but are shown separated for visual purposes.
The integrand has  the simple pole $z=-1$ inside $C$.
Residue at $z=-1=e^{\pi i}$ is
$$\lim_{z\to -1}(z+1)\frac{z^{p-1}}{1+z}=(e^{\pi i})^{p-1}=e^{(p-1)\pi i}$$
Then
$$\oint_C\frac{z^{p-1}}{1+z}dz=2\pi ie^{(p-1)\pi i}$$
or, omitting the integrand,
$$\int_{AB}+\int_{BDEFG}+\int_{GH}+\int_{HJA}=2\pi ie^{(p-1)\pi i}$$
We thus have
$$\int_\epsilon^R\frac{x^{p-1}}{1+x}dx+\int_0^{2\pi}\frac{(Re^{i\theta})^{p-1}iRe^{i\theta}}{1+Re^{i\theta}}d\theta+\int_R^\epsilon\frac{(xe^{2\pi i})^{p-1}}{1+xe^{2\pi i}}dx+\int_{2\pi}^0\frac{(\epsilon e^{i\theta})^{p-1}i\epsilon e^{i\theta}}{1+\epsilon e^{i\theta}}d\theta=2\pi ie^{(p-1)\pi i}$$
where we have used $z=xe^{2\pi i}$ for the integrand along $GH$, since the argument of $z$ is increased by $2\pi$ in going around the circle $BDEFG$.
Taking the limit as $\epsilon\to 0$ and $R\to \infty$ and nothing that the second and fourth integrals approach zero, we find
$$\int_0^\infty\frac{x^{p-1}}{1+x}dx+\int_\infty^0\frac{e^{2\pi i (p-1)}x^{p-1}}{1+x}dx=2\pi ie^{(p-1)\pi i}$$
or
$$(1-e^{2\pi i (p-1)})\int_0^\infty\frac{x^{p-1}}{1+x}dx=2\pi ie^{(p-1)\pi i}$$
so that
$$\int_0^\infty\frac{x^{p-1}}{1+x}dx=\frac{2\pi i e^{(p-1)\pi i}}{1-e^{2\pi i (p-1)}}=\frac{2\pi i}{e^{p\pi i}-e^{-p\pi i}}=\frac{\pi}{\sin p\pi}$$


By the way, using this result along with beta function we can prove Euler reflection identity.
A: It is definite integral of algebraic function, and according to Handbook of Mathematics (I.N. Bronshtein · K.A. Semendyayev · G.Musiol · H.Muehlig) it has a solution:
$$\frac{\pi}{s \sin \frac{r \pi}{s}}$$
