Integral of $\int \frac{1}{\sqrt{x(1-x)}} dx $ $$\int \frac{1}{\sqrt{x(1-x)}} dx $$
I solved the integral in this way: make the substitution $x=\sin^2(u)$, then $dx=2\sin(u)\cos(u)du$. So the integral now becomes 
$$\int \frac{2\sin(u)\cos(u)}{\sqrt{\sin^{2}(u)(1-\sin^{2}(u))}} du=\int 2 du=2u+C.$$ 
Then subbing in $u=\arcsin(\sqrt{x})$ I get the solution 
$$2\arcsin(\sqrt{x})+C.$$
However when I typed in this integral onto Wolfram it gave me this.
So my question is did I get it wrong or are the two forms equivalent?
 A: First of all, we never have to ask whether we got a correct antiderivative - because we can just take the derivative of our answer and see what we get:
$$
\frac d{dx} \big( 2\sin^{-1}(\sqrt x) +C \big) = \frac2{\sqrt{1-(\sqrt x)^2}}\frac d{dx}\sqrt x = \frac2{\sqrt{1-x}} \frac1{2\sqrt x} = \frac1{\sqrt{x(1-x)}}.
$$
So you did it right.
There's another way of finding the antiderivative: complete the square inside the square root to see that
$$
\frac1{\sqrt{x(1-x)}} = \frac1{\sqrt{1/4 - (x-1/2)^2}} = \frac2{\sqrt{1-(2x-1)^2}}.
$$
Therefore, using the substitution $u=2x-1$,
\begin{align*}
\int \frac1{\sqrt{x(1-x)}} \,dx = \int \frac2{\sqrt{1-(2x-1)^2}} \,dx &= \int \frac1{\sqrt{1-u^2}} \,du \\
&= \sin^{-1} u + C = \sin^{-1} (2x-1) + C.
\end{align*}
This can also be verified by differentiating.
(Side note: it's possible to check directly that $\sin^{-1}(2x-1)+\pi/2 = 2\sin^{-1}(\sqrt x)$, by taking the cosine of both sides, using $\cos(\theta+\pi/2) = -\sin\theta$ on the left and the double-angle formula $\cos 2\theta = 1-2\sin^2\theta$ on the right. Pretty cool!)
A: Put $\displaystyle x = \frac{1}{2}+t$ and $dx = dt$
So $\displaystyle \int\frac{1}{\sqrt{x.(1-x)}}dx$ is converted into
$\displaystyle \int\frac{1}{\sqrt{\frac{1}{2^2}-t^2}}dt = \sin^{-1}(2t)+\mathbb{C} = \sin^{-1}\left(2x-1\right)+\mathbb{C}$
A: The equivalence is seen via
$$\arcsin\sqrt x= \arccos \sqrt{1-x} =\frac\pi2 - \arcsin\sqrt{1-x} 
$$
A: Alternatively, let $ t = \sqrt{x} $, then the integrand becomes $$ \frac1{\sqrt{x(1-x)}} = \frac1{\sqrt x} \frac1{\sqrt{1-x}} = \frac1t \cdot \frac1{\sqrt{1-t^2}} $$
And $ dx = 2t \, dt $. The integral becomes $$\int \frac1{t \sqrt{1-t^2}} \cdot 2t \, dt = 2 \int \dfrac1{\sqrt{1-t^2}} \, dt = 2 \arcsin(t) + C = 2\arcsin(\sqrt x) + C. $$
