<s>[INST] Find the integral $\int\sqrt{\frac{1-\sqrt{x}}{1+\sqrt{x}}}\,dx.$ The question is $$\int\sqrt{\frac{1-\sqrt{x}}{1+\sqrt{x}}}\,dx.$$ 
I have tried to multiply both numerator and denominator by $1-\sqrt{x}$ but can't proceed any further, help!
 [/INST] $\int \sqrt{\frac{1-\sqrt{x}}{1+\sqrt{x}}} dx$ = $\int \sqrt{\frac{\left( 1-\sqrt{x} \ \right)\left( 1-\sqrt{x}\right)}{\left( 1+\sqrt{x} \ \right)\left( 1-\sqrt{x}\right)}} dx$ = $\int \ $$\frac{1-\sqrt{x}}{\sqrt{1-\ x}} dx$ \ = $\int \ \frac{dx}{\sqrt{1-\ x}} \ -$$\int \ \frac{\sqrt{x} dx}{\sqrt{1-\ x}} \ =A\ -\ B$ 
$A.\ Let\ u\ =\ sin^{2} x;\ \ du\ =\ 2sinxcosxdx$ 
$ \begin{gathered}
=2\int \ \frac{sinxcosxdx}{\sqrt{1-\ sin^{2} x}} \ =\ 2\int \ \frac{sinxcosxdx}{cosx} =2\int sinxdx\ =-2cosx\ +\ C\ =-2\left(\sqrt{1-x}\right)\\
\end{gathered}$
$B.\ Let\ u\ =\ sin^{2} x;\ \ du\ =\ 2sinxcosxdx$
$\int \ \frac{\sqrt{sin^{2} x}}{\sqrt{1-\ sin^{2} x}} 2sinxcosxdx\ =\ \int \ \frac{sinx}{\sqrt{cos^{2} x}} 2sinxcosxdx\ =\ 2\int \ \frac{sinx}{cosx} sinxcosxdx\ =2$$\int sin^{2} xdx$
$=2\left(\frac{1}{2} x-\frac{1}{4} sin( 2x) +C\right) =x-\frac{1}{2} sin( 2x) +C\ =x-sinxcosx+C=sin^{-1}\sqrt{x} -\sqrt{x( 1-x)} +C$
$\int \sqrt{\frac{1-\sqrt{x}}{1+\sqrt{x}}} dx\ =\ $$-2\sqrt{1-x} \ -\ $$sin^{-1}\sqrt{x} +\sqrt{x( 1-x)} +C$
</s>