Help with indefinite integration I am learning indefinite integration, yet am having problems understanding and recognizing where to substitute what. a good trick is to attempt  convert algebraic expressions into trigonometric and vice versa. However, despite doing so, I am unable to solve the integral. For example, in attempting to integrate:
$$\sqrt\frac{1-\sqrt x}{1+ \sqrt x}$$
I substituted $x = \cos^2 t$ in order to convert it to a trigonometric equation. However, I am still unable to solve the integral. 
 A: Let 
\begin{align}
I = \int \sqrt{\frac{1 - \sqrt{x}}{1+\sqrt{x}}} \, dx
\end{align}
and make the substitution $x = t^{2}$ to obtain
\begin{align}
I = 2 \, \int \sqrt{\frac{1-t}{1+t}} \, t \, dt.
\end{align}
Now let $t = \cos(2\theta)$ to obtain
\begin{align}
I &= -4 \, \int \sqrt{\frac{1- \cos(2\theta)}{1+\cos(2\theta)}} \, \, \cos(2\theta) \,  \sin(2\theta) \, d\theta \\
&= -2 \, \int \sqrt{\frac{2 \sin^{2}\theta}{2 \cos^{2}\theta}} \, \sin(4\theta) \, d\theta \\
&= -2 \, \int \tan(\theta) \, \sin(4\theta) \, d\theta = 2 \theta - 2 \sin(2\theta) + \frac{\sin(4\theta)}{2}.
\end{align}
Reviewing the substitutions it is evident that $2\theta = \cos^{-1}(\sqrt{x})$ and that
\begin{align}
I = \cos^{-1}(\sqrt{x}) - 2 \, \sqrt{1-x} + \sqrt{x(1-x)} + c_{0}
\end{align}
A: HINT:
Clearly, $1+\sqrt x\ge1,1-\sqrt x\ge0\iff \sqrt x\le1$
$$\dfrac{1-\sqrt x}{1+\sqrt x}=\dfrac{(1-\sqrt x)^2}{(1+\sqrt x)(1-\sqrt x)}=\dfrac{(1-\sqrt x)^2}{1-x}$$
$\sqrt{(1-\sqrt x)^2}=+(1-\sqrt x)$ as $\sqrt x\le1$
Set $\sqrt{1-x}=y\implies x=1-y^2$ and $-\dfrac{dx}{2\sqrt{1-x}}=dy$
$\displaystyle \int\sqrt{\dfrac{1-\sqrt x}{1+\sqrt x}}dx=-2\int(1-\sqrt{1-y^2})dy=2\int\sqrt{1-y^2}dy-2\int dy$
See $\#8$ of this
