Integrate $\int \frac{\cos^2{x}}{(1 - \cos{x})\sin x} dx$
So far I have gotten here: $-\int -\frac{\cos^2 (x) \sin x}{(\cos (x) - 1)(\cos^2 (x)-1)} dx$
here I can substitute $u = \cos x$ , $ -\frac{du}{\sin x}= dx$ to get
$\int \frac{u^2}{(u-1)(u^2 -1)} du$
where I can do partial fraction decomposition, but is there a simpler way to find this integral? Maybe using some form of trigonometric substitution?
$$\begin{aligned}\int\dfrac{\cos^2x}{(1-\cos x)\sin x}\cdot\dfrac{1+\cos x}{1+\cos x}\mathrm dx&=\int\dfrac{\cos^2 x}{\sin^3x}\mathrm dx+\int\dfrac{\cos^3x}{\sin^3x}\mathrm dx\\&= \int \cot^2x\csc^2x\mathrm dx+\int\cot^3x\mathrm dx\\&=\dfrac{-1}{3}\cot^3x+\int\cot x(\csc^2x-1)\mathrm dx\end{aligned}$$
Let $\begin{bmatrix}u \\ \mathrm du\end{bmatrix}=\begin{bmatrix}\csc x \\ -\csc x\cot x\mathrm dx\end{bmatrix}$. Can you proceed?