<s>[INST] Evaluate $\int\frac{dx}{(1+\sqrt{x})(x-x^2)}$ 
$$
\int\frac{dx}{(1+\sqrt{x})(x-x^2)}
$$

Set $\sqrt{x}=\cos2a\implies\dfrac{dx}{2\sqrt{x}}=-2\sin2a.da$
$$
\int\frac{dx}{(1+\sqrt{x})(x-x^2)}=\int\frac{dx}{(1+\sqrt{x})x(1-x)}=\int\frac{-4\sin2a\cos2a.da}{2\cos^2a.\cos^22a.\sin^22a}\\
=\int\frac{-2.\sec^2a.da}{\sin2a\cos2a}
$$
I think I am getting stuck here, is there a better substitution that I can chose so that the integral becomes more simple to evaluate ?
Solution as per my reference: $\dfrac{2(\sqrt{x}-1)}{\sqrt{1-x}}$
Note: I'd prefer to choose a substitution which does not make use of partial fractions, as there seems to be 4 terms for the substitution $\sqrt{x}=y\implies \frac{dx}{2\sqrt{x}}=dy$.
$$
I=\int\frac{dx}{(1+\sqrt{x})(x-x^2)}=\int\frac{dx}{(1+\sqrt{x})x(1-x)}\\
=\int\frac{2dy}{y(1+y)(1-y^2)}=\int\frac{2dy}{y(1+y)^2(1-y)}\\
\frac{2}{y(1+y)^2(1-y)}=\frac{A}{y}+\frac{B}{1-y}+\frac{C}{1+y}+\frac{D}{(1+y)^2}
$$
 [/INST] Note that there is an inconsistency. The solution you listed is not for the integral posted. The integral instead should be
$$
I=\int\frac{dx}{(1+\sqrt{x})\sqrt{x-x^2}}
$$
If so, first use the substitution $t=\sqrt x$ to rewrite it as 
$$I=\int\frac{2dx}{(1+t)\sqrt{1-t^2}}$$
Then, let $u=\frac{1-t}{1+t}$ and the integral simplifies to
$$I = - \int \frac{du}{\sqrt u} = -2\sqrt u +C $$
</s>