# Derivative of cot x: Formula, Proof and Examples

> The derivative of cot x is -csc²x. See the quotient rule proof, the -(1 + cot²x) form, the chain rule for cot(u) and examples like cot(2x).

Source: https://practicecalculus.com/derivatives/cot-x
Updated: 2026-11-06

$$ \frac{d}{dx}\,\cot x = -\csc^2 x $$

## At a glance

- **Derivative:** $-\csc^2 x$ for $x \ne k\pi$
- **Other forms:** $-\dfrac{1}{\sin^2 x} = -(1 + \cot^2 x)$
- **Chain rule form:** $\dfrac{d}{dx}\cot u = -\csc^2 u \cdot u'$
- **Slope at x = π/2:** $-\csc^2\frac{\pi}{2} = -1$
- **Integral version:** $\int \csc^2 x\,dx = -\cot x + C$

## Key takeaways

- The derivative of $\cot x$ is $-\csc^2 x$.
- It comes from the quotient rule on $\frac{\cos x}{\sin x}$ and $\sin^2 x + \cos^2 x = 1$.
- Since $-\csc^2 x \le -1$, $\cot x$ is decreasing on every interval where it is defined.
- With the chain rule, $\frac{d}{dx}\cot u = -\csc^2 u\cdot u'$.

The **derivative of $\cot x$ is $-\csc^2 x$**. It is the "co" partner of $\frac{d}{dx}\tan x = \sec^2 x$: swap to the co-functions and add a minus sign.

$$\frac{d}{dx}\,\cot x = -\csc^2 x$$

## Graph of cot x and its derivative

```graph
title: 'Graph of y = cot x and its derivative y = -csc²x'
caption: 'One branch of $\cot x$ on $(0, \pi)$. It always falls, and the slope is least steep at $x = \frac{\pi}{2}$, where it equals $-1$.'
x: [-0.3, 3.5]
y: [-8, 6]
functions:
  - expr: cot(x)
    label: y = cot x
    domain: [0.17, 2.97]
  - expr: -csc(x)^2
    label: y = -csc²x (derivative)
    dashed: true
    domain: [0.37, 2.77]
vertical:
  - x: 3.1416
    label: x = π
points:
  - [1.5708, 0, 'slope -1']
```

## Proof with the quotient rule

Write $\cot x = \frac{\cos x}{\sin x}$ and use the [quotient rule](/rules/quotient-rule):

$$\frac{d}{dx}\cot x = \frac{(-\sin x)\sin x - \cos x\cos x}{\sin^2 x} = \frac{-(\sin^2 x + \cos^2 x)}{\sin^2 x}$$

The top is $-1$, so

$$\frac{d}{dx}\cot x = -\frac{1}{\sin^2 x} = -\csc^2 x$$

## A second proof from tan x

Since $\cot x = (\tan x)^{-1}$, the [chain rule](/rules/chain-rule) and the [derivative of tan x](/derivatives/tan-x) give

$$-(\tan x)^{-2}\sec^2 x = -\frac{\cos^2 x}{\sin^2 x}\cdot\frac{1}{\cos^2 x} = -\frac{1}{\sin^2 x}$$

Same result. The identity $\csc^2 x = 1 + \cot^2 x$ also lets you write the answer as $-(1 + \cot^2 x)$.

## The chain rule version: derivative of cot(u)

$$\frac{d}{dx}\,\cot u = -\csc^2 u\cdot u'$$

| Function | Inside $u$ | Derivative |
| --- | --- | --- |
| $\cot(2x)$ | $2x$ | $-2\csc^2(2x)$ |
| $\cot(x^3)$ | $x^3$ | $-3x^2\csc^2(x^3)$ |
| $\cot\sqrt{x}$ | $\sqrt{x}$ | $-\frac{\csc^2\sqrt{x}}{2\sqrt{x}}$ |
| $\cot(\pi - x)$ | $\pi - x$ | $\csc^2(\pi - x)$ |

## Worked examples

**Example 1: a power.** $\frac{d}{dx}\cot^2 x = 2\cot x\cdot(-\csc^2 x) = -2\cot x\csc^2 x$.

**Example 2: a product.** $\frac{d}{dx}(x\cot x) = \cot x - x\csc^2 x$.

**Example 3: a value.** At $x = \frac{\pi}{4}$, $\csc\frac{\pi}{4} = \sqrt{2}$, so the slope is $-(\sqrt{2})^2 = -2$. The tangent line through $\left(\frac{\pi}{4}, 1\right)$ is $y = 1 - 2\left(x - \frac{\pi}{4}\right)$.

**Example 4: the log of sine.** $\frac{d}{dx}\ln(\sin x) = \frac{\cos x}{\sin x} = \cot x$. Differentiating again gives $-\csc^2 x$. This is why $\int\cot x\,dx = \ln\lvert\sin x\rvert + C$, see the [integral of cot x](/integrals/cot-x).

## How to remember it

Pair $\cot x$ with $\tan x$. The derivative of tangent is $\sec^2 x$. Swap each function for its "co" partner, tangent to cotangent and secant to cosecant, then put a minus sign in front. That gives $-\csc^2 x$ with no proof needed. The same swap works for every pair of trig derivatives, so you only need to memorize three of the six results. A quick graph check confirms the sign: each branch of cotangent falls from left to right, so its slope must always be negative. The steepness grows near the asymptotes at multiples of $\pi$, where $\csc^2 x$ blows up.

## Common mistakes

1. **Dropping the minus sign.** Cotangent always decreases, so its derivative must be negative.
2. **Writing $-\csc x\cot x$.** That is the [derivative of csc x](/derivatives/csc-x), a different result.
3. **Writing $-\sec^2 x$.** The square goes on cosecant, the partner of secant.

For the whole family in one place, read [derivatives of trig functions](/blog/derivatives-of-trig-functions).

## Frequently asked questions

### What is the derivative of cot x?

The derivative of $\cot x$ is $-\csc^2 x = -\frac{1}{\sin^2 x}$.

### How do you prove the derivative of cot x?

Write $\cot x = \frac{\cos x}{\sin x}$. The quotient rule gives $\frac{-\sin^2 x - \cos^2 x}{\sin^2 x} = -\frac{1}{\sin^2 x} = -\csc^2 x$.

### What is the derivative of cot(2x)?

By the chain rule, $-2\csc^2(2x)$.

### What is the derivative of cot²x?

It is $2\cot x\cdot(-\csc^2 x) = -2\cot x\csc^2 x$.
