The derivative of (sec(x)) with respect to (x) is (sec(x)tan(x)). First, express (sec(x)) as \(\frac{1}{\cos(x)}\). Then, apply the reciprocal power rule with the chain rule or quotient rule.
This formula holds for all real numbers where \(\cos(x) \neq 0\), meaning \(x \neq \frac{\pi}{2} + k\pi\) for any integer (k). In addition, understanding this product helps you sketch curves, integrate secant powers, and find higher-order derivatives.
Why is the derivative of sec(x) equal to sec(x)tan(x)?
First, you define secant as the reciprocal of cosine: \(\sec(x) = \frac{1}{\cos(x)}\). Also, observing how a reciprocal function behaves relative to its base function explains this slope.

When (cos(x)) is near (1) (around (x = 0)), small changes in cosine create negligible changes in its reciprocal. Consequently, the graph of (sec(x)) is flat at (x = 0), yielding \(\sec(0)\tan(0) = 1 \cdot 0 = 0\).
As (x) approaches \(\frac{\pi}{2}\), (cos(x)) approaches zero. Dividing by numbers close to zero causes (sec(x)) to climb rapidly toward infinity. In addition, both factors in (sec(x)tan(x)) grow without bound as \(x \to \frac{\pi}{2}^-\). So, this reflects an increasingly steep positive slope up to the vertical asymptote.
To analyze the sign of the slope across all four quadrants, rewrite the derivative as a single fraction:
$$\frac{d}{dx}\sec(x) = \frac{\sin(x)}{\cos^2(x)}$$
Because the denominator (cos^2(x)) is strictly positive, the sign of the derivative depends entirely on (sin(x)). On intervals where (sin(x) > 0) (Quadrants I and II), (sec(x)) increases. However, where (sin(x) < 0) (Quadrants III and IV), (sec(x)) decreases.
How do you prove the derivative of sec(x)?
You can prove the derivative of secant using three standard techniques. First, use the chain rule with exponent rules, the quotient rule, or the limit definition.
Proof 1: Using the reciprocal power rule and chain rule
First, express (sec(x)) as an exponent using reciprocal identities: (sec(x) = (cos x)^{-1}). Next, apply the chain rule alongside the power rule by pulling down (-1), reducing the power to (-2), and multiplying by the derivative of (cos(x)):
$$\frac{d}{dx}(\cos x)^{-1} = -1 \cdot (\cos x)^{-2} \cdot (-\sin x) = \frac{\sin x}{\cos^2 x}$$
Separate this single fraction into two distinct trigonometric factors:
$$\frac{\sin x}{\cos^2 x} = \frac{1}{\cos x} \cdot \frac{\sin x}{\cos x} = \sec(x)\tan(x)$$
Proof 2: Using the quotient rule
Using the quotient rule, set \(f(x) = \frac{u(x)}{v(x)}\) where (u(x) = 1) and (v(x) = cos(x)). Compute their derivatives: (u'(x) = 0) and (v'(x) = -sin(x)). Substitute these into the quotient rule formula \(\frac{u'v - uv'}{v^2}\):
$$\frac{0 \cdot \cos(x) - 1 \cdot (-\sin x)}{\cos^2(x)} = \frac{\sin x}{\cos^2 x}$$
Factoring \(\frac{\sin x}{\cos^2 x}\) into \(\frac{1}{\cos x} \cdot \frac{\sin x}{\cos x}\) yields (sec(x)tan(x)).
Proof 3: Proof from first principles (limit definition)
Also, you can establish the derivative directly from the limit definition of the derivative:
$$\frac{d}{dx}\sec(x) = \lim_{h \to 0} \frac{\sec(x+h) - \sec(x)}{h}$$
Convert the secants into cosine reciprocals and combine the numerator over a common denominator:
$$\lim_{h \to 0} \frac{\frac{1}{\cos(x+h)} - \frac{1}{\cos(x)}}{h} = \lim_{h \to 0} \frac{\cos(x) - \cos(x+h)}{h \cdot \cos(x+h)\cos(x)}$$
Next, apply the cosine angle addition formula (cos(x+h) = cos(x)cos(h) – sin(x)sin(h)) to the numerator:
$$\cos(x) - \big(\cos(x)\cos(h) - \sin(x)\sin(h)\big) = \cos(x)\big(1 - \cos(h)\big) + \sin(x)\sin(h)$$
Then, split the limit into two terms using standard trigonometric limit facts \(\lim_{h \to 0} \frac{1 - \cos(h)}{h} = 0\) and \(\lim_{h \to 0} \frac{\sin(h)}{h} = 1\):
$$\lim_{h \to 0} \left[ \frac{\cos(x)\frac{1-\cos(h)}{h} + \sin(x)\frac{\sin(h)}{h}}{\cos(x+h)\cos(x)} \right] = \frac{\cos(x) \cdot 0 + \sin(x) \cdot 1}{\cos(x)\cos(x)} = \frac{\sin(x)}{\cos^2(x)} = \sec(x)\tan(x)$$
Which proof method should you use?
Each derivation offers trade-offs depending on whether you are solving exam problems or writing foundational calculus proofs.

