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
 A: 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.$$

A: Let $$I = \int\frac{1-x}{(1+x)\sqrt{x+x^2+x^3}}dx =\int\frac{(1-x^2)}{(x^2+2x+1)\sqrt{x+x^2+x^3}}dx$$
Now again Reaaranging we get $$I = -\int\frac{\left(1-\frac{1}{x^2}\right)}{\left(x+\frac{1}{x}+2\right)\sqrt{x+\frac{1}{x}+1}}dt$$
Now put $\displaystyle x+\frac{1}{x}+1=u^2\;,$ Then $\displaystyle \left(1-\frac{1}{x^2}\right)dt = 2udu$
So we get $$I = -2\int\frac{1}{u^2+1}du = -2\tan^{-1}(u)+\mathcal{C} = -2\tan^{-1}\left(\sqrt{x+\frac{1}{x}+1}\right)+\mathcal{C}.$$
