How to calculate $\int\sqrt{\frac{1-\sqrt x}{1+\sqrt x}} dx$? How to calculate?
$$\int\sqrt{\frac{1-\sqrt x}{1+\sqrt x}}\, \mathrm dx$$
I try to let $x=\cos^2 t$, then
$$\sqrt{\frac{1-\sqrt x}{1+\sqrt x}}=\tan\frac t2,\; dx=-2\sin t\cos t\,\mathrm dt $$
so
$$\int\sqrt{\frac{1-\sqrt x}{1+\sqrt x}} \mathrm dx=-2 \int\tan\frac t2\sin t\cos t\,\mathrm dt$$
Thanks a lot!
 A: Let $u = \dfrac{1 - \sqrt{x}}{1 + \sqrt{x}}$, then solve for $x = \left(\dfrac{1-u}{1+u}\right)^2$, and you can take it from here by finding $dx$ in terms of $du$.
After this, you want to make another round of substitution: $t = \sqrt{u}$, then:
$u = t^2 \Rightarrow du = 2tdt$, and you are back to integrating rational function. You can then proceed to "fraction decomposition" in variable $t$.
A: You're almost there!
Just substitute:
$$\tan \frac{t}{2} = \frac{1-\cos t}{\sin t}$$ 
A: The best solution has already been given. Else you could have tried the double angle formulae $\sin(t) = \frac{2T}{1+T^2}$ and $\cos=\frac{1-T^2}{1+T^2}$ where
$T=\tan(t/2)$ However the resulting integral requires integration by parts.
The solution given already is much faster!
A: Here's the easiest method:
$$\begin{aligned} I= \int \sqrt{\frac{1 - \sqrt x}{1 + \sqrt x}} \ dx &= \int \frac{1 - \sqrt x}{\sqrt{1 - x}}\ dx\\& = \int \frac{1}{\sqrt{1-x}} - \frac{\sqrt x}{\sqrt{1-x}}\ dx\\& = -2\sqrt{1-x} - \int \frac{\sqrt x}{\sqrt{1-x}}\ dx + c_1\end{aligned}$$
Putting $x= \cos^2(t)$ so that $dx = -2\sin(t) \cos(t)\ dt$
$$\begin{aligned} I & = -2\sqrt{1-x}  + \int \frac{\cos(t)}{\sin (t)}\cdot 2 \sin(t) \cos(t)\ dt +c_1\\& = -2\sqrt{1-x} + 2\int \cos^2(t)\ dt+c_1\\& = -2\sqrt{1-x} + \int 1 + \cos(2t)\ dt+c_1\\& = -2\sqrt{1-x} + 2\int \cos^2(t)\ dt+c_1\\& = -2\sqrt{1-x} + t +\frac{\sin(2t)}{2}  + C\\& = -2\sqrt{1-x} + \cos^{-1}(\sqrt x) + \sqrt{x - x^2}  + C\end{aligned}$$
A: Alternate method:
$$ I = \int \sqrt{\frac{1- \sqrt{x}}{1 + \sqrt{x}}}\ dx$$
Putting $x = \cos^{2}{2t}$ so that $dx = -4\cos(2t) \sin(2t)\ dt$ and $t = \frac12 \cos^{-1}({\sqrt x})$
$$\begin{align}\implies I & = \int \frac{\sin(t)}{\cos(t)}\cdot -4\cos(2t) \sin(2t)\ dt\\ & = -4\int \frac{\sin t}{\cos t}[2\cos^2t - 1]\cdot 2 \sin t \cos t \ dt\\& = -8 \int\sin^2(t)[2\cos^2t - 1]\ dt\\& = -8 \int \frac{\sin^22t}{2} - \sin^2t \ dt\\& = -8 \int \frac{1 - \cos4t}{4} - \frac{1- \cos2t}{2} \ dt\\& = 2 \int \cos4t - 1\ dt + 4\int 1- \cos2t \ dt\\& = \frac{\sin 4t}{2} - 2t  + C_1 + 4t - 2\sin 2t+ C_2\\& = \sin(2t) \cos(2t) + 2t - 2\sin 2t+ C\\& = \sqrt{x - x^2} + \cos^{-1}\sqrt{x}- 2\sqrt{1-x} + C\end{align}$$
