# Secant, Cosecant and Cotangent: Graphs, Derivatives, Integrals

> The reciprocal trig functions sec x, csc x and cot x: definitions, graphs, asymptotes, all three derivatives and integrals, with worked examples.

Source: https://practicecalculus.com/functions/reciprocal-trig-functions
Updated: 2026-11-03

$$ \sec x = \frac{1}{\cos x}, \quad \csc x = \frac{1}{\sin x}, \quad \cot x = \frac{\cos x}{\sin x} $$

## At a glance

- **Domain of sec x:** $x \ne \frac{\pi}{2} + k\pi$
- **Range of sec x:** $(-\infty, -1] \cup [1, \infty)$
- **Derivative:** $\sec x \tan x$
- **Integral:** $\ln\lvert\sec x + \tan x\rvert + C$
- **Periods:** $\sec$ and $\csc$: $2\pi$; $\cot$: $\pi$

## Key takeaways

- Secant, cosecant and cotangent are the reciprocals of cosine, sine and tangent.
- Each has vertical asymptotes where the function it is the reciprocal of equals zero.
- Derivatives: $(\sec x)' = \sec x\tan x$, $(\csc x)' = -\csc x\cot x$, $(\cot x)' = -\csc^2 x$.
- Integrals: $\int\sec x\,dx = \ln|\sec x + \tan x| + C$ and $\int\csc x\,dx = -\ln|\csc x + \cot x| + C$.

The **reciprocal trig functions** are secant, cosecant and cotangent. Each is one over a basic trig function: $\sec x = \frac{1}{\cos x}$, $\csc x = \frac{1}{\sin x}$ and $\cot x = \frac{1}{\tan x}$. They appear constantly in derivative and integral formulas, so even if you rarely graph them, you need their calculus facts.

## Definitions

$$\sec x = \frac{1}{\cos x}, \qquad \csc x = \frac{1}{\sin x}, \qquad \cot x = \frac{\cos x}{\sin x} = \frac{1}{\tan x}$$

A quick way to remember the pairing: each function on the left has exactly one "co" between it and its partner. Secant goes with **co**sine, **co**secant goes with sine.

| Function | Reciprocal of | Undefined where | Period | Range |
| --- | --- | --- | --- | --- |
| $\sec x$ | $\cos x$ | $x = \frac{\pi}{2} + k\pi$ | $2\pi$ | $\lvert y\rvert \ge 1$ |
| $\csc x$ | $\sin x$ | $x = k\pi$ | $2\pi$ | $\lvert y\rvert \ge 1$ |
| $\cot x$ | $\tan x$ | $x = k\pi$ | $\pi$ | all reals |

## Graphs of secant and cosecant

```graph
title: 'Graph of y = sec x with y = cos x for comparison'
caption: 'Where $\cos x = \pm 1$, $\sec x$ touches it. Where $\cos x \to 0$, $\sec x$ shoots off to an asymptote.'
x: [-4.6, 4.6]
y: [-5, 5]
functions:
  - expr: sec(x)
    label: y = sec x
  - expr: cos(x)
    label: y = cos x
    dashed: true
points:
  - [0, 1, '(0, 1)']
  - [3.1416, -1, '(π, −1)']
vertical:
  - {x: 1.5708, label: 'x = π/2'}
  - {x: -1.5708, label: 'x = −π/2'}
```

Secant is never between $-1$ and $1$: dividing $1$ by a number in $[-1, 1]$ always gives something at least $1$ in size. The cosecant graph is the same shape shifted right by $\frac{\pi}{2}$, with asymptotes at the multiples of $\pi$.

```graph
title: 'Graph of y = cot x with asymptotes at x = 0 and x = π'
caption: 'Cotangent falls from $\infty$ to $-\infty$ on each interval $(k\pi, (k+1)\pi)$ and crosses zero at $x = \frac{\pi}{2}$.'
x: [-3, 6.2]
y: [-5, 5]
functions:
  - expr: cot(x)
    label: y = cot x
points:
  - [1.5708, 0, '(π/2, 0)']
vertical:
  - {x: 0, label: 'x = 0'}
  - {x: 3.1416, label: 'x = π'}
```

## Derivatives of sec, csc and cot

| Function | Derivative |
| --- | --- |
| $\sec x$ | $\sec x\tan x$ |
| $\csc x$ | $-\csc x\cot x$ |
| $\cot x$ | $-\csc^2 x$ |

