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!

Reducing the degree may be also a good idea...
$$
\begin{aligned}
I &=
\int\frac{\cos^3x}{(\cos x + \sin x)}\;dx =
\int\frac{\cos^3x(\cos x - \sin x)}{(\cos x + \sin x)(\cos x - \sin x)}\;dx 
\\
&=
\int\frac{\cos^4x - \cos^3x\sin x}{\cos^2 x - \sin^2 x}\;dx 
=
\int\frac{(\cos^2x)^2}{\cos 2x }\;dx 
-
\int\frac{\cos^2x\cdot\sin x\cos x}{\cos2 x}\;dx 
\\
&=
\frac 14\int\frac{(1+\cos2x)^2}{\cos 2x }\;dx 
-
\frac 18\int\frac{(1+\cos2x)\cdot2\cdot 2\sin x\cos x}{\cos2 x}\;dx 
\\
&=\frac 14
\int\left(\frac1{\cos 2x }+2+\cos 2x\right)\;dx 
+
\frac 18\int\frac{(1+\cos2x)\cdot(\cos 2x)'}{\cos2 x}\;dx 
\\
&=
\left(\frac 1{16}\log\frac{1+\sin 2x}{1-\sin 2x}+\frac x2 +\frac 18\sin 2x\right)
+
\left(\frac 18\cos 2x+\frac 18\log\cos 2x\right)+\text{constant .}
\end{aligned}
$$
(Hope there is no computational error, but the idea to proceed is at any rate clear.)
(It turns out from where i am looking to the integral that introducing the "counterpart" $J$ is in the same time introducing a more complicated expression.)
