Is integration of $x\operatorname{cosec}(x)$ defined? Is integration of $x\operatorname{cosec}(x)$ possible? If yes, then what is its closed form; if not, then why is it non-integrable ?

Using $u=\tan(x/2)$ so that $\sin(x)=\frac{2u}{1+u^2}$, $\mathrm{d}x=\frac{2\,\mathrm{d}u}{1+u^2}$
$$
\begin{align}
&\int\frac{x}{\sin(x)}\,\mathrm{d}x\\
&=2\int\frac{\arctan(u)}u\,\mathrm{d}u\\
&=2\sum_{k=0}^\infty(-1)^k\int\frac{u^{2k}}{2k+1}\,\mathrm{d}u\\
&=2\sum_{k=0}^\infty(-1)^k\frac{u^{2k+1}}{(2k+1)^2}+C\\
&=\frac{\mathrm{Li}_2(iu)-\mathrm{Li}_2(-iu)}i+C\\[6pt]
&=\frac{\mathrm{Li}_2(i\tan(x/2))-\mathrm{Li}_2(-i\tan(x/2))}i+C
\end{align}
$$
where $\mathrm{Li}_2(x)=\sum\limits_{k=1}^\infty\frac{x^k}{k^2}$
is the Dilogarithm Function.
