<s>[INST] Clarification regarding integral of $\arcsin (\sqrt x)$ I need to integrate $\arcsin (\sqrt x)$. I tried using integration by parts but going wrong somewhere. Please help.
\begin{align}
&x\arcsin (\sqrt x)-\frac {1}{2}\int \frac{x}{\sqrt{x-x^2}}\,dx \\
&=x\arcsin (\sqrt x)-\frac {1}{2}\int \frac{x-1/2}{\sqrt{1/4-(x-1/2)^2}}dx+\frac {1}{2}\int \frac{1/2}{\sqrt{1/4-(x-1/2)^2}}\,dx\\
&=x\arcsin (\sqrt x)+\frac {1}{2}\sqrt {x-x^2}+ \frac {1}{4}\int \frac{1}{\sqrt{1/4-(x-1/2)^2}}\,dx\\
&=x\arcsin (\sqrt x)+\frac {1}{2}\sqrt{(x-x^2)}+ (1/4)\arcsin ((x-1/2)/(1/2))
\end{align}
But the answer given in my book is $-1/2\arcsin (\sqrt x)(1-2x)+1/2\sqrt x\sqrt{1-x}$
Btw I took 1 as the first function while applying integration by parts.
 [/INST] You've made a mistake with the signs. 
$$-\frac {1}{2}\int \frac{x}{\sqrt{x-x^2}}\,dx = -\frac 12 \left(\int \frac{x-\frac12}{\sqrt{\frac 14-(x-\frac 12)^2}}dx+\int \frac{\frac 12}{\sqrt{\frac 14-(x-\frac 12)^2}}\,dx\right)$$
Notice the negative factors into the 2nd integral as well, which you overlooked.
Differentiating the result with this issue resolved yields the correct answer. 
</s>