<s>[INST] How to integrate $ \int \frac{\sin {3x} + \cos{3x}}{ \sin^3 x + \cos^3 x } dx\ $ I want to know how to integrate this function I have tried many things many substitutions but none works.
I even try to expand the numerator by $\sin3x$ and $\cos3x$ properties and tried to convert higher powers to multiple angles
 [/INST] $$I=\int \frac{\sin {3x} + \cos{3x}}{ \sin^3 x + \cos^3 x } dx=\cdots=\int \frac{(\cos x -\sin x)(1+ 4\sin x \cos x)}{ (\sin x + \cos x)(1- \sin x\cos x) } dx$$
As $\dfrac{d(\sin x+\cos x)}{dx}=\cos x-\sin x$
if we choose $\sin x+\cos x=u, 2\sin x\cos x=u^2-1$
$$I=2\int\dfrac{1+2(u^2-1)}{u(2-(u^2-1))}du$$
Now use Partial Fraction Decomposition, $$\dfrac{2u^2-1}{u(3-u^2)}=\dfrac Au+\dfrac{Bu+C}{3-u^2}$$
$\implies3A=-1,B-A=2$
</s>