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
 A: $$ \int \frac{\sin {3x} + \cos{3x}}{ \sin^3 x + \cos^3 x } dx\ =\int \frac{3\sin x -4\sin^3x+4\cos^3x-3\cos x}{ \sin^3 x + \cos^3 x } dx=\int \frac{(\cos x -\sin x)(1+ 4\sin x \cos x)}{ (\sin x + \cos x)(1- \sin x\cos x) } dx=\int \frac{(\cos^2 x -\sin^2 x)(1+ 4\sin x \cos x)}{ (\sin x + \cos x)^2(1- \sin x\cos x) } dx=\int \frac{\cos 2x (1+ 2\sin 2x)}{ (1+ \sin 2x)(1- 0.5\sin 2x) } dx=0.5\int \frac{1+ 2\sin 2x}{ (1+ \sin 2x)(1- 0.5\sin 2x) } d(\sin 2x)$$ Hope you can finish from here.
A: Use 
\begin{equation}\cos\left(3x\right)=\cos^3\left(x\right)-3\cos\left(x\right)\sin^2\left(x\right)
\end{equation}
and
\begin{equation}
\sin\left(3x\right)=3\cos^2\left(x\right)\sin\left(x\right)-\sin^3\left(x\right) 
\end{equation}
accompanied with
\begin{align}
\sin\left(x\right)&=\dfrac{\tan\left(x\right)}{\sec\left(x\right)} \\
\cos\left(x\right)&=\dfrac{1}{\sec\left(x\right)} \\
\sec^2\left(x\right)&=\tan^2\left(x\right)+1 
\end{align}
You will get
\begin{equation}
{\int}{{\sec^2\left(x\right)}}{{\left(-\dfrac{\tan^3\left(x\right)+3\tan^2\left(x\right)-3\tan\left(x\right)-1}{\tan^5\left(x\right)+\tan^3\left(x\right)+\tan^2\left(x\right)+1}\right)}}\,\mathrm{d}x 
\end{equation}
Use the change of variable $u = \tan (x)$ then $dx = \frac{1}{\sec^2 (x)} du$, you will get
\begin{equation}
{\int}\dfrac{u^3+3u^2-3u-1}{u^5+u^3+u^2+1}\,\mathrm{d}u
\end{equation}
But
\begin{equation}
{\int}\dfrac{u^3+3u^2-3u-1}{u^5+u^3+u^2+1}\,\mathrm{d}u
={\int}\dfrac{u^3+3u^2-3u-1}{\left(u+1\right)\left(u^2+1\right)\left(u^2-u+1\right)}\,\mathrm{d}u
\end{equation}
Now perform partial fraction decomposition, we get
\begin{equation}
{\int}\dfrac{u^3+3u^2-3u-1}{u^5+u^3+u^2+1}\,\mathrm{d}u
={\int}\left(\dfrac{10u-5}{3\left(u^2-u+1\right)}-\dfrac{4u}{u^2+1}+\dfrac{2}{3\left(u+1\right)}\right)\mathrm{d}u
\end{equation}
That is
\begin{equation}
{\int}\dfrac{u^3+3u^2-3u-1}{u^5+u^3+u^2+1}\,\mathrm{d}u
=\dfrac{5}{3}\underbrace{{}{\int}\dfrac{2u-1}{u^2-u+1}\,\mathrm{d}u}_{\ln \vert u^2-u+1 \vert}-
\underbrace{{\int}\dfrac{u}{u^2+1}\,\mathrm{d}u}_{\dfrac{\ln\vert u^2+1\vert}{2}}+
{{\dfrac{2}{3}}} \underbrace{{\int}\dfrac{1}{u+1}\,\mathrm{d}u}_{\ln\vert u+1\vert}
\end{equation}
Finally plug back $u = \tan x$.
A: $$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$
