Integration: $\int\frac{dx}{\sqrt{x(1-x)}}$ My teacher wrote this on the blackboard: $$\int_0^z \frac{1}{\pi \sqrt{x(1-x)}}dx= \frac{2}{\pi} \arcsin(\sqrt{z})$$
But when I try to calculate the integral:
\begin{align}
\int \frac{1}{\pi \sqrt{x(1-x)}}dx&=\int \frac{1}{\pi \sqrt{(\frac{1}{2})^2-(x-\frac{1}{2})^2}}dx\\
&=  \int \frac{1}{\pi \sqrt{(\frac{1}{2})^2-k^2}}dk=2 \int \frac{1}{\pi \sqrt{1-(2k)^2}}dk\\
&= \int \frac{1}{\pi \sqrt{1-a^2}}da\\
&= \frac{1}{\pi} \arcsin(a)\\
&=\frac{1}{\pi} \arcsin\left(2(x-\frac{1}{2})\right)
\end{align}
So
$$\int_0^z \frac{1}{\pi \sqrt{x(1-x)}}dx= \frac{1}{\pi} \arcsin(2z-1)-\frac{1}{\pi} \arcsin(-1)= \frac{1}{\pi} \arcsin(2z-1) - \frac{1}{2}$$
How I come to the solution of my teacher?

if you make the substitution $x=u^2$ the integral becomes:
$$
\int_0^{\sqrt{z}} \frac2{\pi \sqrt{1-u^2}}du
$$
