Is there an elegant way to solve $\int \frac{(\sin^2(x)\cdot \cos(x))}{\sin(x)+\cos(x)}dx$? The integral is:
$$\int \frac{(\sin^2(x)\cdot \cos(x))}{\sin(x)+\cos(x)}dx$$
I used weierstraß substitution 
$$t:=\tan(\frac{x}{2})$$
$$\sin(x)=\frac{2t}{1+t^2}$$
$$\cos(x)=\frac{1-t^2}{1+t^2}$$
$$dx=\frac{2}{1+t^2}dt$$
Got this:
$$\int \frac{8t^4-8t^2}{t^8−2t^7+2t^6−6t^5−6t^3−2t^2−2t−1}dt$$
and with partial fraction expansion the final answer is:
$$\frac{1}{4}[\ln(\sin(x)+\cos(x))-\cos(x)*(\sin(x)+\cos(x))]+C$$
It is a long way and I am very convinced, there is a shorter way, maybe you know one? Thanks

If you multiply numerator and denominator by $\cos x-\sin x$, the numerator can be rewritten as
$$
\sin x\cos x(\sin x\cos x-\sin^2x)
$$
Now use $\sin x\cos x=\frac{1}{2}\sin 2x$ and
$$
\sin^2x=\frac{1-\cos2x}{2}
$$
so finally we get
$$
\frac{1}{4}\sin2x(\sin2x-1+\cos2x)=
\frac{1}{4}(1-\cos^22x-\sin2x+\sin2x\cos2x)
$$
and the integral becomes
$$
\frac{1}{4}\int\left(
  \frac{1}{\cos2x}-\frac{\sin2x}{\cos2x}-\cos2x+\sin2x
\right)\,dx
$$
that should pose little problems.
