# How to solve the integral $\int \frac{x^n}{\sqrt{x-x^2}}$?

I am trying to find an appropriate substitution in the following indefinite integral $\int \frac{x^n}{\sqrt{x-x^2}}$ 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!

$$=\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}$.
• Indeed, this can also be used to obtain a solution for the indefinite integral. One has to use the expression of the incomplete beta-function and the Chebychev integral $$\int x^p(1-x)^qdx=B(x;1+p,1+q)$$ and then its relation to a hypergeometric function $$B(x;1+p,1+q)=\frac{x^{1+p}}{1+p} _2F_1(1+p,-q;2+p;x)$$ Thanks a lot! – Paul Frey Jul 17 '18 at 8:13
Let $$x=\sin^2(t)\implies dx=2 \sin (t) \cos (t)\,dt$$ to make $$\int \frac{x^n}{\sqrt{x-x^2}}\,dx=2\int \sin^{2n}(t)\,dt$$ and use the reduction formula (have a look here).