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!
 A: Hint: With $x=\cos^22u$ then
$$\int\sqrt{\frac{1-\sqrt{x}}{1+\sqrt{x}}}\,dx.=-4\int\cos2u(1-\cos2u)dx=2u+\dfrac12\sin4u-2\sin2u+C$$
A: An appropriate substitution would be $$u = \sqrt{\frac{1-\sqrt{x}}{1+\sqrt{x}}}, \quad x = \left(\frac{u^2-1}{u^2+1}\right)^2, \quad dx = \frac{8u(u^2-1)^2}{(u^2+1)^3} \, du.$$  This results in a straightforward partial fraction decomposition of a rational polynomial.
A: If you first set $t=\sqrt{x}$, the integral becomes
$$
2\int t\sqrt{\frac{1-t}{1+t}}\,dt=
2\int \frac{t(1-t)}{\sqrt{1-t^2}}\,dt
$$
which suggests $t=\sin u$, and so
$$
2\int(\sin u-\sin^2u)\,du
$$
which should be easy.
A: We have
$\mathrm{\int \sqrt{\frac{1-\sqrt{x}}{1+\sqrt{x}}}\ dx}$
Put $\mathrm{\sqrt{x} = \cos t}$
Differentiate Both Sides w.r.t. $\mathrm{x}$
$\mathrm{\frac{dx}{2\sqrt{x}}= - sint \ dt}$
$\mathrm{dx =- 2 \ cost\ sint \ dt}$
So, we get now:
$\mathrm{-\int \sqrt{\frac{1- cost}{1+ cost}}\  \times 2\ cost \ sint \ dt}$
= $\mathrm{-\int \sqrt{\frac{2 \ sin^2 \frac{t}{2}}{2 \ cos^2 \frac{t}{2}}}\  \times 2\ cost \ sint \ dt}$
= $\mathrm{-\int tan\frac{t}{2}  \times 2\ cost \ sint \ dt}$
= $\mathrm{-\int \frac{sin\frac{t}{2}}{cos\frac{t}{2}}  \times 2\ \left( 2cos^2\frac{t}{2} -1    \right) \ sint \ dt}$
=  $\mathrm{-\int 4 \ sin\frac{t}{2}cos\frac{t}{2}sint \ dt + 2\int \frac{sin\frac{t}{2}}{cos\frac{t}{2}} sint \ dt}$
= $\mathrm{-2 \int sin^2 t dt + 4 \int sin^2 \frac{t}{2}dt}$
= $\mathrm{-2 \int \frac{1}{2}\ dt + 2 \int cos2t\ dt + 4 \int \frac{1}{2}dt - 4\int cost \ dt}$
=$\mathrm{-t + sin2t + 2t - 4 \ sint}$
= $\mathrm{t + sin2t - 4 \ sint}$
= $\mathrm{cos^{-1}\sqrt{x}+ 2\sqrt{x} \ sin(cos^{-1}\sqrt{x}) - 4 sin(cos^{-1}\sqrt{x})}$
= $\mathrm{cos^{-1}\sqrt{x} + 2\sqrt{x}(\sqrt{1-x}) - 4(\sqrt{1-x}) }$

= $\mathrm{cos^{-1}\sqrt{x} + 2(\sqrt{x(1-x)}) - 4(\sqrt{1-x}) + C}$

And, This is your final answer!
A: $\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$
A: I think its useful to learn some standard substitution you can use for such kind of problem. 
for this case instead of using $x = \cos^2\theta$ I'm gonna try using $x=\cos^22\theta$ $$x=\cos^22\theta \Rightarrow dx=\left(-4\cos 2\theta \sin 2\theta \right)d\theta$$
so we have $$\int\sqrt{\frac{1-\sqrt{x}}{1+\sqrt{x}}}\,dx$$
$$-4\int\sqrt{\frac{1-\cos2\theta}{1+\cos2\theta}}\cos 2\theta \left(\sin 2\theta \right),d\theta$$
$$-4\int \frac{\ \sin \theta }{\cos \theta }\cos 2\theta \left(\sin 2\theta \right)$$
$$-8\int (\sin^2 \theta\cos2\theta)d\theta $$
$$-8\int \frac{\ 1-\cos 2\theta }{2}\times \ (\cos 2\theta)d\theta $$
$$-4\int \cos 2\theta \ -\frac{\left[\cos 4\theta +1\right]}{2}d\theta  $$
$$-2\sin 2\theta +\frac{\sin 4\theta }{2}+(2\theta) + C$$
we want to write this in terms of $x$ so $\ \theta =\frac{\cos ^{-1}\left(\sqrt{\ x}\right)}{2}$
