Evaluating $\int \cot x \csc^2x \,\mathrm{d}x$ with $u=\cot x$ $\newcommand{\d}{\mathrm{d}}$

Evaluate the integral using the indicated substituion. $$\int \cot x \csc^2x \,\d{x}, \qquad u= \cot x .$$

Differentiating both sides of $u$, then making the substitution: $$
\begin{align}
u &= 
\phantom{-}\cot x, \\
\d u &= -\cot x\csc x \,\d{x}, \\
\d x &= -\frac{\d u}{u \csc x}.
\end{align}$$
$$\int -\frac{u\csc^2 x \,\d{u}}{u\csc x} = \int -\csc x \,\d{u}. $$ 
Apparently, this was not an adequate approach, because $x$ is still part of the integrand. What should be done instead?

You have $du=-\csc^2x\,dx$, rather than your wrong differentiation. This implies the integral is
$$
\int\cot x\csc^2x\,dx=\int-u\,du=-\frac{1}{2}u^2+c=-\frac{1}{2}\cot^2x+c
$$
On the other hand, rewriting the integral as
$$
\int\frac{\cos x}{\sin^3x}\,dx=\int(\sin x)^{-3}d(\sin x)=-\frac{1}{2}\frac{1}{\sin^2x}+c
$$
is much easier.
