Integration by parts $ \int \sqrt{x-x^2} dx $ I have to integrate $$ \int \sqrt{x-x^2} dx $$ 
The answer on my textbook is $ \frac 14 \left( \arcsin(\sqrt x)-(1-2x)\sqrt{x-x^2} \right) $ but I want to solve this by myself so can you please give me a clue ? :) Thank you.
 A: Hint: Complete the square:
$$\int\sqrt{x-x^2}dx=\int\sqrt{-x^2+2\frac x2-\frac14+\frac14}dx=\int\sqrt{-\left(x-\frac 12\right)^2+\frac14}dx$$
Set $u=x-\frac 12$ to obtain
$$\int\sqrt{-u^2+\frac14}du$$
I think you now how to deal with this one.
A: For the real values of $\sqrt{x-x^2},$ we need $x-x^2\ge 0\implies 0\le x\le 1$
If we put $x=\sin^2t$ where $0\le t\le \frac\pi2, 1-x=\cos^2t\ge 0\implies \sqrt{1-x}=+\cos t$  and $dx=2\sin t\cos tdt$
So, $$\int\sqrt{x-x^2}dx=\int\sqrt{x(1-x)}dx$$
$$=\int\sin t\cos t2\sin t\cos tdt$$
$$=\frac12\int (\sin2t)^2dt \text{,    as }\sin2y=2\sin y\cos y$$
$$=\frac14\int (1-\cos 4t)dt  \text{,    as } \cos2y=1-2\sin^2y$$
$$=\frac14\left(t-\frac{\sin4t}4\right)+c$$
Now, $x=\sin^2t\implies \cos2t=1-2\sin^2t=1-2x$
$\implies \sin2t=+\sqrt{1-(1-2x)^2}=2\sqrt{x-x^2}$ as $\sin2t\ge 0$ as $0\le 2t\le \pi$
So, $\sin4t=2\sin2t\cos2t=2\cdot 2\sqrt{x-x^2}(1-2x)$
So, $$\int\sqrt{x-x^2}dx=\frac14\left(\arcsin \sqrt x-4(1-2x)\sqrt{x-x^2}\right)+c$$
A: for calculation of Integral $\displaystyle \int \sqrt{a^2-x^2}dx$
We will Use Integration by parts method
Let $\displaystyle \mathbb{I} = \int \sqrt{a^2-x^2}.xdx = \sqrt{a^2-x^2}.x-\int\frac{1}{2\sqrt{a^2-x^2}}.-2x.xdx$
$\displaystyle \mathbb{I}= x.\sqrt{a^2-x^2}-\int\frac{(a^2-x^2)-a^2}{\sqrt{a^2-x^2}}dx$
$\displaystyle \mathbb{I} = x.\sqrt{a^2-x^2}-\mathbb{I}+a^2.\sin^{-1}\left(\frac{x}{a}\right)$
So $\displaystyle \mathbb{I}=\sqrt{a^2-x^2}dx = \frac{x}{2}\sqrt{a^2-x^2}+\frac{a^2}{2}.\sin^{-1}\left(\frac{x}{a}\right)+\mathbb{C}$
