I need to solve a certain definite integral, and several places (for example Wikipedia) I've come across the following formula:
$\displaystyle\int_0^{\infty}\frac{x^mdx}{(x^n+a^n)^r}=\frac{(-1)^{r-1}\pi\ a^{m+1-nr}\ \Gamma\big((m+1)/n\big)}{n\sin((m+1)\pi/n)(r-1)!\ \Gamma\big((m+1)/n-r+1\big)}$
with the sole condition $0<m+1<nr$. However this is seems to me undefined for $(m+1)/n=3,5,7,\ldots$ because of the sine, which are exactly the cases I need. Since this is not contained in the conditions, am I mistaken? And if not how would you go about solving the integral?
As an example mathematica gives me the answer $\frac{\Gamma(A-3)}{\Gamma(A)}$ when I use $m=5,\ a=1,\ n=2,\ r=A$, which is one of the cases I need.
You are not mistaken - rather, Wikipedia does not give the answer in its simplest form. It is actually $$\int_{0}^{\infty}\frac{x^mdx}{(x^n+a^n)^r}=a^{m+1-nr}\frac{\Gamma\left(\frac{m+1}{n}\right)\Gamma\left(r-\frac{m+1}{n}\right)}{n\,\Gamma(r)}.\tag{1}$$ The formula you have seen before is obtained from this one using gamma function reflection relation $\Gamma(z)\Gamma(1-z)=\frac{\pi}{\sin\pi z}$ with $z=r-\frac{m+1}{n}$. However, (1) is ok for your parameter values.