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

Proving it with the chain rule

Start from the definition of secant. Since sec⁡x=1cos⁡x=(cos⁡x)−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 1cos⁡x\frac{1}{\cos x} lands on the same result if you prefer that route.

ddx[(cos⁡x)−1]=−1⋅(cos⁡x)−2⋅(−sin⁡x)=sin⁡xcos⁡2x\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 cos⁡x\cos x contributes another, so the two cancel. Now regroup the single fraction into a product:

sin⁡xcos⁡2x=1cos⁡x⋅sin⁡xcos⁡x=sec⁡xtan⁡x\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 sec⁡x\sec x carries no leading minus sign, while its co-function csc⁡x\csc x does.

The co-function sign pattern

Notice there is no minus sign in sec⁡xtan⁡x\sec x \tan x. Set it beside its co-function: csc⁡x\csc x differentiates to −csc⁡xcot⁡x-\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
sec⁡x\sec xsec⁡xtan⁡x\sec x \tan x++
csc⁡x\csc x−csc⁡xcot⁡x-\csc x \cot x−-

So the sec and csc rules are mirror images. Keep sec⁡xtan⁡x\sec x \tan x in memory, then swap each factor for its co-function and attach a minus sign to recover csc⁡x→−csc⁡xcot⁡x\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 sec⁡x\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 sec⁡2x\sec^2 x. That is the derivative of tan⁡x\tan x, not of sec⁡x\sec x. Keep the pair straight: tan⁡x→sec⁡2x\tan x \to \sec^2 x and sec⁡x→sec⁡xtan⁡x\sec x \to \sec x \tan x.
  • Attaching a negative sign. The derivative of sec⁡x\sec x has no leading minus sign; the minus belongs to its co-function, csc⁡x→−csc⁡xcot⁡x\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 sec⁡x⋅tan⁡x\sec x \cdot \tan x; leaving off either sec⁡x\sec x or tan⁡x\tan x loses half of it.
  • Treating sec⁡x\sec x as 1sec⁡x\frac{1}{\sec x} or as an inverse function. Recall sec⁡x=1cos⁡x\sec x = \frac{1}{\cos x}, so its derivative comes from differentiating (cos⁡x)−1(\cos x)^{-1}, not from a reciprocal or an arcsecant rule.

Two worked chain-rule composites

Every composite runs off one template: ddxsec⁡u=sec⁡utan⁡u⋅u′\frac{d}{dx}\sec u = \sec u \tan u \cdot u', where u′u' 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. sec⁡2x\sec^2 x is the derivative of tan⁡x\tan x. The derivative of sec⁡x\sec x is sec⁡xtan⁡x\sec x \tan x, the product of secant and tangent. The two are easy to swap, so lock in the pair tan⁡x→sec⁡2x\tan x \to \sec^2 x and sec⁡x→sec⁡xtan⁡x\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 cos⁡x\cos x each contribute a minus sign, and the two cancel, so no minus sign survives. For csc⁡x=(sin⁡x)−1\csc x = (\sin x)^{-1} the inner derivative is +cos⁡x+\cos x, so nothing cancels and a leading minus sign remains: −csc⁡xcot⁡x-\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 cos⁡x=0\cos x = 0 there. At those points sec⁡x\sec x itself is undefined, so neither the function nor its derivative sec⁡xtan⁡x\sec x \tan x exists.