Math glossary

Derivative of Cot x: Formula, Proofs, and Examples

The derivative of cot x is negative cosecant squared. See the quotient and limit proofs, plus examples of the chain rule and domain checks.

TL;DR

The derivative of cotx\cot x is −csc2x-\csc^2x, using radians and excluding multiples of π\pi. For cot(g(x))\cot(g(x)), also multiply by the derivative of the inside function.

Key Points

  • Cotangent equals cosine divided by sine, so it is undefined where sine is zero.
  • The quotient rule gives a numerator of −sin2x−cos2x=−1-\sin^2x-\cos^2x=-1.
  • The derivative is negative wherever cotx\cot x is defined.
  • The chain rule can make the derivative of a composition positive, as with cot(5−x)\cot(5-x).

What is the derivative of cotangent?

For an angle xx in radians with sinx≠0\sin x\ne0, the derivative is

ddxcotx=−csc2x=−1sin2x.\frac{d}{dx}\cot x=-\csc^2x=-\frac1{\sin^2x}.

The symbol csc2x\csc^2x means (cscx)2(\csc x)^2. Both the function and its derivative exclude x=kπx=k\pi for every integer kk. OpenStax’s trigonometric derivatives chapter lists the rule and its relation to sine and cosine derivatives.

At x=π/2x=\pi/2, the derivative is −1-1. Cotangent is defined there since cos(π/2)/sin(π/2)=0/1\cos(\pi/2)/\sin(\pi/2)=0/1. This matters if you remember cotangent as 1/tanx1/\tan x, because tangent itself is undefined at π/2\pi/2. The trigonometry table shows the corresponding values and their domain conditions.

Cotangent branch between zero and pi with a downward tangent at pi over two and dashed vertical asymptotes
The cotangent graph decreases between consecutive excluded values. Its tangent at x=π/2x=\pi/2 has slope −1-1.

Why does the quotient rule give a negative sign?

Write cotx=cosx/sinx\cot x=\cos x/\sin x. The quotient rule takes the derivative of the numerator times the denominator, then subtracts the original numerator times the derivative of the denominator. The University of Nebraska–Lincoln’s calculus lesson applies this argument to the trigonometric quotients.

ddx(cosxsinx)=(−sinx)sinx−cosx(cosx)sin2x=−sin2x+cos2xsin2x=−csc2x.\frac{d}{dx}\left(\frac{\cos x}{\sin x}\right) =\frac{(-\sin x)\sin x-\cos x(\cos x)}{\sin^2x} =-\frac{\sin^2x+\cos^2x}{\sin^2x} =-\csc^2x.

The Pythagorean identity sin2x+cos2x=1\sin^2x+\cos^2x=1 simplifies the numerator. The negative sign remains outside the square. This is the same quotient-rule method used in the full trigonometric differentiation guide.

How can you derive it from first principles?

Start with the difference quotient. Fix an xx where sinx≠0\sin x\ne0, and take small hh so sin(x+h)≠0\sin(x+h)\ne0. The sine subtraction identity gives

cot(x+h)−cotx=cos(x+h)sinx−cosxsin(x+h)sin(x+h)sinx=−sinhsin(x+h)sinx.\cot(x+h)-\cot x =\frac{\cos(x+h)\sin x-\cos x\sin(x+h)} {\sin(x+h)\sin x} =-\frac{\sin h}{\sin(x+h)\sin x}.

Divide by hh and take the limit as h→0h\to0. The factor sinh/h\sin h/h tends to 1 when hh is in radians. Continuity sends sin(x+h)sinx\sin(x+h)\sin x to sin2x\sin^2x, so the result is −1/sin2x-1/\sin^2x. Grand Valley State’s calculus chapter and Penn State’s trigonometric derivative notes discuss the trig limits and identities used in these proofs.

How do you differentiate a cotangent with an inner function?

First apply the outside derivative. Then multiply by the derivative of the inside, as in OpenStax’s chain-rule chapter.

ddxcot(g(x))=−g′(x)csc2(g(x)).\frac{d}{dx}\cot(g(x)) =-g'(x)\csc^2(g(x)).

Assume gg is differentiable and sin(g(x))≠0\sin(g(x))\ne0. The outer function’s domain still matters, even when an inner derivative happens to vanish. The negative sign comes from cotangent. The sign of the full derivative also depends on g′(x)g'(x).

Function Derivative
cot(ax+b)\cot(ax+b) −acsc2(ax+b)-a\csc^2(ax+b)
cot(x2)\cot(x^2) −2xcsc2(x2)-2x\csc^2(x^2)
(cotx)2(\cot x)^2 −2cotxcsc2x-2\cot x\,\csc^2x

