Given $\int\sqrt{\frac{1-\sqrt x}{1+\sqrt x}}dx$
Let $\sqrt x=\cos \theta=>x=\cos ^2 \theta$
as $\theta =\cos ^{-1} x$
On differentiating w.r.t x,
$x=\cos ^2x$
$dx=2\cos \theta(-\sin \theta) d\theta$
$=-2\sin \theta \cos \theta d\theta$
Now substituting for $\sqrt x $ and dx we get,
$I=\int \sqrt {\frac{1-\cos \theta}{1+\cos \theta}}(-2\sin \theta \cos \theta)d\theta$
But we know $1-\cos \theta=2\sin ^2 \theta/2$ and
$1+\cos \theta=2\cos ^2 \theta/2$ and $\sin \theta=2\sin \theta/2.\cos \theta/2$
Therefore $I=\large\int \sqrt{\frac{2\sin^2 \theta/2}{2\cos ^2 \theta/2}}\bigg[-2(2\sin \frac{\theta}{2}.\cos\frac{\theta}{2}.\cos \theta)d\theta\bigg]$
$=-2\int \frac{2\sin ^2 \frac{\theta}{2}}{\cos \frac{\theta}{2}} \times \cos \frac{\theta}{2}.\cos \theta.d\theta$
$=-2\int 2\sin ^2 \frac{\theta}{2}.\cos \theta. d\theta$
Writng $2\sin ^2 \frac{\theta}{2}$ a $(1-\cos \theta)$
$I=-2\int (1-\cos \theta) \cos \theta d\theta$
$=-2\int (1-\cos \theta)\cos \theta.d\theta$
$=-2\int (\cos \theta-\cos ^2 \theta) d\theta$
On seperating the term we get,
$I=-2\int \cos \theta d\theta+2\int \cos ^2 \theta d\theta$
we know $2 cos^2\theta=1+\cos 2\theta$
Therefore $I=-2\int \cos \theta d\theta+\int (1+\cos 2\theta)d\theta$
Therefore $I=-2\int \cos \theta d\theta+\int d\theta+\int \cos 2\theta\;d\theta$
On integrating we get
$I=-2\sin \theta+\theta+\frac{\sin 2\theta}{2}+c$
But $\sin \theta=\sqrt {1- \cos ^2 \theta}\; and \;\sin 2\theta=2\sin \theta\cos \theta$
$=2\sqrt{1-\cos ^2 \theta}.\cos \theta$
$I=-2\sqrt {1-\cos ^2 \theta}+\theta+\large\frac{2 \sqrt{1-\cos ^2 \theta}.\cos \theta}{2}+c$
Writing $\theta as\;\cos ^{-1}x\; and \; x=\cos ^2\theta$ we get,
$I=-2\sqrt {1-x}+cos^{-1}\sqrt x+\sqrt x \sqrt {1-x}+c$
$I=-2 \sqrt {1-x}+\cos ^{-1} \sqrt x +\sqrt {x-x^2}+c$