The function is .
Differentiate on each side with respect to .
.
Product rule of derivatives: .
Derivative of cosecant function: .
Derivative of cotangent function: .