Approach that I have tried:
$u = x$ $\to$ $u' = 1$
$v'= \cot x\to v = \ln(\sin x)$
$$\int x\cot^2x\,dx=x\ln(\sin x)-\int\ln(\sin x)\,dx$$
And from there, I have a problem, because solving for integral of ln(sinx) gives complicated results with I doubt give correct final answer. I would appreciate your help.