DerivCalc
Written by SilverCodeLabs · Mathematically reviewed · Published October 21, 2026 · How answers are verified

Derivative of cot(x)

Cotangent is cosine over sine. The quotient rule produces sin²+cos² in the numerator, and the Pythagorean identity reduces it to a single term.

Answer
−csc²(x)
Differentiate with respect to x
Try cot(x) in the calculator →

Step-by-step solution

1
Write as a quotient

cot(x)=cos(x)/sin(x). The numerator's derivative is −sin(x); the denominator's derivative is cos(x).

2
Apply the quotient rule

f′(x)=[(−sin x)(sin x)−(cos x)(cos x)]/sin²(x)=−[sin²(x)+cos²(x)]/sin²(x).

3
Use the Pythagorean identity

sin²+cos²=1, so f′(x)=−1/sin²(x)=−csc²(x).

Domain and graph behavior

cot(x) and its derivative exist wherever sin(x)≠0, so x≠kπ. Since |csc(x)|≥1, the derivative −csc²(x) is always at most −1: cotangent is strictly decreasing on every interval (kπ, (k+1)π) and its slope is never shallower than −1. The slope equals −1 exactly at x=π/2+kπ, where the graph crosses zero; at x=π/2 the tangent line is y=−(x−π/2).

Second derivative

Differentiate −csc²(x) with the chain rule: f″(x)=−2csc(x)·(−csc(x)cot(x))=2csc²(x)cot(x). It is zero where cot(x)=0, so (π/2, 0) is an inflection point: the graph is concave up on (0, π/2) and concave down on (π/2, π).

Common mistake

Do not copy the tangent rule and write sec²(x) or +csc²(x). The minus sign comes from the quotient rule's order—derivative of the top times the bottom, minus the top times the derivative of the bottom. Reversing that order flips the sign.

Practice problems

Differentiate cot(4x)

Answer: −4csc²(4x): multiply by the inner derivative 4.

Differentiate cot(x)+tan(x)

Answer: sec²(x)−csc²(x): differentiate each term separately.

A second route through the reciprocal

cot(x) is also 1/tan(x)=(tan x)^(−1). The chain rule gives −(tan x)^(−2)·sec²(x)=−sec²(x)/tan²(x)=−[1/cos²(x)]·[cos²(x)/sin²(x)]=−1/sin²(x). The same answer from a different starting point is a useful self-check on exams.

An equivalent form: −(1+cot²x)

Because csc²=1+cot², the derivative can be written −1−cot²(x). If y=cot(x), then y′=−(1+y²). This is the same differential relationship that produces d/dx arccot(x)=−1/(1+x²) through the inverse-function rule, which is why the arccotangent derivative looks like the arctangent derivative with a minus sign.

A numerical check

At x=π/4, csc²=2, so f′(π/4)=−2. A centered secant [cot(π/4+h)−cot(π/4−h)]/(2h) with h=0.0001 returns −2.00000. At x=π/6, csc=2, giving −4, which the secant also reproduces. Near x=0 the slope becomes arbitrarily steep, matching the vertical asymptote.

More worked variations

cot(x²): the inner derivative 2x gives −2x·csc²(x²).

cot²(x): 2cot(x)·(−csc²(x))=−2cot(x)csc²(x).

ln(sin x): cos(x)/sin(x)=cot(x). Cotangent is the derivative of ln|sin x|, which is why ∫cot(x)dx=ln|sin x|+C.

Questions students ask

Is −csc²(x) the same as −1/sin²(x)?

Yes. csc(x)=1/sin(x), so squaring and negating gives the same expression wherever sin(x)≠0.

Can the derivative of cot(x) ever be zero?

No. csc²(x)≥1 everywhere it is defined, so −csc²(x)≤−1. Cotangent has no horizontal tangent lines.

Related trigonometric derivatives

tan(x)csc(x)sec(x)sin(x)cos(x)

Review the trigonometric derivatives guide and the quotient rule, or read our verification method and limitations.