<s>[INST] calculation of $\int\frac{1}{\sin^3 x+\cos^3 x}dx$ and $\int\frac{1}{\sin^5 x+\cos^5x}dx$ 
Solve the following indefinite integrals:
$$
\begin{align}
&(1)\;\;\int\frac{1}{\sin^3 x+\cos^3 x}dx\\
&(2)\;\;\int\frac{1}{\sin^5 x+\cos^5 x}dx
\end{align}
$$

My Attempt for $(1)$:
$$
\begin{align}
I &= \int\frac{1}{\sin^3 x+\cos ^3 x}\;dx\\
&= \int\frac{1}{\left(\sin x+\cos x\right)\left(\sin^2 x+\cos ^2 x-\sin x \cos x\right)}\;dx\\
&= \int\frac{1}{\left(\sin x+\cos x\right)\left(1-\sin x\cos x\right)}\;dx\\
&= \frac{1}{3}\int \left(\frac{2}{\left(\sin x+\cos x\right)}+\frac{\left(\sin x+\cos x \right)}{\left(1-\sin x\cos x\right)}\right)\;dx\\
&= \frac{2}{3}\int\frac{1}{\sin x+\cos x}\;dx + \frac{1}{3}\int\frac{\sin x+\cos x}{1-\sin x\cos x}\;dx
\end{align}
$$
Using the identities
$$
\sin x = \frac{2\tan \frac{x}{2}}{1+\tan ^2 \frac{x}{2}},\;\cos x = \frac{1-\tan ^2 \frac{x}{2}}{1+\tan^2 \frac{x}{2}}
$$
we can transform the integral to
$$I = \frac{1}{3}\int\frac{\left(\tan \frac{x}{2}\right)^{'}}{1-\tan^2 \frac{x}{2}+2\tan \frac{x}{2}}\;dx+\frac{2}{3}\int\frac{\left(\sin x- \cos x\right)^{'}}{1+(\sin x-\cos x)^2}\;dx
$$
The integral is easy to calculate from here.
My Attempt for $(2)$:
$$
\begin{align}
J &= \int\frac{1}{\sin^5 x+\cos ^5 x}\;dx\\
&= \int\frac{1}{\left(\sin x+\cos x\right)\left(\sin^4 x -\sin^3 x\cos x+\sin^2 x\cos^2 x-\sin x\cos^3 x+\cos^4 x\right)}\;dx\\
&= \int\frac{1}{(\sin x+\cos x)(1-2\sin^2 x\cos^2 x-\sin x\cos x+\sin^2 x\cos^2 x)}\;dx\\
&= \int\frac{1}{\left(\sin x+\cos x\right)\left(1-\sin x\cos x-\left(\sin x\cos x\right)^2\right)}\;dx
\end{align}
$$
How can I solve $(2)$ from this point?
 [/INST] For the second integral, decompose the integrand as follows
\begin{align}
&\frac52\int\frac{1}{\sin^5 x+\cos^5 x}dx\\
=&\int\frac{2}{\sin x+\cos x}-\frac{\sin x + \cos x}{2\sin x\cos x-\sec\frac{\pi}5}
-\frac{\sin x + \cos x}{2\sin x\cos x -\sec\frac{3\pi}5}\ dx\\
=&\sqrt2\tanh^{-1}\frac {\sin x- \cos x}{\sqrt2}
-\frac{1}{\sqrt{1-\sec\frac{3\pi}5}}\tanh^{-1}\frac{\sin x- \cos x}{\sqrt{1-\sec\frac{3\pi}5}}\\
&\hspace{4.5cm} +\frac{1}{\sqrt{\sec\frac{\pi}5-1}}\tan^{-1}\frac{\sin x- \cos x}{\sqrt{\sec\frac{\pi}5-1}}
\end{align}
Specifically
\begin{align}
&\int_0^{\pi/2}
\frac{1}{\sin^5 x+\cos^5 x}dx\\
=&\ \frac45\bigg(\sqrt2\coth^{-1}\sqrt2
-\frac{\coth^{-1}\sqrt{\sqrt5+2}}{\sqrt{\sqrt5+2}} +\frac{\cot^{-1}\sqrt{\sqrt5-2}}{\sqrt{\sqrt5-2}}\bigg)
\end{align}
</s>