Interesting integral formula I looked around and found that integrals of the form
$$\int_{0}^{\infty} \frac{x^{m-1}}{a+x^n}, a,m,n \in \mathbb{R}, 0<m<n, 0<a$$ 
seem to occur very often:
Just to give a few examples (the formula given below would solve them all right away):
How can I compute the integral $\int_{0}^{\infty} \frac{dt}{1+t^4}$?
Simpler way to compute a definite integral without resorting to partial fractions?
Is this definite integral really independent of a parameter? How can it be shown?
Integrating $\int_0^\infty \frac{1}{x^2 + 2x + 2} \mathrm{d} x$ 
Even more surprising was that there seems to be a (quite beautiful) closed form, namely:
$$\int_{0}^{\infty} \frac{x^{m-1}}{a+x^n}=\frac{\pi}{n}  \left(\frac{1}{a}\right)^{1-\frac{m}{n}} \csc \left(m \cdot \frac{\pi 
   }{n}\right)$$ 
(This result is from Mathematica). I tried to derive this result by integrating (brute force) but you get hypergeometric functions which I don't like. Therefore I would like to know if there is a straight-forward way to get this by hand.
 A: Well there is actually a formula which I found in Gamelin's complex analysis book. This is problem number $7$ Exercise VII.4 Page No. 208. This works for the case $a=1$. So if you have $a=1$, then $$\int\limits_{0}^{\infty} \frac{x^{a-1}}{1+x^{b}} \ \text{dx} = \frac{\pi}{b \sin(\pi{a}/b)}, \quad 0 < a < b$$

Set $$I = \int\limits_{0}^{\infty} \frac{x^{a-1}}{1+x^{b}} \ \text{dx}$$ and integrate $$f(z) = \frac{z^{a-1}}{1+z^{b}} = \frac{|z|^{a-1} \cdot e^{i(a-1)\text{arg}(z)}}{1+|z|^{b}e^{ib\text{arg}(z)}}$$
Simple pole at $z_{1} = e^{\pi{i}/b}$ and hence $$\text{Res} \Biggl[\frac{z^{a-1}}{1+z^{b}}, e^{\pi{i}/b}\Biggr] = \frac{z^{a-1}}{bz^{b-1}}\Biggl|_{z =e^{\pi i / b}} = -\frac{1}{b}e^{\pi i a/b}$$
Integrate along $\gamma_{1}$, and let $R \to \infty$ and let $ \epsilon \to 0^{+}$. This gives, 
  \begin{align*}
 \int\limits_{\gamma_{1}} f(z) \ dz & = \int\limits_{\gamma_{1}}  \frac{|z|^{a-1} \cdot e^{i(a-1)\text{arg}(z)}}{1+|z|^{b}e^{ib\text{arg}(z)}} \ dz \\\ &= \int\limits_{\epsilon}^{R} \frac{x^{a-1}}{1+x^{b}} \to \int\limits_{0}^{\infty} \frac{x^{a-1}}{1+x^{b}} \ dx =I
\end{align*}
Integrate along $\gamma_{2}$, and let $R \to \infty$. This gives $0 < a < b$ and $$\Biggl|\int\limits_{\gamma_{2}} f(z) dz \Biggr| \leq \frac{R^{a-1}}{R^{b}-1} \cdot \frac{2\pi R}{b} \sim \frac{2 \pi}{b R^{b-a}} \to 0$$
Integrate along $\gamma_{3}$ and let $R \to \infty$ and $\epsilon \to 0^{+}$. This gives 
  \begin{align*}
\int\limits_{\gamma_{3}} f(z) \ dz &= \int\limits_{\gamma_{3}}  \frac{|z|^{a-1} \cdot e^{i(a-1)\text{arg}(z)}}{1+|z|^{b}e^{ib\text{arg}(z)}} = \Biggl[\begin{array}{c} z=x e^{2\pi i/b} \\\ dz=e^{2\pi i/b} \ dx \end{array}\Biggr] \\\ &= \int\limits_{R}^{\epsilon} \frac{x^{a-1}e^{2\pi i(a-1)/b}}{1+x^{b}} \cdot e^{2\pi i b} \ dx \to \int\limits_{\infty}^{0} \frac{x^{a-1}e^{2\pi i(a-1)/b}}{1+x^{b}} \cdot e^{2\pi i b} \ dx \\\ &= -e^{2\pi ia/b}I
\end{align*}
Integrate along $\gamma_{4}$ and let $\epsilon \to 0^{+}$. This gives $0 < a <b$, $$\Biggl|\int\limits_{\gamma_{4}} f(z) \ dz \Biggr| \leq \frac{\epsilon^{a-1}}{1-\epsilon^{b}} \cdot \frac{2\pi\epsilon}{b} \sim \frac{2\pi\epsilon}{b} \to 0$$
Using the $\text{Residue Theorem}$ and letting $R \to \infty$ and $\epsilon \to 0^{+}$, we obtain that $$ I + 0 - e^{2\pi a/b}I + 0 = 2\pi i \cdot \Bigl(-\frac{1}{b} e^{\pi ia/b}\Bigr)$$ This yields, $$(e^{-\pi i a/b} - e^{\pi i a./b})I= -\frac{2\pi i}{b}$$ and hence solving for $I$, we have $$I= \frac{2\pi i}{b \cdot (e^{\pi ia/b} - e^{-\pi i a/b})}=\frac{\pi}{b \sin(\pi a/b)}$$

Actually I have taken this answer from, one of my posts: You can see that as well.


*

*Simpler way to compute a definite integral without resorting to partial fractions?
