<s>[INST] How to solve this integral $I = \int\dfrac{\cos^3x}{\sin x + \cos x}dx$? $\displaystyle\int\dfrac{\cos^3x}{\sin x + \cos x}dx$
I added $J =\displaystyle \int\dfrac{\sin^3x}{\sin x + \cos x}dx$
then $I + J = \displaystyle\int\dfrac{\cos^3x + \sin^3x}{\sin x + \cos x}dx = x + \dfrac{1}{2}\cos2x + C$
but I can't find how to solve $I-J$
And is that the true way to solve it?
Please help!
 [/INST] If you use $\tan(x)=t$, you end with
$$I = \int\dfrac{\cos^3(x)}{\sin (x) + \cos (x)}dx=\int \frac{dt}{(t+1) \left(t^2+1\right)^2}$$ Using partial fraction decomposition
$$\frac{1}{(t+1) \left(t^2+1\right)^2}=\frac{1-t}{4 \left(t^2+1\right)}+\frac{1-t}{2 \left(t^2+1\right)^2}+\frac{1}{4
   (t+1)}$$ does not seem too bad.
</s>