Skip to content
ihateDesmos

Derivative of cot x

Updated 6 November 2026 · Checked numerically by the ihateDesmos engine
The derivative of cot x
ddx(cot(x))=−csc(x)2

The derivative of cot x is −csc²x, which equals −1/sin²x. It is always negative, so the cotangent falls on every branch.

0.51.01.52.02.53.0−55
Open in calculator
y=cot(x)
in blue and its derivative
y=−csc(x)2
in red. Defined for x ≠ nπ.

How to find the derivative of cot x

Method: quotient rule.

  1. 1
    Write cot x as a fraction: cot x = cos x / sin x.
  2. 2
    Apply the quotient rule: (−sin x · sin x − cos x · cos x) / sin²x.
  3. 3
    Take out the minus sign: −(sin²x + cos²x) / sin²x.
  4. 4
    Use the identity sin²x + cos²x = 1: this is −1/sin²x.
  5. 5
    That is −csc²x.

What it means on the graph

At x = π/2 the slope is exactly −1, the gentlest it ever gets. Close to the asymptotes at multiples of π, sin x approaches 0, so the slope plunges toward −∞.

Table of values

The derivative column uses the formula. The last column estimates the slope directly from the original function, as an independent check.

Values of cot x and its derivative
xcot x−csc²xSlope, measured
1/21.83049−4.35069−4.35069
π/6√3−4−4
π/41−2−2
π/20−1−1
2−0.457658−1.20945−1.20945
13/5−1.66224−3.76305−3.76305

Second derivative

Differentiating once more gives:

d2dx2(cot(x))=2csc(x)2cot(x)

The second derivative tells you which way the graph bends: positive means it curves upward, and negative means it curves downward.

Related derivatives

The same result with the chain or product rule. Each of these is checked numerically too.

Related derivatives
FunctionDerivative
cot(3x)
−3csc(3x)2
xcot(x)
cot(x)−xcsc(x)2

Common mistakes

  • Dropping the minus sign.
  • Writing −csc x. The exponent is 2.

Frequently asked questions

What is the derivative of cot x?
The derivative of cot x is −csc²x, for x ≠ nπ.
What is the second derivative of cot x?
Differentiate −csc²x again to get the second derivative. The result is shown on this page under “Second derivative”.

Keep going

Differentiate any function

Type your own function into the derivative calculator and see every rule applied, step by step.

Open the derivative calculator