<s>[INST] Is there a general formula for $I(m,n)$? Consider the integral
$$I(m,n):=\int_0^{\infty} \frac{x^m}{x^n+1}\,\mathrm dx$$
For $m=0$, a general formula is $$I(0,n)=\frac{\frac{\pi}{n}}{\sin\left(\frac{\pi}{n}\right)}$$
Some other values are $$I(1,3)=\frac{2\pi}{3\sqrt{3}}$$ $$I(1,4)=\frac{\pi}{4}$$ $$I(2,4)=\frac{\pi}{2\sqrt{2}}$$
For natural $m,n$ the integral exists if and only if $n\ge m+2$. 

Is there a general formula for $I(m,n)$ with integers $m,n$ and $0\le m\le n-2$ ?

 [/INST] We shall compute it in two steps. First, perform the substitution $y = x^n$ in order to get
$$I(m,n) = \int \limits _0 ^\infty \frac {y ^{\frac m n}} {1 + y} \frac 1 n y ^{\frac 1 n - 1} \ \Bbb d y = \frac 1 n \int \limits _0 ^\infty \frac {y ^{\frac {m+1} n - 1}} {1 + y} \ \Bbb d y .$$
Now perform the change $t = \frac y {1+y}$, to obtain
$$I(m,n) = \frac 1 n \int \limits _0 ^1 \frac {\left( \frac t {1-t} \right) ^{\frac {m+1} n - 1}} {1 + \frac t {1-t}} \frac 1 {(1-t)^2} \ \Bbb d t = \frac 1 n  \int \limits _0 ^1 t^{\frac {m+1} n - 1} (1-t)^{- \frac {m+1} n} \ \Bbb d t = \frac 1 n  B \left( \frac {m+1} n, 1 - \frac {m+1} n \right) = \frac 1 n \frac \pi {\sin \pi {\frac {m + 1} n}} .$$
In the above, $B$ is Euler's Beta function and I have used the known formula $B(x, 1-x) = \frac \pi {\sin \pi x}$.
</s>