Solve an integral $\int\frac{\cos^3 x}{\sin^3 x+\cos^3 x}dx$ Solve an integral $$\int\frac{\cos^3 x}{\sin^3 x+\cos^3 x}dx$$
I tried to divide the numerator and denominator by $\cos^4 x$ to get $\sec x$ function but the term ${\sin^3 x}/{\cos^4 x}$ gives $\tan^2 x\sec^2 x\sin x$. How to get rid of $\sin x$ term?

Let $$I = \int \frac{\cos^3x}{\sin^3x+\cos^3x} dx$$ $$I_1 = \int\frac{\sin^3x+\cos^3x}{\sin^3x+cos^3x}dx = x + C$$ and $$I_2 = \int\frac{\cos^3x-\sin^3x}{\sin^3x+\cos^3x}dx$$Then $$I = \frac{I_1 + I_2}{2}$$
$$I_2 = \int\frac{(\cos x-\sin x)(1+\frac{\sin2x}{2})}{(\sin x+\cos x)(1-\frac{\sin 2x}{2})}dx$$
Now substitute $$t = \sin x+\cos x$$
and you get $$dt = (\cos x- \sin x)dx$$ and $$\frac{\sin2x}{2} = \frac{t^2-1}{2}$$
Then $$I_2 = \int\frac{t^2+1}{t(3-t^2)}dt = \frac{\ln t - 2\ln(3-t^2)}{3} + C$$
Finally, when putting this back together : 
$$I = \frac{x}{2} + \frac{\ln(\sin x+\cos x)-2\ln(2-\sin2x)}{6} + C$$