**Why $(\sec x)' = \sec x\tan x$.** Write $\sec x = (\cos x)^{-1}$ and use the [chain rule](/rules/chain-rule):

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

The same steps with $\sin x$ give $(\csc x)' = -\csc x\cot x$, and the [quotient rule](/rules/quotient-rule) on $\frac{\cos x}{\sin x}$ gives $(\cot x)' = \frac{-\sin^2 x - \cos^2 x}{\sin^2 x} = -\csc^2 x$.

## Integrals of sec, csc and cot

| Function | Integral |
| --- | --- |
| $\sec x$ | $\ln\lvert\sec x + \tan x\rvert + C$ |
| $\csc x$ | $-\ln\lvert\csc x + \cot x\rvert + C$ |
| $\cot x$ | $\ln\lvert\sin x\rvert + C$ |
| $\sec^2 x$ | $\tan x + C$ |
| $\csc^2 x$ | $-\cot x + C$ |
| $\sec x\tan x$ | $\sec x + C$ |
| $\csc x\cot x$ | $-\csc x + C$ |

**The secant integral.** Multiply top and bottom by $\sec x + \tan x$:

$$\int \sec x\,dx = \int \frac{\sec^2 x + \sec x\tan x}{\sec x + \tan x}\,dx$$

The numerator is exactly the derivative of the denominator, so with $u = \sec x + \tan x$ the integral is $\int\frac{du}{u} = \ln|\sec x + \tan x| + C$.

**The cotangent integral.** With $u = \sin x$, $\int\frac{\cos x}{\sin x}\,dx = \int\frac{du}{u} = \ln|\sin x| + C$.

## Worked examples

**Example 1.** Differentiate $f(x) = \sec(2x)$. By the chain rule, $f'(x) = 2\sec(2x)\tan(2x)$.

**Example 2.** Differentiate $g(x) = x\cot x$. By the [product rule](/rules/product-rule), $g'(x) = \cot x - x\csc^2 x$.

**Example 3.** Evaluate $\int_0^{\pi/3}\sec x\tan x\,dx$. The antiderivative is $\sec x$, so the answer is $\sec\frac{\pi}{3} - \sec 0 = 2 - 1 = 1$.

**Example 4.** Evaluate $\int \csc^2(5x)\,dx$. With $u = 5x$, the result is $-\frac{1}{5}\cot(5x) + C$.

## Common mistakes

1. **Mixing up reciprocals and inverses.** $\sec x = \frac{1}{\cos x}$, but $\cos^{-1}x$ means [arccosine](/functions/arccosine).
2. **Pairing secant with sine.** Secant is the reciprocal of cosine, and cosecant the reciprocal of sine.
3. **Losing the minus signs.** The derivatives of $\csc x$ and $\cot x$ are both negative.
4. **Guessing $\int\sec x\,dx = \sec x\tan x$.** That is the derivative, not the integral.

## Where you will use them

The identities $1 + \tan^2 x = \sec^2 x$ and $1 + \cot^2 x = \csc^2 x$ drive [trig substitution](/blog/trig-substitution), where $\sqrt{1 + x^2}$ becomes $\sec\theta$. Secant also shows up as the derivative of [tangent](/functions/tangent-function), $(\tan x)' = \sec^2 x$. For a side by side summary of all six trig derivatives, see [derivatives of trig functions](/blog/derivatives-of-trig-functions).

## Frequently asked questions

### What is the derivative of sec x?

The derivative of $\sec x$ is $\sec x\tan x$. Write $\sec x = (\cos x)^{-1}$ and use the chain rule: $-(\cos x)^{-2}(-\sin x) = \frac{1}{\cos x}\cdot\frac{\sin x}{\cos x}$.

### What is the integral of sec x?

The integral is $\int \sec x\,dx = \ln|\sec x + \tan x| + C$. The standard trick is to multiply by $\frac{\sec x + \tan x}{\sec x + \tan x}$, after which the numerator is the derivative of the denominator.

### What is the derivative of csc x and cot x?

The derivative of $\csc x$ is $-\csc x\cot x$ and the derivative of $\cot x$ is $-\csc^2 x$. Both carry a minus sign, like every derivative of a "co" function.

### Is sec x the same as the inverse of cos x?

No. $\sec x = \frac{1}{\cos x}$ is a reciprocal. The inverse function of cosine is $\arccos x$, sometimes written $\cos^{-1}x$, which is a different function.
