# How to solve $\int\cot^5x\sin^2x\ dx$?

I'm not quite sure how to approach this without it getting extremely messy... and even then, I don't know if it will come out right.

The best I can think of is to use IBP, but neither of those functions are easy to integrate.

I did integrate $\sin^2x$ to get $$\int\sin^2x\ dx=\frac{2x+\sin{2x}}{4}+C$$

but I dare not try to go further as it looks like hell to apply IBP after this point.

I did consider converting $\cot^5x$ to $\displaystyle\frac{\cos^5x}{\sin^5x}$, but then I wasn't any better off...

$$\cot^5x\sin^2x=\frac{\cos^5x}{\sin^5x}\sin^2x=\cos^5x\csc^3x=\cos^2x\cot^3x$$

We have:

\begin{align} I = \int \cot^5 x \sin^2 x \,dx &= \int \frac{\cos^5 x}{\sin^5 x} \sin^2 x \,dx \\ &= \int \frac{\cos^5 x}{\sin^3 x} \,dx \\ &= \int \frac{\left(1 - \sin^2 x\right)^2}{\sin^3 x} \cos x \,dx \end{align}

Now put $u = \sin x$ to get:

\begin{align} I &= \int \frac{\left(1 - u^2\right)^2}{u^3} \,du \\ &= \int \left(u^{-3} -2 u^{-1} + u\right) \,du \\ &= -\frac{u^{-2}}{2} -2 \log\left|u\right| + \frac{u^2}{2} + C \end{align}

Put $u = \sin x$ to get the final result:

$$I = -\frac{\sin^{-2} x}{2} -2 \log\left|\sin x\right| + \frac{\sin^2 x}{2} + C$$