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[sec⁡2x]=2sec⁡2xtan⁡x\frac{d}{dx}\left[\sec^2 x\right] = 2\sec^2 x\tan x

How to differentiate sec^2 x

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

ddx(sec⁡x)2=2sec⁡x⋅ddx(sec⁡x)=2sec⁡x⋅sec⁡xtan⁡x=2sec⁡2xtan⁡x\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 2sin⁡xcos⁡3x\frac{2\sin x}{\cos^{3}x}, which is the version a calculator check will match.

Two checks that confirm the answer

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

ddxtan⁡x=sec⁡2x,d2dx2tan⁡x=2sec⁡2xtan⁡x\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 sec⁡2x=1+tan⁡2x\sec^{2}x = 1+\tan^{2}x means sec⁡2x\sec^{2}x and tan⁡2x\tan^{2}x differ by the constant 11, so the two have the same derivative. Differentiating tan⁡2x\tan^{2}x by the chain rule gives 2tan⁡xsec⁡2x2\tan x\sec^{2}x, the same expression.

Sign follows tan⁡x\tan x, so sec⁡2x\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 2sec⁡x2\sec x, applying the power rule to the outside and skipping the inner derivative sec⁡xtan⁡x\sec x\tan x.
  • Dropping the 22 and writing sec⁡2xtan⁡x\sec^{2}x\tan x. The square supplies that factor.
  • Confusing sec⁡2x\sec^{2}x with sec⁡(x2)\sec(x^{2}), whose derivative is 2xsec⁡(x2)tan⁡(x2)2x\sec(x^{2})\tan(x^{2}).
  • Reporting sec⁡2x\sec^{2}x again, which is the derivative of tan⁡x\tan x, not of sec⁡2x\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 sec⁡2x\sec^{2}x?

It is 2sec⁡2xtan⁡x2\sec^{2}x\tan x, equivalently 2sin⁡xcos⁡3x\frac{2\sin x}{\cos^{3}x}.

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

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

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

That is the reverse question, and the answer is tan⁡x+C\tan x + C, since ddxtan⁡x=sec⁡2x\frac{d}{dx}\tan x = \sec^{2}x. Differentiating sec⁡2x\sec^{2}x instead gives 2sec⁡2xtan⁡x2\sec^{2}x\tan x.