AP Calculus AB and BC

Derivative of sec^2 x: Answer, Proof, and Mistakes

The derivative of sec^2 x is 2 sec^2(x) tan(x). In prime notation, if f(x) = sec^2 x then f'(x) = 2 sec^2(x) tan(x). Read sec^2 x as (sec x)^2 and use the chain rule: 2 sec x times the derivative of sec x, which is sec x tan x.

ddx[sec2x]=2sec2xtanx\frac{d}{dx}\left[\sec^2 x\right] = 2\sec^2 x\tan x

How to differentiate sec^2 x

The notation sec2x\sec^2 x means (secx)2(\sec x)^2, so the outer function is the square and the inner function is secx\sec x. The chain rule needs the standard fact ddxsecx=secxtanx\frac{d}{dx}\sec x = \sec x\tan x.

ddx(secx)2=2secxddx(secx)=2secxsecxtanx=2sec2xtanx\frac{d}{dx}(\sec x)^{2} = 2\sec x\cdot\frac{d}{dx}(\sec x) = 2\sec x\cdot\sec x\tan x = 2\sec^{2}x\tan x

In cosine form the same answer reads 2sinxcos3x\frac{2\sin x}{\cos^{3}x}, which is the version a calculator check will match.

Two checks that confirm the answer

First check: sec2x\sec^{2}x is itself the derivative of tanx\tan x, so this result is the second derivative of tangent.

ddxtanx=sec2x,d2dx2tanx=2sec2xtanx\frac{d}{dx}\tan x = \sec^{2}x, \qquad \frac{d^{2}}{dx^{2}}\tan x = 2\sec^{2}x\tan x

Second check: the Pythagorean identity sec2x=1+tan2x\sec^{2}x = 1+\tan^{2}x means sec2x\sec^{2}x and tan2x\tan^{2}x differ by the constant 11, so the two have the same derivative. Differentiating tan2x\tan^{2}x by the chain rule gives 2tanxsec2x2\tan x\sec^{2}x, the same expression.

Sign follows tanx\tan x, so sec2x\sec^{2}x decreases on (π2,0)\left(-\frac{\pi}{2},0\right), bottoms out at 11 when x=0x=0, and increases on (0,π2)\left(0,\frac{\pi}{2}\right).

Common mistakes with the derivative of sec^2 x

  • Answering 2secx2\sec x, applying the power rule to the outside and skipping the inner derivative secxtanx\sec x\tan x.
  • Dropping the 22 and writing sec2xtanx\sec^{2}x\tan x. The square supplies that factor.
  • Confusing sec2x\sec^{2}x with sec(x2)\sec(x^{2}), whose derivative is 2xsec(x2)tan(x2)2x\sec(x^{2})\tan(x^{2}).
  • Reporting sec2x\sec^{2}x again, which is the derivative of tanx\tan x, not of sec2x\sec^{2}x.

Check yourself, not just the answer

Type derivatives and get graded on mathematical equivalence, with rule-level hints when you miss, in the Derivative Practice Checker.

Frequently asked questions

What is the derivative of sec2x\sec^{2}x?

It is 2sec2xtanx2\sec^{2}x\tan x, equivalently 2sinxcos3x\frac{2\sin x}{\cos^{3}x}.

Is the derivative of tan2x\tan^{2}x the same?

Yes, it is also 2tanxsec2x2\tan x\sec^{2}x. The identity sec2x=1+tan2x\sec^{2}x = 1+\tan^{2}x means the two functions differ by the constant 11, and constants differentiate away.

What is sec2xdx\int \sec^{2}x\,dx?

That is the reverse question, and the answer is tanx+C\tan x + C, since ddxtanx=sec2x\frac{d}{dx}\tan x = \sec^{2}x. Differentiating sec2x\sec^{2}x instead gives 2sec2xtanx2\sec^{2}x\tan x.