<s>[INST] Evaluate $\int \frac{1-x}{(1+x)\sqrt{x+x^2+x^3}}dx$ Evaluate $$\int \frac{1-x}{(1+x)\sqrt{x+x^2+x^3}}dx$$ i used substitution $x=\tan^2 y$ so $dx=2\tan y \sec^2 y dy$ so the integral becomes
$$I=\int\frac{2\cos 2y\: \tan y\: \sec^2 y \:dy}{\sqrt{\tan^2 y+\tan^4 y+\tan^6 y}}=\int\frac{2\cos 2y  \:\sec^2 y\: dy}{\sqrt{1+\tan^2 y+\tan^4 y}}$$ I was stuck here
 [/INST] This is the kind of solution that comes after the seventh cup of tea:
One can note that
$$
(1+x)^4=(1+x^2)^2+4(x+x^2+x^3),
$$
and so your integral equals
$$
\int\frac{(1-x)(1+x)^3}{\bigl((1+x^2)^2+4(x+x^2+x^3)\bigr)\sqrt{x+x^2+x^3}}\,dx
$$
or
$$
\int
\frac{1}{1+\Bigl(\frac{2\sqrt{x+x^2+x^3}}{1+x^2}\Bigr)^2}
\frac{(1-x)(1+x)^3}{(1+x^2)^2\sqrt{x+x^2+x^3}}
\,dx.
$$
Since
$$
D\frac{2\sqrt{x+x^2+x^3}}{1+x^2}=\frac{(1-x)(1+x)^3}{(1+x^2)^2\sqrt{x+x^2+x^3}}
$$
we finally find that

$$\int\frac{1-x}{(1+x)\sqrt{x+x^2+x^3}}\,dx=\arctan\biggl(\frac{2\sqrt{x+x^2+x^3}}{1+x^2}\biggr)+C.$$

</s>