Derivative of x cot x
Updated 6 November 2026 · Checked numerically by the ihateDesmos engine
The derivative of x cot x
ddx(xcot(x))=cot(x)−xcsc(x)2
The derivative of x cot x is cot x − x csc²x. It is a direct use of the product rule, with the derivative of cot x being −csc²x.
y=xcot(x)
in blue and its derivative y=cot(x)−xcsc(x)2
in red. Defined for x ≠ nπ.How to find the derivative of x cot x
Method: product rule.
- 1Use the product rule, with f = x and g = cot x.
- 2f′ = 1 and g′ = −csc²x.
- 3So the derivative is 1 · cot x + x · (−csc²x).
- 4That is cot x − x csc²x.
What it means on the graph
x cot x approaches 1 as x approaches 0, even though cot x itself blows up there. The function falls on each branch from x = 0 up to the asymptote at π.
Table of values
The derivative column uses the formula. The last column estimates the slope directly from the original function, as an independent check.
| x | x cot x | cot x − x csc²x | Slope, measured |
|---|---|---|---|
| 1/2 | 0.915244 | −0.344855 | −0.344855 |
| 1 | 0.642093 | −0.77019 | −0.77019 |
| π/2 | 0 | −π/2 | −π/2 |
| 2 | −0.915315 | −2.87656 | −2.87656 |
| 5/2 | −3.34662 | −8.3186 | −8.3186 |
Common mistakes
- Dropping the minus sign in the derivative of cot x.
Frequently asked questions
What is the derivative of x cot x?
The derivative of x cot x is cot x − x csc²x, for x ≠ nπ.
Keep going
Graph of cotangent: y = cot x
Period π, asymptotes at multiples of π, always decreasing.
Derivative of x ln x
It is ln x + 1.
Derivative of x eˣ
It is eˣ(x + 1).
Derivative of sin x cos x
It is cos 2x.
Derivative of x sin x
It is sin x + x cos x.
Derivative rules
The power, product, quotient and chain rules, with examples.
Differentiate any function
Type your own function into the derivative calculator and see every rule applied, step by step.