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

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$.
