Answer
$$-\ln |\csc 2 x+\cot 2 x|+C $$
Work Step by Step
We integrate as follows:
\begin{align*}
\int \frac{\cot x}{\cos ^{2} x} d x&=\int \frac{\cos x}{\sin x} \cdot \frac{1}{\cos ^{2} x} d x\\
&=\int \frac{2}{2 \sin x \cos x} d x\\
&=\int \frac{2}{\sin 2 x} d x\\
&=\int 2\csc 2 x d x\\
&=-\ln |\csc 2 x+\cot 2 x|+C
\end{align*}