Calculate $ \int_{0}^{1}\frac{r^{p+1}}{(1-r^{2})^{\frac{p}{2}-\frac{1}{2}}}dr $ 
$$
 \int_{0}^{1}\frac{r^{p+1}}{(1-r^{2})^{\frac{p}{2}-\frac{1}{2}}}dr=\frac{2\Gamma(\frac{3}{2}-\frac{p}{2})\Gamma(\frac{p}{2}+1)}{3\sqrt{\pi}}\text{
 for }-2<p<3, $$

and if $p\geq3$, the above integration diverges.(This is the result from wolframalpha and I just want to know the above is convergent only when $-2<p<3$ and divergent for $p\geq 3$)
I want to calculate this. I know the definition of Gamma function
which is $$\Gamma(z)=\int_{0}^{\infty}x^{z-1}e^{-x}dx.$$ Any suggention?
Thanks in advance.
 A: I am not sure to properly answer your question; so, please forgive me if I am off topic.
Considering $$I_p=\int_{0}^{1}\frac{r^{p+1}}{(1-r^{2})^{\frac{p}{2}-\frac{1}{2}}}\,dr$$ let $r=\sin(t)$ making 
$$I_p=\int_{0}^{\frac \pi 2}\sin ^{p+1}(t) \cos ^{2-p}(t)\,dt$$
Looking in the seventh edition of "Table of Integrals, Series, and Products" by I.S. Gradshteyn and I.M. Ryzhik, you will find this integral in section $3.621$ (the fifth formula).
Applied to your case, $\mu=p+2$, $\nu=3-p$, this then write
$$I_p=\frac{1}{2} B\left(\frac{p+2}{2},\frac{3-p}{2}\right)$$ and using the relation between beta and gamma functions $$I_p=\frac{2}{3 \sqrt{\pi }} \Gamma \left(\frac{3}{2}-\frac{p}{2}\right) \Gamma
   \left(1+\frac{p}{2}\right)$$ as given by Wolfram Alpha.
A: $$I=\int_{0}^{1}\frac{r^{p+1}}{(1-r^{2})^{\frac{p}{2}-\frac{1}{2}}}dr $$
Let $\quad r^2=x \quad\to\quad dr=\frac{1}{2x^{1/2}}dx\quad\to\quad 
I=\int_{0}^{1}\frac{x^{(p+1)/2}}{(1-x)^{(p-1)/2}}\frac{1}{2x^{1/2}}dx$
$$I=\frac{1}{2}\int_{0}^{1}\frac{x^{p/2}}{(1-x)^{(p-1)/2}}dx=
\frac{1}{2}\int_{0}^{1}\frac{(1-x)^{(1-p)/2} }{x^{-p/2}  }dx$$
Obviously, if$\quad p\leq -2 \quad\to\quad -p/2\geq 1\quad$the integral is not convergent for $x\to 0$. 
Let $\quad 1-x=t$
$$I=\frac{1}{2}\int_{0}^{1}\frac{(1-t)^{p/2}}{t^{(p-1)/2}}dt$$
Obviously, if$\quad p\geq 3 \quad\to\quad (p-1)/2\geq 1\quad$the integral is not convergent for $t\to 0\quad (x\to 1)$.
Thus the integral is convergent only if $-2<p<3$.
$$I=\frac{1}{2}\int_{0}^{1}t^{(1-p)/2}(1-t)^{p/2}dt$$
Beta function : https://en.wikipedia.org/wiki/Beta_function
$$\quad B(a,b)=\int_0^1 t^{a-1}(1-t)^{b-1}=\frac{\Gamma(a)\Gamma(b)}{\Gamma(a+b)}$$ 
With $\quad a=\frac{1-p}{2}+1\quad$ and $\quad b=\frac{p}{2}+1$
$$I=\frac{1}{2}B\left(\frac{3-p}{2}\:,\:\frac{p+2}{2} \right)= \frac{1}{2} \frac{\Gamma(\frac{3-p}{2})\Gamma(\frac{p+2}{2} )}{\Gamma(5/2)}$$
$\Gamma(5/2)=\frac{3\sqrt{\pi}}{4}$ 
$$I=\frac{2\Gamma(\frac{3}{2}-\frac{p}{2})\Gamma(\frac{p}{2}+1)}{3\sqrt{\pi}}$$
