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}
$$
 A: Following @J.G's subbing 
$\sqrt{x}=y$ then $y=\frac{1-u}{1+u}$
$$I\int\frac{dx}{(1+\sqrt{x})(x-x^2)}=\int\frac{2}{y(1+y)(1-y^2)}dy=\frac12\int\frac{(1+u)^2}{u(u-1)}du$$
$$=-\frac12\int\left(\frac1u-\frac4{u-1}-1\right)du$$
A: 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 $$
A: You might have better luck with $y=\sqrt{x}$, provided you work with partial fractions. Something similar is achieved by continuing your current approach with $t=\tan a$, which amounts to starting with $\sqrt{x}=\frac{1-t^2}{1+t^2}$.
A: What's wrong with partial fractions? They are easy if you use the Heaviside method. If $\sqrt x=y$ then
$$\int\frac{dx}{\left(1+\sqrt x\right)\left(x-x^2\right)}=\int\frac{2dy}{y(1+y)^2(1-y)}$$
And if
$$\frac2{y(1+y)^2(1-y)}=\frac Ay+\frac B{1-y}+\frac C{1+y}+\frac D{(1+y)^2}$$
Then
$$\begin{align}A&=\left.\frac2{(1+y)^2(1-y)}\right|_{y=0}=2\\
B&=\left.\frac2{y(1+y)^2}\right|_{y=1}=\frac12\\
C&=\left.\frac d{dy}\frac2{y(1-y)}\right|_{y=-1}=\left.\frac{-2}{y^2(1-y)^2}(1-2y)\right|_{y=-1}=-\frac32\\
D&=\left.\frac2{y(1-y)}\right|_{y=-1}=-1\end{align}$$
So
$$\begin{align}\int\frac{dx}{\left(1+\sqrt x\right)\left(x-x^2\right)}&=\int\left(\frac 2y+\frac{1/2}{1-y}-\frac{3/2}{1+y}+\frac1{(1+y)^2}\right)dy\\
&=2\ln|y|-\frac12\ln|1-y|-\frac32\ln|1+y|-\frac1{1+y}+C_1\\
&=\ln x-\frac12\ln\left|1-\sqrt x\right|-\frac32\ln\left(1+\sqrt x\right)+\frac1{1+\sqrt x}+C_1\end{align}$$
So at this point maybe you can see your way through to a clever $u$-substitution to achieve this result.
