Derivative of sec(x)

The derivative of the secant is $\dfrac{d}{dx}\sec x = \sec x\tan x = \dfrac{\sin x}{\cos^2 x}$, defined wherever $\cos x \neq 0$.

$$ \frac{d}{dx}\left(\sec x\right) = \sec x\tan x $$

See the derivative of sec(x) step by step in the calculator →

📈 Graph of sec(x) and its derivative

Graph of sec(x) (solid) and its derivative (dashed) −π−π/20π/2π−5−4−3−2−1012345 f(x) = sec xf′(x) = sec x · tan x
sec has U-shaped branches. At the bottom of the upper branch ($x = 0$) and the top of the lower branches ($x=\pm\pi$) the derivative is $0$; near the asymptotes $x = \pm\frac{\pi}{2}$ it becomes arbitrarily large.

🔍 Why is the derivative of sec(x) equal to $\sec x\tan x$?

Write $\sec x = (\cos x)^{-1}$ and use the chain rule:

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

🔗 Derivative of sec(x) with an inner function

If the argument is a function $u(x)$, the chain rule adds the inner derivative:

$$ \frac{d}{dx}\sec\big(u(x)\big) = u'(x)\sec\big(u(x)\big)\tan\big(u(x)\big) $$

✏️ Worked examples

FunctionDerivativeNote
$\sec(2x)$$2\sec(2x)\tan(2x)$ steps →
$\sec(x^2)$$2x\sec(x^2)\tan(x^2)$ steps →
$\ln|\sec x|$$\tan x$$\frac{\sec x\tan x}{\sec x}$ – so $\ln|\sec x|$ is an antiderivative of $\tan x$. steps →
$\sec x + \tan x$$\sec x(\tan x + \sec x)$Factor out $\sec x$. steps →

⚠️ Common mistakes

Writing $\tan x$ alone or $\sec^2 x$ – that is the derivative of $\tan x$.

Sign errors when differentiating $(\cos x)^{-1}$: the two minus signs cancel.

❓ Frequently asked questions

What is the derivative of 1/cos(x)?

$\frac{\sin x}{\cos^2 x}$, which is $\sec x\tan x$.

What is the derivative of sec²(x)?

$2\sec^2 x\tan x$ – see the separate page.

Where is the derivative of sec(x) zero?

Where $\tan x = 0$, i.e. at $x = k\pi$.