integrate $\int \frac{\sin^3x \cos^2x}{1+\sin^2x}dx$ 
$$\int \frac{\sin^3x \cos^2x}{1+\sin^2x}dx$$

$$\int \frac{\sin^3x \cos^2x}{1+\sin^2x}dx=\int \frac{\sin^2x \cos^2x  \sin x }{1+\sin^2x}dx=\int \frac{(1-\cos^2x )\cos^2x  \sin x }{1+1-\cos^2x}dx=\int \frac{(1-\cos^2x )\cos^2x  \sin x }{2-\cos^2x}dx$$
$u=cosx$ 
$du=-sinxdx$
$$-\int \frac{(1-u^2 )u^2}{2-u^2}du=\int \frac{u^4-u^2 }{2-u^2}du$$
Polynomial division give us 
$$\int-u^2-1+\frac{2}{u^2-2}du=-\frac{u^3}{3}-u=2\int \frac{1}{u^2-2}du$$
Using partial fraction we get to:
$$\frac{1}{u^2-2}=\frac{1}{(u+\sqrt{2})(u^2-\sqrt{2})}=\frac{A}{u^2+\sqrt{2}}+\frac{B}{u^2-\sqrt{2}}$$
So we get to:
$$1=(A+B)u^2+\sqrt{2}(A-B)$$
So $A=B$ but $0*\sqrt{2}\neq 1$, where did it go wrong?
 A: Consider
$$
\frac{t^2-t}{2-t}=(-1-t)+\frac{2}{2-t}
$$
so your integral is
$$
\int\left(-\frac{2}{u^2-2}-u^2-1\right)\,du
$$
and your reduction is (almost) good, but a sign went wrong. Now your computation of partial fractions is really messed up:
$$
\frac{2}{u^2-2}=\frac{A}{u-\sqrt{2}}+\frac{B}{u+\sqrt{2}}
$$
so you get
$$
\begin{cases}
A+B=0\\[6px]
A\sqrt{2}-B\sqrt{2}=2
\end{cases}
$$
so $A=1/\sqrt{2}$ and $B=-1/\sqrt{2}$.
A: The decomposition in partial fractions should be
$$\frac{1}{u^2-2}==\frac{A}{u +\sqrt{2}}+\frac{B}{u -\sqrt{2}}.$$
But every one should know that
$$\int\frac1{a^2-x^2}\,\mathrm d x=\frac1{2a}\ln\biggl\lvert\frac{x+a}{x-a}\biggr\rvert=\frac1a\,\operatorname{argtanh}\Bigl(\frac xa\Bigr).$$
A: $$\int\frac{\sin^3(x)\cos^2(x)}{1+\sin^2(x)}\space\text{d}x=$$

Use $\sin^2(x)=1-\cos^2(x)$:

$$-\int\frac{\sin(x)(\cos^2(x)-\cos^4(x))}{\cos^2(x)-2}\space\text{d}x=$$

Substitute $u=\cos(x)$ and $\text{d}u=-\sin(x)\space\text{d}x$:

$$\int\frac{u^2-u^4}{u^2-2}\space\text{d}u=$$

Use long division:

$$-\int\left[u^2+1+\frac{2}{u^2-2}\right]\space\text{d}u=$$
$$-\left[\int u^2\space\text{d}u+\int1\space\text{d}u+2\int\frac{1}{u^2-2}\space\text{d}u\right]=$$
$$-\left[\frac{u^3}{3}+u-\int\frac{1}{1-\frac{u^2}{2}}\space\text{d}u\right]=$$

Substitute $s=\frac{u}{\sqrt{2}}$ and $\text{d}s=\frac{1}{\sqrt{2}}\space\text{d}u$:

$$-\left[\frac{u^3}{3}+u-\sqrt{2}\int\frac{1}{1-s^2}\space\text{d}s\right]=$$
$$-\left[\frac{u^3}{3}+u-\sqrt{2}\text{arctanh}(s)\right]+\text{C}=$$
$$-\left[\frac{\cos^3(x)}{3}+\cos(x)-\sqrt{2}\text{arctanh}\left(\frac{\cos(x)}{\sqrt{2}}\right)\right]+\text{C}$$
A: Observe that, $$\displaystyle\int\dfrac{\sin^3 x\cos^2 x}{1+\sin^2 x}dx=\displaystyle\int\dfrac{\sin^3 x}{1+\sin^2 x}dx-\displaystyle\int\dfrac{\sin^5 x}{1+\sin^2 x}dx$$

Transformation of $\displaystyle\int\dfrac{\sin^3 x}{1+\sin^2 x}dx$

Observe that $\cos^2 x=z\implies \sin x\ dx=-\dfrac{dz}{2}$. Then the integral becomes, $$\displaystyle\int\dfrac{\sin^3 x}{1+\sin^2 x}dx=-\dfrac{1}{2}\displaystyle\int\dfrac{1-z}{2-z}dz$$

Transformation of $\displaystyle\int\dfrac{\sin^5 x}{1+\sin^2 x}dx$

Observe that $\cos^2 x=z\implies \sin x\ dx=-\dfrac{dz}{2}$. Then the integral becomes, $$\displaystyle\int\dfrac{\sin^5 x}{1+\sin^2 x}dx=-\dfrac{1}{2}\displaystyle\int\dfrac{(1-z)^2}{2-z}dz$$

I hope you can evaluate both the integrals easily.