| Proof Method | Prerequisites | Advantages | Best Used For |
|---|---|---|---|
| Chain Rule / Power Rule | Power rule, negative exponents, chain rule | Fastest method; requires minimal algebraic steps | Timed exams and quick scratchpad derivations |
| Quotient Rule | Quotient rule formula | Direct substitution; easy to remember step structure | Students comfortable with fractional differentiation |
| Limit Definition | Trigonometric limits, angle sum identities | Rigorously establishes the derivative without relying on higher derivative rules | First-principles coursework and formal mathematics proofs |
How do you apply the chain rule to sec(u)?
When secant surrounds an inner function (g(x)), express the general derivative using the chain rule format:

$$\frac{d}{dx}\sec\big(g(x)\big) = \sec\big(g(x)\big)\tan\big(g(x)\big) \cdot g'(x)$$
First, keep the original inside expression (g(x)) intact inside both secant and tangent. Next, multiply the entire term by the derivative of that inner expression.
Worked chain rule examples
Example 1: Linear argument (sec(2x)). Here (g(x) = 2x) and (g'(x) = 2):
$$\frac{d}{dx}\sec(2x) = 2\sec(2x)\tan(2x)$$
Example 2: Polynomial argument (sec(x^3)). Here (g(x) = x^3) and (g'(x) = 3x^2):
$$\frac{d}{dx}\sec(x^3) = 3x^2\sec(x^3)\tan(x^3)$$
Example 3: Power of secant (sec^2(x)). Treat this as (big(sec(x)big)^2). Apply the general power rule first, then multiply by the derivative of (sec(x)):
$$\frac{d}{dx}\sec^2(x) = 2\sec(x) \cdot \Big(\sec(x)\tan(x)\Big) = 2\sec^2(x)\tan(x)$$
This result is notably the second derivative of (tan(x)), because \(\frac{d}{dx}\tan(x) = \sec^2(x)\).
Example 4: Exponential with secant power (e^{sec(x)}). The exponential function copies itself while preserving its power; multiply by the derivative of the power:
$$\frac{d}{dx}e^{\sec(x)} = \sec(x)\tan(x)e^{\sec(x)}$$
Example 5: Natural logarithm of secant (ln|sec(x)|). Apply \(\frac{d}{dx}\ln|u| = \frac{u'}{u}\):
$$\frac{d}{dx}\ln|\sec(x)| = \frac{\sec(x)\tan(x)}{\sec(x)} = \tan(x)$$
This demonstrates why \(\int \tan(x)\,dx = \ln|\sec(x)| + C\). In addition, you can write this as (-ln|cos(x)| + C).
Example 6: Exam favorite (ln|sec(x) + tan(x)|). Differentiate the inner sum (sec(x) + tan(x)) to get (sec(x)tan(x) + sec^2(x)):
$$\begin{aligned}\frac{d}{dx}\ln|\sec(x) + \tan(x)| &= \frac{\sec(x)\tan(x) + \sec^2(x)}{\sec(x) + \tan(x)} \\ &= \frac{\sec(x)\big(\tan(x) + \sec(x)\big)}{\sec(x) + \tan(x)} \\ &= \sec(x)\end{aligned}$$
This verification confirms the standard anti-derivative formula explained in integral of sec x.
How do you find the tangent line to y = sec(x)?
First, evaluate the original function to find the (y)-coordinate. Next, compute the derivative to find the slope. Finally, format the tangent line using point-slope form.
Find the tangent line equation for (y = sec(x)) at \(x = \frac{\pi}{3}\):
- Find the point: Since \(\cos\left(\frac{\pi}{3}\right) = \frac{1}{2}\), the value of \(\sec\left(\frac{\pi}{3}\right) = 2\). The point on the graph is \(\left(\frac{\pi}{3}, 2\right)\).
- Find the slope: Evaluate the derivative at \(x = \frac{\pi}{3}\):
$$\sec\left(\frac{\pi}{3}\right)\tan\left(\frac{\pi}{3}\right) = 2 \cdot \sqrt{3} = 2\sqrt{3}$$ - Write the equation: Plug the slope and point into point-slope form (y – y_1 = m(x – x_1)):
$$y - 2 = 2\sqrt{3}\left(x - \frac{\pi}{3}\right)$$
For more detailed step-by-step tangent derivations, review the equation of a tangent line guide.
How do you calculate higher derivatives of sec(x)?
To find the second derivative of (sec(x)), differentiate its first derivative (sec(x)tan(x)) using the product rule. Set (u = sec(x)) and (v = tan(x)):

$$\begin{aligned}\frac{d^2}{dx^2}\sec(x) &= \left(\frac{d}{dx}\sec(x)\right)\tan(x) + \sec(x)\left(\frac{d}{dx}\tan(x)\right) \\ &= \big(\sec(x)\tan(x)\big)\tan(x) + \sec(x)\big(\sec^2(x)\big) \\ &= \sec(x)\tan^2(x) + \sec^3(x)\end{aligned}$$
Substitute the identity (tan^2(x) = sec^2(x) – 1) to express the second derivative exclusively in terms of secant:
$$\sec(x)\big(\sec^2(x) - 1\big) + \sec^3(x) = 2\sec^3(x) - \sec(x)$$
On the central interval \(\left(-\frac{\pi}{2}, \frac{\pi}{2}\right)\), (sec(x) ge 1). Therefore, (2sec^3(x) – sec(x) > 0), establishing that the graph is concave upward throughout this central branch.
Real-world applications: slanted distance and rates of change
Secant functions describe slanted line-of-sight distances between an observer and a moving target. Consider a lighthouse positioned on an island 1 km off a straight shoreline. Its revolving light makes an angle \(\theta\) with the line pointing perpendicularly to the beach.

The total beam length (L) from the lighthouse to the point lit on the shore is:
$$L = \sec(\theta) \text{ km}$$
Suppose the light rotates at a constant speed of (0.5) radians per second \((\frac{d\theta}{dt} = 0.5)\). How quickly is the length of the light beam growing when \(\theta = \frac{\pi}{3}\)?
Differentiate (L) with respect to time (t) using the chain rule:
$$\frac{dL}{dt} = \sec(\theta)\tan(\theta) \cdot \frac{d\theta}{dt}$$
Substitute \(\theta = \frac{\pi}{3}\) and \(\frac{d\theta}{dt} = 0.5\):
$$\frac{dL}{dt} = (2\sqrt{3}) \cdot 0.5 = \sqrt{3} \approx 1.732 \text{ km/s}$$
As \(\theta\) approaches \(\frac{\pi}{2}\), the rate of change accelerates dramatically because \(\sec(\theta)\tan(\theta)\) approaches infinity. So, this reflects how fast a light spot sweeps across a distant shoreline.
How does secant compare to other trigonometric derivatives?
Trigonometric derivatives share systematic symmetry patterns. Primary functions ((sin, tan, sec)) yield positive expressions, whereas their cofunctions ((cos, cot, csc)) carry negative signs.
| Function (f(x)) | Derivative (f'(x)) | Domain Exclusions | Cofunction Pair (g(x)) | Cofunction Derivative (g'(x)) |
|---|---|---|---|---|
| (sin(x)) | (cos(x)) | None (all real numbers) | (cos(x)) | (-sin(x)) |
| (tan(x)) | (sec^2(x)) | \(x = \frac{\pi}{2} + k\pi\) | (cot(x)) | (-csc^2(x)) |
| (sec(x)) | (sec(x)tan(x)) | \(x = \frac{\pi}{2} + k\pi\) | (csc(x)) | (-csc(x)cot(x)) |
Notice the structural pairing: (sec(x)) differentiates into its own term multiplied by (tan(x)). However, its cofunction (csc(x)) differentiates into negative itself multiplied by (cot(x)).
Where the derivative of sec(x) is zero
To locate critical points, set the derivative equal to zero:

$$\sec(x)\tan(x) = \frac{\sin(x)}{\cos^2(x)} = 0$$
A fraction is zero when its numerator is zero and its denominator is non-zero. The condition (sin(x) = 0) occurs at integer multiples of \(\pi\):
$$x = k\pi \quad \text{for } k \in \mathbb{Z}$$
- At \(x = 0, \pm 2\pi, \pm 4\pi, \dots\), (sec(x) = 1), giving local minima.
- At \(x = \pm \pi, \pm 3\pi, \dots\), (sec(x) = -1), giving local maxima.
To locate critical points on non-standard expressions, test them with the critical points finder.
Common mistakes when differentiating secant
- Writing (sec^2(x)) as the derivative of (sec(x)). Remember that (sec^2(x)) is the derivative of derivative of tan x. The derivative of secant requires two different functions multiplied together: (sec(x)tan(x)).
- Inserting an extra negative sign. Students frequently confuse secant with cosecant. The derivative of (sec(x)) is positive (sec(x)tan(x)), whereas \(\frac{d}{dx}\csc(x) = -\csc(x)\cot(x)\).
- Forgetting to differentiate the inner argument. Writing \(\frac{d}{dx}\sec(5x) = \sec(5x)\tan(5x)\) misses the inner factor of (5). The correct expression is (5sec(5x)tan(5x)).
- Confusing powers with arguments. When differentiating (sec^3(x)), apply the power rule first to get (3sec^2(x)). Next, multiply by (sec(x)tan(x)), resulting in (3sec^3(x)tan(x)).
- Evaluating at asymptotic discontinuities. Attempting to compute the slope at \(x = \frac{\pi}{2}\) or \(x = \frac{3\pi}{2}\) fails. This happens because (sec(x)) is undefined at odd multiples of \(\frac{\pi}{2}\).
Where it is used in integration and calculus
The derivative formula \(\frac{d}{dx}\sec(x) = \sec(x)\tan(x)\) is crucial across several core integral formulas:
- Direct anti-differentiation: \(\int \sec(x)\tan(x)\,dx = \sec(x) + C\).
- Integrals involving secant powers: Evaluated alongside the identity (sec^2(x) = 1 + tan^2(x)) and the standard integral for integral of sec²x.
- Trigonometric substitution: When integrating expressions containing \(\sqrt{x^2 - a^2}\), substituting \(x = asec(\theta)\) turns (dx) into (asec(theta)tan(theta),dtheta). Also, simplifying under the square root gives \(\sqrt{a^2\sec^2(\theta) - a^2} = a\tan(\theta)\).
Try it yourself
Type any secant function into the field below to inspect steps directly, or explore the complete derivative calculator.

Step-by-step solver·Exact symbolic engine
Interactive Calculus Problem Solver
Derivatives, antiderivatives, definite and improper integrals, and limits. Every answer comes with the rules used, and antiderivatives are verified by differentiating them back.
Input syntax
- Powers
x^2, rootssqrt(x),cbrt(x), absolute value|x| - Implicit multiplication works:
3x sin(2x) sin cos tan sec csc cot,asin acos atan,sinh cosh tanhe^xorexp(x);ln(x)is the natural log. In this solverlog(x)also means the natural log (the usual calculus convention); typelog10(x)for base 10- Constants
piande; bounds acceptinfand-inf
Practice problems
Solve these practice problems to test your understanding before checking the solutions.

- Find \(\frac{d}{dx}\sec(4x)\).
- Next, find \(\frac{d}{dx}\big(xsec(x)\big)\).
- Find \(\frac{d}{dx}\csc(2x)\).
- Also, find \(\frac{d}{dx}\sec(x^2)\).
- Find \(\frac{d}{dx}\sec^3(x)\).
- Then, find \(\frac{d}{dx}\big(\sec(x) + \tan(x)\big)\).
Worked Solutions:
- (4sec(4x)tan(4x)): Apply the chain rule with inner derivative \(\frac{d}{dx}(4x) = 4\).
- (sec(x) + xsec(x)tan(x)): Apply the product rule: ((1)sec(x) + xbig(sec(x)tan(x)big)).
- (-2csc(2x)cot(2x)): Apply the cosecant rule with inner chain rule factor (2).
- (2xsec(x^2)tan(x^2)): Chain rule with inner derivative \(\frac{d}{dx}(x^2) = 2x\).
- (3sec^3(x)tan(x)): Power rule gives (3sec^2(x)), multiplied by inner derivative (sec(x)tan(x)).
- (sec(x)tan(x) + sec^2(x)): Differentiate term by term. As a result, this factors to (sec(x)big(tan(x) + sec(x)big)).
Frequently asked questions
What is the derivative of sec²(x)?
The derivative of (sec^2(x)) is (2sec^2(x)tan(x)). To calculate this, apply the general power rule to get (2sec(x)). Next, multiply by the inner derivative (sec(x)tan(x)).
What is the integral of sec(x)?
The integral of (sec(x)) is (ln|sec(x) + tan(x)| + C). Differentiating (ln|sec(x) + tan(x)|) using the chain rule confirms that its derivative simplifies back to (sec(x)).
What is the integral of sec(x)tan(x)?
The integral of (sec(x)tan(x)) is (sec(x) + C). Because the derivative of (sec(x)) is (sec(x)tan(x)), anti-differentiation reverses the process directly.
What is the second derivative of sec(x)?
The second derivative of (sec(x)) is (sec(x)tan^2(x) + sec^3(x)). As a result, this simplifies using Pythagorean identities to (2sec^3(x) – sec(x)).
What is the derivative of sec(x) at x = 0?
The derivative of (sec(x)) at (x = 0) is (0). Evaluating (sec(0)tan(0)) gives \(1 \cdot 0 = 0\), corresponding to the horizontal tangent line at the minimum of the secant curve.
Further reading
- Paul’s Online Notes: Derivatives of Trig Functions — derivations and worked examples for all six trig derivatives.
- Paul’s Online Notes: Chain Rule — many more composite-function examples, from simple to multi-layer.
Calculators for this topic
Keep learning
Inverse Trig Functions: Arcsin, Arccos and Arctan
Arcsin, arccos and arctan explained: domains and ranges, how to evaluate them, graphs, derivatives, and the integrals that give inverse trig answers.
Derivative Rules: Every Differentiation Formula, Explained
All the derivative rules in one place: definition, power, product (uv), quotient and chain rules, plus trig, exponential, log and inverse trig derivatives.

