<s>[INST] Indefinite integration : $\int \frac{1+x-x^2}{\sqrt{(1-x^2)^3}}$ Problem : 
Solve : $\int \frac{1+x-x^2}{\sqrt{(1-x^2)^3}}$
I tried : 
$\frac{1-x^2}{\sqrt{(1-x^2)^3}} + \frac{x}{\sqrt{(1-x^2)^3}}$
But it's not working....Please guide how to proceed 
 [/INST] you had a good guees! see
$$\int \frac{1+x-x^2}{(1-x^2)^{\frac{3}{2}}}dx = \int \frac{1-x^2}{(1-x^2)^{\frac{3}{2}}}+\frac{x}{(1-x^2)^{\frac{3}{2}}}dx
=\int (1-x^2)^{\frac{-1}{2}}dx+\int\frac{x}{(1-x^2)^{\frac{3}{2}}}dx$$
note that $[(1-x^2)^{\frac{-1}{2}}] '= -\frac{1}{2}(1-x^2)^\frac{-3}{2}(-2x)= \frac{x}{(1-x)^{\frac{3}{2}}}$ . Now let's us solve changing the variable $x= \sin t$ then $dx=\cos tdt$ therefore
$$\int (1-x^2)^{\frac{-1}{2}}dx=\int (1-\sin^2t)^{\frac{-1}{2}}\cos t \;dt=
\int \frac{\cos t}{cost} dt=\int dt=t =\arcsin x$$
So we get
$$\int \frac{1+x-x^2}{(1-x^2)^{\frac{3}{2}}}dx=\int (1-x^2)^{\frac{-1}{2}}dx+\int\frac{x}{(1-x^2)^{\frac{3}{2}}}dx=\frac{x}{(1-x)^{\frac{3}{2}}}+\arcsin x$$
</s>