Derivative of sec²(x)

The derivative of $\sec^2 x = \dfrac{1}{\cos^2 x}$ is $\dfrac{d}{dx}\sec^2 x = 2\sec^2 x\tan x = \dfrac{2\sin x}{\cos^3 x}$. Because $\sec^2 x$ is itself the derivative of $\tan x$, this is also the second derivative of $\tan x$.

$$ \frac{d}{dx}\left(\sec^2 x\right) = 2\sec^2 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π−6−5−4−3−2−10123456 f(x) = sec² xf′(x) = 2 sec² x · tan x
$\sec^2 x$ is never below $1$ and has its minima at $x = k\pi$, where the derivative changes sign from negative to positive. Near the asymptotes $x = \pm\frac{\pi}{2}$ both curves grow without bound.

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

$\sec^2 x = (\sec x)^2$ – outer function $u^2$, inner function $\sec x$ with $(\sec x)' = \sec x\tan x$:

$$ (\sec^2 x)' = 2\sec x\cdot\sec x\tan x = 2\sec^2 x\tan x. $$

Alternatively with $(\cos x)^{-2}$: $\;-2(\cos x)^{-3}\cdot(-\sin x) = \frac{2\sin x}{\cos^3 x}$ – the same function.

🔗 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^2\big(u(x)\big) = 2u'(x)\sec^2\big(u(x)\big)\tan\big(u(x)\big) $$

✏️ Worked examples

FunctionDerivativeNote
$\sec^2(2x)$$4\sec^2(2x)\tan(2x)$Inner derivative $2$ times the factor $2$ from the square. steps →
$\tan^2 x$$2\sec^2 x\tan x$The same derivative as $\sec^2 x$, because $\sec^2 x = 1 + \tan^2 x$. steps →
$\frac{1}{\cos^2 x}$$\frac{2\sin x}{\cos^3 x}$Same function, written with cosine. steps →
$x\sec^2 x$$\sec^2 x + 2x\sec^2 x\tan x$Product rule. steps →

⚠️ Common mistakes

Writing $2\sec x\tan x$ – one factor $\sec x$ is missing.

Thinking $\sec^2 x$ means $\sec(x^2)$.

❓ Frequently asked questions

What is the second derivative of tan(x)?

$(\tan x)'' = (\sec^2 x)' = 2\sec^2 x\tan x$.

Why do sec²(x) and tan²(x) have the same derivative?

Because $\sec^2 x - \tan^2 x = 1$ is constant.

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

$\frac{2\sin x}{\cos^3 x} = 2\sec^2 x\tan x$.