Solve integral $\int \frac{x^n}{\sqrt{x-x^2}}dx$

hypergeometric functionintegration

I am trying to find an appropriate substitution in the following indefinite integral
$$\int \frac{x^n}{\sqrt{x-x^2}}dx$$
for an arbitrary power $n$ to obtainthe intermidiate steps to the same answer as in Mathematica expressed through the hypergeometric function as following

$$\int\frac{x^ndx}{\sqrt{x(1-x)}}=-\sqrt{1-x}\;_2F_1\left(\frac{1}{2},\frac{1}{2}-n;\frac{3}{2};1-x\right)$$

Using this formula I could also compute the definite integral from $0$ to $1$, which is given as

$$\int_{0}^{1} \frac{x^{n}dx}{\sqrt{x(1-x)}}=\frac{\sqrt{\pi}\Gamma\left(n+\frac{1}{2}\right)}{\Gamma(n+1)}$$

Any ideas are very welcome!

Best Answer

If you only need the definite integral, then you can write it directly as the definition of the Beta function.

$$=\int_{0}^{1}x^{n-1/2}(1-x)^{-1/2}=B(n-1/2+1,-1/2+1)=B(n+1/2,1/2)=\frac{\Gamma(n+1/2)\Gamma(1/2)}{\Gamma(n+1/2+1/2)}$$

Finally, use that $\Gamma(1/2)=\sqrt{\pi}$.