practicecalculus
Trigonometric derivatives

Derivative of sec x: Formula, Proof and Examples

The derivative of sec x is sec x tan x. See the proof from 1/cos x, the chain rule for sec(u), a graph and worked examples like sec(2x) and x sec x.

Trigonometric derivatives Updated 2 min read

At a glance

\frac{d}{dx}\,\sec x = \sec x\tan x
Derivative
\sec x\tan x for x \ne \frac{\pi}{2} + k\pi
In sin and cos
\dfrac{\sin x}{\cos^2 x}
Chain rule form
\dfrac{d}{dx}\sec u = \sec u\tan u \cdot u'
Slope at x = 0
\sec 0\tan 0 = 0
Integral version
\int \sec x\tan x\,dx = \sec x + C
On this page
  1. Graph of sec x and its derivative
  2. Proof with the chain rule
  3. The chain rule version: derivative of sec(u)
  4. Worked examples
  5. How to remember it
  6. Common mistakes

The derivative of \sec x is \sec x\tan x. Secant is the reciprocal of cosine, so its derivative comes straight from the derivative of cos x.

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

Graph of sec x and its derivative

Graph of y = sec x and its derivative y = sec x tan x
One branch of \sec x. It has a minimum at x = 0, where the derivative is 0. Left of 0 the slope is negative, right of 0 it is positive.

Proof with the chain rule

Write \sec x = (\cos x)^{-1}. The chain rule with the power -1 outside and \cos x inside gives

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

Split the fraction into two familiar pieces:

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

The quotient rule on \frac{1}{\cos x} gives the same thing: \frac{0\cdot\cos x - 1\cdot(-\sin x)}{\cos^2 x} = \frac{\sin x}{\cos^2 x}.

The chain rule version: derivative of sec(u)

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

Both \sec and \tan keep the same inside.

Function Inside u Derivative
\sec(2x) 2x 2\sec(2x)\tan(2x)
\sec(x^2) x^2 2x\sec(x^2)\tan(x^2)
\sec(3x + 1) 3x + 1 3\sec(3x + 1)\tan(3x + 1)
\sec\left(\frac{1}{x}\right) \frac{1}{x} -\frac{1}{x^2}\sec\frac{1}{x}\tan\frac{1}{x}

Worked examples

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

Example 2: a power. \frac{d}{dx}\sec^3 x = 3\sec^2 x\cdot\sec x\tan x = 3\sec^3 x\tan x.

Example 3: a sum that simplifies. \frac{d}{dx}(\sec x + \tan x) = \sec x\tan x + \sec^2 x = \sec x(\tan x + \sec x). This neat result is the trick behind the integral of sec x, \ln\lvert\sec x + \tan x\rvert + C.

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

How to remember it

Secant and tangent always travel together in calculus. The derivative of \tan x is \sec^2 x, and the derivative of \sec x is \sec x\tan x. One way to keep them straight: tangent's derivative has no tangent in it, while secant's derivative contains both functions once each. Checking a value also helps. At x = 0 secant has its minimum, so the slope must be zero, and indeed \tan 0 = 0.

Common mistakes

  1. Writing \tan^2 x or \sec^2 x. The derivative of \sec x is \sec x\tan x. \sec^2 x is the derivative of \tan x.
  2. Adding a minus sign. Secant is not a "co" function, so its derivative is positive. Compare with the derivative of csc x, -\csc x\cot x.
  3. Changing only one inside. \frac{d}{dx}\sec(5x) = 5\sec(5x)\tan(5x). Both factors keep 5x.

Reading the result backward gives the integral of sec x tan x. The reciprocal trig functions page covers the graph of secant.

Practice it now

Sine, cosine and tangent

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?

The derivative of \sec x is \sec x\tan x.

How do you prove the derivative of sec x?

Write \sec x = (\cos x)^{-1}. The chain rule gives -(\cos x)^{-2}\cdot(-\sin x) = \frac{\sin x}{\cos^2 x} = \frac{1}{\cos x}\cdot\frac{\sin x}{\cos x} = \sec x\tan x.

What is the derivative of sec(2x)?

By the chain rule, 2\sec(2x)\tan(2x).

What is the derivative of sec²x?

It is 2\sec x\cdot\sec x\tan x = 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.