AP Calculus AB and BC

Derivative of sec x: Answer, Proof, and Mistakes

The derivative of sec x is sec x tan x. Write sec x as (cos x)^-1 and apply the chain rule: the outer power gives -(cos x)^-2 and the inner derivative of cos x is -sin x, so the two negatives cancel and leave sin x over cos^2 x, which regroups as sec x tan x.

ddx[secx]=secxtanx\frac{d}{dx}\left[\sec x\right] = \sec x \tan x

Proving it with the chain rule

Start from the definition of secant. Since secx=1cosx=(cosx)1\sec x = \frac{1}{\cos x} = (\cos x)^{-1}, the derivative is just a power of a function, so the chain rule (Topic 3.1) applies directly. The quotient rule (Topic 2.9) on 1cosx\frac{1}{\cos x} lands on the same result if you prefer that route.

ddx[(cosx)1]=1(cosx)2(sinx)=sinxcos2x\frac{d}{dx}\left[(\cos x)^{-1}\right] = -1\cdot(\cos x)^{-2}\cdot(-\sin x) = \frac{\sin x}{\cos^2 x}

The outer power rule contributes one negative sign and the derivative of the inner cosx\cos x contributes another, so the two cancel. Now regroup the single fraction into a product:

sinxcos2x=1cosxsinxcosx=secxtanx\frac{\sin x}{\cos^2 x} = \frac{1}{\cos x}\cdot\frac{\sin x}{\cos x} = \sec x \tan x

That cancellation is exactly why the derivative of secx\sec x carries no leading minus sign, while its co-function cscx\csc x does.

The co-function sign pattern

Notice there is no minus sign in secxtanx\sec x \tan x. Set it beside its co-function: cscx\csc x differentiates to cscxcotx-\csc x \cot x. Across all six trig derivatives, the three co-functions (cosine, cotangent, cosecant) are exactly the ones whose derivatives carry a leading negative sign.

Function f(x)f(x)Derivative f(x)f'(x)Leading sign
secx\sec xsecxtanx\sec x \tan x++
cscx\csc xcscxcotx-\csc x \cot x-

So the sec and csc rules are mirror images. Keep secxtanx\sec x \tan x in memory, then swap each factor for its co-function and attach a minus sign to recover cscxcscxcotx\csc x \to -\csc x \cot x. The full six-row table lives in the trig derivatives guide.

Where sec x shows up on the AP exam

The secant derivative is introduced in Unit 2 (Differentiation: Definition and Fundamental Properties), specifically Topic 2.10, Finding the Derivatives of Tangent, Cotangent, Secant, and/or Cosecant Functions. Unit 2 carries 10-15% of the AB exam and 5-10% of BC.

On the exam secx\sec x rarely stands alone. It usually appears inside a composite such as sec(2x)\sec(2x) or sec(x2)\sec(x^2), which pairs Topic 2.10 with the chain rule (Topic 3.1, Unit 3). It also turns up in tangent-line approximation (Unit 4, Topic 4.6) and related-rates work (Unit 4), where sec\sec and tan\tan show up together.

Common mistakes to avoid

  • Answering sec2x\sec^2 x. That is the derivative of tanx\tan x, not of secx\sec x. Keep the pair straight: tanxsec2x\tan x \to \sec^2 x and secxsecxtanx\sec x \to \sec x \tan x.
  • Attaching a negative sign. The derivative of secx\sec x has no leading minus sign; the minus belongs to its co-function, cscxcscxcotx\csc x \to -\csc x \cot x.
  • Dropping the inner derivative on composites. ddxsec(3x)=3sec(3x)tan(3x)\frac{d}{dx}\sec(3x) = 3\sec(3x)\tan(3x), not sec(3x)tan(3x)\sec(3x)\tan(3x). The chain rule factor is required.
  • Writing only one factor. The answer is the product secxtanx\sec x \cdot \tan x; leaving off either secx\sec x or tanx\tan x loses half of it.
  • Treating secx\sec x as 1secx\frac{1}{\sec x} or as an inverse function. Recall secx=1cosx\sec x = \frac{1}{\cos x}, so its derivative comes from differentiating (cosx)1(\cos x)^{-1}, not from a reciprocal or an arcsecant rule.

Two worked chain-rule composites

Every composite runs off one template: ddxsecu=secutanuu\frac{d}{dx}\sec u = \sec u \tan u \cdot u', where uu' is the derivative of whatever sits inside.

Linear inside. Let u=3xu = 3x, so u=3u' = 3.

ddxsec(3x)=sec(3x)tan(3x)3=3sec(3x)tan(3x)\frac{d}{dx}\sec(3x) = \sec(3x)\tan(3x)\cdot 3 = 3\sec(3x)\tan(3x)

Power inside. Let u=x2u = x^2, so u=2xu' = 2x.

ddxsec(x2)=sec(x2)tan(x2)2x=2xsec(x2)tan(x2)\frac{d}{dx}\sec(x^2) = \sec(x^2)\tan(x^2)\cdot 2x = 2x\sec(x^2)\tan(x^2)

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

Is the derivative of sec x equal to sec^2 x?

No. sec2x\sec^2 x is the derivative of tanx\tan x. The derivative of secx\sec x is secxtanx\sec x \tan x, the product of secant and tangent. The two are easy to swap, so lock in the pair tanxsec2x\tan x \to \sec^2 x and secxsecxtanx\sec x \to \sec x \tan x.

Why does the derivative of sec x have no minus sign, but csc x does?

In the proof, the power rule and the derivative of cosx\cos x each contribute a minus sign, and the two cancel, so no minus sign survives. For cscx=(sinx)1\csc x = (\sin x)^{-1} the inner derivative is +cosx+\cos x, so nothing cancels and a leading minus sign remains: cscxcotx-\csc x \cot x. This is the co-function sign pattern.

How do you differentiate sec(2x) or other composites?

Use the chain rule. Differentiate the outside as sec(inside)tan(inside)\sec(\text{inside})\tan(\text{inside}), then multiply by the derivative of the inside. For sec(2x)\sec(2x) the inside derivative is 22, giving 2sec(2x)tan(2x)2\sec(2x)\tan(2x).

Where is the derivative of sec x undefined?

At x=π2+nπx = \frac{\pi}{2} + n\pi (the odd multiples of π2\frac{\pi}{2}), because cosx=0\cos x = 0 there. At those points secx\sec x itself is undefined, so neither the function nor its derivative secxtanx\sec x \tan x exists.