Proof. We want to determine the integral of \cot^2(x):
\begin{align*} \int \cot^2(x) dx. \end{align*}
\begin{align*} \int \cot^2(x) dx &= \int (\csc^2(x) - 1)dx \\ &= \int \csc^2(x)dx - \int 1\cdot dx. \end{align*}
\begin{align*} \int \cot^2(x) dx &= \int (\csc^2(x) - 1)dx \\ &= \int \csc^2(x)dx - \int 1\cdot dx \\ &= -\cot(x) - x + C. \end{align*}