Calculation of $\displaystyle \int\frac{\sin^2 x\cos x}{ \sin x+\cos x}dx$ and $\displaystyle \int^{\pi}_{0}\frac{1}{1-2a\cos x+a^2}dx, ,0<a<1$
$\bf{Attempt}$ For (a) $\displaystyle \frac{1}{2}\int\frac{\sin^2 x\bigg[(\sin x+\cos x)+(\sin x-\cos x)\bigg]}{\sin x+\cos x}dx $
$\displaystyle =\frac{1}{4}\int (1+\cos 2x)dx+\frac{1}{2}\int \sin^2 x\frac{\sin x-\cos x}{\sin x+\cos x}dx$
could some help me how to solve $\displaystyle \int \sin^2 x\frac{\sin x-\cos x}{\sin x+\cos x}dx$
For (b) Can we solve it any geometrical way like taking unit circle . thanks