The last two rows use different outer functions. In cot(x2)\cot(x^2), the square is inside cotangent. In (cotx)2(\cot x)^2, the square is outside.

Examples of the Derivative of Cotangent

Example 1

Find the slope of y=cotxy=\cot x at x=π/4x=\pi/4.

  1. sin(π/4)=2/2\sin(\pi/4)=\sqrt2/2.
  2. Its square is 1/21/2.
  3. The slope is −1/(1/2)=−2-1/(1/2)=-2.

Example 2

Find the slope at x=π/2x=\pi/2.

  1. A reciprocal-tangent shortcut would give an undefined expression.
  2. Use the cotangent rule in terms of sine. Since sin(π/2)=1\sin(\pi/2)=1, the point belongs to the domain.
  3. The derivative is −1/12=−1-1/1^2=-1.

Example 3

Differentiate cot(3x)\cot(3x).

  1. The outer derivative is −csc2(3x)-\csc^2(3x).
  2. The inside derivative is 3.
  3. The answer is −3csc2(3x)-3\csc^2(3x), with x≠kπ/3x\ne k\pi/3.

Example 4

Differentiate y=cot(5−x)y=\cot(5-x).

  1. The derivative of the inside is −1-1.
  2. Multiply it by the outer derivative −csc2(5−x)-\csc^2(5-x).
  3. The two signs give y′=csc2(5−x)y'=\csc^2(5-x) where sin(5−x)≠0\sin(5-x)\ne0.

Example 5

Differentiate y=(cotx)2y=(\cot x)^2.

  1. The outer square has derivative 2cotx2\cot x with respect to its argument.
  2. Multiply by (cotx)′=−csc2x(\cot x)'=-\csc^2x.
  3. The result is −2cotxcsc2x-2\cot x\,\csc^2x.

Example 6

Differentiate f(x)=xcotxf(x)=x\cot x.

  1. Use the product rule because both factors depend on xx.
  2. Differentiate xx to get 1 and cotx\cot x to get −csc2x-\csc^2x.
  3. The result is f′(x)=cotx−xcsc2xf'(x)=\cot x-x\csc^2x on the original domain.

What mistakes can change the derivative?

Mistake 1: Copying the tangent derivative

The derivative of tanx\tan x is sec2x\sec^2x. Cotangent has the reciprocal quotient cosx/sinx\cos x/\sin x, and its quotient-rule numerator simplifies to −1-1. Keep the formulas separate.

Mistake 2: Forgetting the inner derivative

The derivative of cot(3x)\cot(3x) needs the factor 3. For cot(5−x)\cot(5-x), the inner factor −1-1 changes the overall sign.

Mistake 3: Including a vertical asymptote as a point with a very large slope

At a multiple of π\pi, the original function is undefined. The slope formula can grow in magnitude nearby, but there is no point of the graph there at which to assign a derivative.

Try It Yourself

  1. Differentiate cot(x2)\cot(x^2).
  2. Differentiate cot(x+π)\cot(x+\pi) and compare with cotx\cot x.
  3. Is the derivative of cotx\cot x ever zero on its real domain?

Answers and Reasoning

  1. The answer is −2xcsc2(x2)-2x\csc^2(x^2) if sin(x2)≠0\sin(x^2)\ne0.
  2. It is −csc2(x+π)=−csc2x-\csc^2(x+\pi)=-\csc^2x, because shifting sine by π\pi changes its sign and squaring removes that sign.
  3. No. The numerator in −1/sin2x-1/\sin^2x stays −1-1, and the denominator is positive on the domain.

Questions About Cotangent Differentiation

Does the formula assume radians?

Yes. When a variable dd is measured numerically in degrees, write cot(πd/180)\cot(\pi d/180) and apply the chain rule. The radians guide explains the conversion.

Why is cotangent decreasing only stated between its asymptotes?

Its derivative is negative on each interval (kπ,(k+1)π)(k\pi,(k+1)\pi), so it decreases throughout each such interval. The function jumps between branches across excluded points. A monotonicity statement on one interval does not extend across those gaps.

Conclusion

  • Differentiate real cotangent as −csc2x-\csc^2x where sinx≠0\sin x\ne0.
  • Use the sine denominator to check the original domain.
  • Apply the chain or product rule when cotangent appears inside a larger expression.

Read More

Research Behind This Article

  1. OpenStax, Calculus Volume 1: Derivatives of Trigonometric Functions. OpenStax
  2. University of Nebraska–Lincoln, Calculus: Derivatives of Other Trigonometric Functions. UNL
  3. Grand Valley State University, Active Calculus: Derivatives of Other Trigonometric Functions. GVSU
  4. Penn State, Math 140: Derivatives of Trigonometric Functions. Penn State
  5. OpenStax, Calculus Volume 1: The Chain Rule. OpenStax