practicecalculus
Trigonometric derivatives

Derivative of sec²x: Formula, Proof and Examples

The derivative of sec²x is 2sec²x tan x. See two proofs, one with the chain rule and one with 1 + tan²x, plus examples like sec²(3x).

Trigonometric derivatives Updated 2 min read

At a glance

\frac{d}{dx}\,\sec^2 x = 2\sec^2 x\tan x
Derivative
2\sec^2 x\tan x for x \ne \frac{\pi}{2} + k\pi
In sin and cos
\dfrac{2\sin x}{\cos^3 x}
Chain rule form
\dfrac{d}{dx}\sec^2 u = 2\sec^2 u\tan u\cdot u'
Relation to tan x
\sec^2 x is the derivative of \tan x, so this is \frac{d^2}{dx^2}\tan x
Integral of sec²x
\int \sec^2 x\,dx = \tan x + C
On this page
  1. Graph of sec²x and its derivative
  2. Proof 1: chain rule on (sec x)²
  3. Proof 2: using 1 + tan²x
  4. Proof 3: in terms of cos x
  5. Why this is the second derivative of tan x
  6. Chain rule variants
  7. Where you will meet it
  8. Common mistakes

The derivative of \sec^2 x is 2\sec^2 x\tan x. Read \sec^2 x as (\sec x)^2, then apply the chain rule once.

\frac{d}{dx}\,\sec^2 x = 2\sec^2 x\tan x

Graph of sec²x and its derivative

Graph of y = sec²x and its derivative y = 2sec²x tan x
The U-shaped branch of \sec^2 x has its minimum at x = 0, where the derivative crosses zero.

Proof 1: chain rule on (sec x)²

The outer function is the square, the inner function is \sec x. Using the chain rule and the derivative of sec 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

Proof 2: using 1 + tan²x

The identity \sec^2 x = 1 + \tan^2 x gives a second route. The 1 drops out, and \tan^2 x is a square of \tan x:

\frac{d}{dx}\left(1 + \tan^2 x\right) = 2\tan x\cdot\sec^2 x

Both routes agree, which is a good check on the identity.

Proof 3: in terms of cos x

\sec^2 x = (\cos x)^{-2}, so

\frac{d}{dx}(\cos x)^{-2} = -2(\cos x)^{-3}\cdot(-\sin x) = \frac{2\sin x}{\cos^3 x}

Split it as 2\cdot\frac{1}{\cos^2 x}\cdot\frac{\sin x}{\cos x} = 2\sec^2 x\tan x.

Why this is the second derivative of tan x

The derivative of tan x is \sec^2 x. So differentiating \sec^2 x is the same as differentiating \tan x twice:

\frac{d^2}{dx^2}\tan x = 2\sec^2 x\tan x

The sign of this tells you the concavity of \tan x: concave down for -\frac{\pi}{2} < x < 0 and concave up for 0 < x < \frac{\pi}{2}.

Chain rule variants

\frac{d}{dx}\sec^2 u = 2\sec^2 u\tan u\cdot u'

Example 1. \frac{d}{dx}\sec^2(3x) = 6\sec^2(3x)\tan(3x).

Example 2. \frac{d}{dx}\sec^2(x^2) = 4x\sec^2(x^2)\tan(x^2).

Example 3: a value. At x = \frac{\pi}{4}, \sec^2\frac{\pi}{4} = 2 and \tan\frac{\pi}{4} = 1, so the slope is 2\cdot 2\cdot 1 = 4.

Example 4: a product. \frac{d}{dx}(x\sec^2 x) = \sec^2 x + 2x\sec^2 x\tan x.

Where you will meet it

The derivative of \sec^2 x comes up most often in two places. The first is finding the concavity and inflection points of \tan x, since \sec^2 x is its first derivative. The second is in integration, where recognizing 2\sec^2 x\tan x as a derivative lets you undo it quickly with u-substitution: setting u = \tan x turns \int 2\tan x\sec^2 x\,dx into \int 2u\,du = \tan^2 x + C. Since \tan^2 x and \sec^2 x differ only by 1, that is the same family of antiderivatives.

Common mistakes

  1. Stopping at 2\sec x. That is only the outer derivative. Multiply by \sec x\tan x.
  2. Answering \tan x. \tan x is the integral of \sec^2 x, not its derivative. See the integral of sec²x.
  3. Treating \sec^2 x as \sec(x^2). \frac{d}{dx}\sec(x^2) = 2x\sec(x^2)\tan(x^2), which is different.

Squares of sine and cosine follow the same pattern: see the derivative of sin²x and derivative of cos²x.

Practice it now

Chain rule: trig

Solve real problems on this topic with instant feedback, hints and a step-by-step walkthrough for every answer. Free, no sign-up needed to start.

Practice this lesson

Frequently asked questions

What is the derivative of sec²x?

It is 2\sec^2 x\tan x.

What is the second derivative of tan x?

The first derivative is \sec^2 x, and its derivative is 2\sec^2 x\tan x. So \frac{d^2}{dx^2}\tan x = 2\sec^2 x\tan x.

What is the derivative of sec²(2x)?

By the chain rule, 2\sec(2x)\cdot\sec(2x)\tan(2x)\cdot 2 = 4\sec^2(2x)\tan(2x).

Is the derivative of sec²x equal to tan x?

No, that is backward. \tan x is the antiderivative of \sec^2 x. The derivative of \sec^2 x is 2\sec^2 x\tan x.

Written by the PracticeCalculus team

We build interactive calculus lessons and write every page to be clear and correct. Spotted something off? Tell us and we will fix it.