Evaluate $\int \frac{\sin^{3}x+\cos^{3}x}{\sin{x}\cos{x}}dx$ $$I = \int \frac{\sin^{3}x+\cos^{3}x}{\sin{x}\cos{x}}$$ 
Thought for a while but cannot seem to find how do i procced with this integral. 
Another variant of this problem is $$I = \int \frac{\sin^{3}x+\cos^{3}x}{\sin^{2}{x}\cos^{2}{x}}$$  where you just seperate the terms in numerator and it simplifies to $$I=\int \sec{x}\tan{x}dx+\int \csc{x}\cot{x}dx$$ which gives $$\sec{x}-\csc{x}+C$$ on integrating. 
But in this case it doesn't simplify into something straightforward. 
 A: Notice that
\begin{eqnarray}
\dfrac{\sin^3x+\cos^3x}{\sin x\cos x}&=&
\dfrac{\sin^3x}{\sin x\cos x}+
\dfrac{\cos^3x}{\sin x\cos x}\\
&=&\dfrac{\sin^2x}{\cos x}+\dfrac{\cos^2x}{\sin x}\\
&=&\dfrac{1-\cos^2x}{\cos x}+\dfrac{1-\sin^2x}{\sin x}\\
&=&\dfrac{1}{\cos x}-\dfrac{\cos^2x}{\cos x}+\dfrac{1}{\sin x}-\dfrac{\sin^2x}{\sin x}\\
&=&\dfrac{1}{\cos x}+\dfrac{1}{\sin x}-\cos x-\sin x
\end{eqnarray}
To compute the two integrals
$$
\int\dfrac{1}{\cos x}\,dx \text{  and } \int\dfrac{1}{\sin x}\,dx
$$
we use the substitution
$$
t=\tan\dfrac{x}{2} \text{ or equivalently } x=2\tan^{-1}t.
$$
Since
\begin{eqnarray}
\cos x&=&\dfrac{\cos^2\dfrac{x}{2}-\sin^2\dfrac{x}{2}}{\cos^2\dfrac{x}{2}+\sin^2\dfrac{x}{2}}=\dfrac{1-t^2}{1+t^2}\\
\sin x&=&\dfrac{2\sin\dfrac{x}{2}\cos\dfrac{x}{2}}{\cos^2\dfrac{x}{2}+\sin^2\dfrac{x}{2}}=\dfrac{2t}{1+t^2}\\
dx&=&\dfrac{2}{1+t^2}\,dt
\end{eqnarray}
we have
\begin{eqnarray}
\int\dfrac{1}{\cos x}\,dx&=&\int\dfrac{1+t^2}{1-t^2}\cdot\dfrac{2}{1+t^2}\,dt=\int\dfrac{2}{1-t^2}\,dt=\int\left(\dfrac{1}{1-t}+\dfrac{1}{1+t}\right)\,dt=\ln\left|\dfrac{1+t}{1-t}\right|+c_1\\
\int\dfrac{1}{\sin x}\,dx&=&\int\dfrac{1+t^2}{2t}\cdot\dfrac{2}{1+t^2}\,dt=\int\dfrac{1}{t}\,dt=\ln|t|+c_2
\end{eqnarray}
Hence
\begin{eqnarray}
\int\dfrac{\sin^3x+\cos^3x}{\sin x\cos x}\,dx&=&\int\left(\dfrac{1}{\cos x}+\dfrac{1}{\sin x}-\cos x-\sin x\right)\,dx\\
&=&\ln\left|\dfrac{1+\tan\dfrac{x}{2}}{1-\tan\dfrac{x}{2}}\right|+\ln\left|\tan\dfrac{x}{2}\right|-\sin x+\cos x+c
\end{eqnarray}
A: $$\int_{\ }^{ }\frac{\left(\sin\left(x\right)+\cos\left(x\right)\right)\left(1-\sin\left(x\right)\cos\left(x\right)\right)}{\sin\left(x\right)\cos\left(x\right)}dx=\int_{\ }^{ }\frac{\left(\left(\sin\left(x\right)+\cos\left(x\right)\right)\right)-\left(\sin\left(x\right)\cos\left(x\right)\right)\left(\sin\left(x\right)+\cos\left(x\right)\right)}{\sin\left(x\right)\cos\left(x\right)}dx=$$$$\int_{\ }^{ }\frac{\left(\sin\left(x\right)+\cos\left(x\right)\right)}{\sin\left(x\right)\cos\left(x\right)}dx-\int_{\ }^{ }\sin\left(x\right)+\cos\left(x\right)dx$$$$=\int_{\ }^{ }\frac{1}{\cos\left(x\right)}dx+\int_{\ }^{ }\frac{1}{\sin\left(x\right)}dx-\int_{\ }^{ }\sin\left(x\right)dx-\int_{\ }^{ }\cos\left(x\right)dx$$
$$=\ln\left(\left|\sec\left(x\right)+\tan\left(x\right)\right|\right)-\ln\left(\left|csx\left(x\right)+\cot\left(x\right)\right|\right)+\cos\left(x\right)-\sin\left(x\right)+C$$ 

notice that: $\ln\left(A\right)-\ln\left(B\right)=\ln\left(\frac{A}{B}\right)$ ($A,B>0$)

$$=\ln\left(\frac{\left|\sec\left(x\right)+\tan\left(x\right)\right|}{\left|csx\left(x\right)+\cot\left(x\right)\right|}\right)+\cos\left(x\right)-\sin\left(x\right)+C$$
A: \begin{align}
\sin^3x+\cos^3x
&=(\sin x+\cos x)(\sin^2x+\cos^2x-\sin x \cos x) \\
&=(\sin x+\cos )(1-\sin x \cos x)
\end{align}
Then
\begin{align}
I
&=\int \dfrac{(\sin x+\cos )(1-\sin x \cos x)}{\sin x \cos x}\,\mathrm{d}x \\
&=\int \dfrac{\sin x +\cos x}{\sin x \cos x}\,\mathrm{d}x-\int\,\mathrm{d}x \\
&=\int \sec x\,\mathrm{d}x+\int \csc x\,\mathrm{d}x-\int \,\mathrm{d}x \\
&=\ln \left| {\sec x+\tan x} \right|-\ln|\csc x+\cot x|-x+C \\
&=\ln \left| \dfrac{\sec x+\tan x}{\csc x+\cot x}\right|-x+C, \\
\end{align}
where $C$ is an arbitrary constant.
