# Derivative of cotangent

The following formula holds: $$\dfrac{\mathrm{d}}{\mathrm{d}z}\cot(z)=-\csc^2(z),$$ where $\cot$ denotes the cotangent and $\csc$ denotes the cosecant.
Apply the quotient rule to the definition of cotangent using derivative of sine and derivative of cosine to see $$\begin{array}{ll} \dfrac{\mathrm{d}}{\mathrm{d}z} \cot(z) &= \dfrac{\mathrm{d}}{\mathrm{d}x} \left[ \dfrac{\cos(z)}{\sin(z)} \right] \\ &= \dfrac{-\sin^2(z)-\cos^2(z)}{\sin^2(z)} \\ &= -\dfrac{\sin^2(z)+\cos^2(z)}{\sin^2(z)}. \end{array}$$ Now apply the Pythagorean identity for sin and cos and the definition of cosecant to see $$\dfrac{\mathrm{d}}{\mathrm{d}z} \cot(z) = -\dfrac{1}{\sin^2(z)} = -\csc^2(z),$$ as was to be shown. █