Example 5. Find the integral $\int \operatorname{ctg}^{2} x d x$.
$$
\begin{gathered}
\int \operatorname{ctg}^{2} x d x=\int\left(\operatorname{cosec}^{2} x-1\right) d x=\int \operatorname{cosec}^{2} x d x-\int d x= \\
=\int \frac{1}{\sin ^{2} x} d x-\int d x=-\operatorname{ctg} x-x+C
\end{gathered}
$$

Translation:

$$
\begin{gathered}
\int \cot^{2} x \, dx = \int \left(\csc^{2} x - 1\right) \, dx = \int \csc^{2} x \, dx - \int \, dx = \\
= \int \frac{1}{\sin^{2} x} \, dx - \int \, dx = -\cot x - x + C
\end{gathered}
$$