CALCULUS 1 • DERIVATIVES: DEFINITION & RULES

Derivatives of tan, cot, sec, csc — Finding the Derivatives of Tangent, Cotangent, Secant, and/or Cosecant Functions

Master the derivative formulas for all four remaining trig functions using quotient rule and identities.

Historical Context & Motivation

The story of trigonometric derivatives is deeply intertwined with the development of calculus itself. Once mathematicians knew how to differentiate sine and cosine, the natural next step was to find the derivatives of the other four trig functions: tangent, cotangent, secant, and cosecant. These derivatives became essential tools for physics and engineering, powering everything from satellite tracking to electrical circuit analysis.

~1500s
Trigonometric Tables Mature
European mathematicians compiled extensive tables for all six trig functions, originally developed for navigation and astronomy by scholars in India and the Islamic world.
1665–1676
Newton & Leibniz Develop Calculus
Isaac Newton and Gottfried Wilhelm Leibniz independently invented calculus, providing the framework to compute rates of change — including those of trig functions.
1748
Euler's Introductio in Analysin Infinitorum
Leonhard Euler systematized all six trig functions, their identities, and their derivatives, presenting them in the modern notation we still use today.
1800s
Applications Explode
Derivatives of trig functions became indispensable in Fourier analysis, electromagnetism, and structural engineering — fields that reshaped the modern world.

You already know the derivatives of sin x and cos x. But what happens when you need the rate of change of tan x, or sec x? Since these four remaining trig functions are all built from sine and cosine, their derivatives can be derived using tools you already possess — the quotient rule and Pythagorean identities. This lesson will show you how.

Core Principles & Definitions

Before jumping into formulas, it helps to understand the foundational ideas that make these derivatives possible. Each of the four functions — tan, cot, sec, csc — is a ratio of sin x and cos x, which means we can always rewrite them in terms of those two "parent" functions. This single insight unlocks every derivative in this lesson.

1

Trig Functions as Ratios

tan x = sin x / cos x, cot x = cos x / sin x, sec x = 1 / cos x, and csc x = 1 / sin x. Every derivative starts from these ratio definitions.
2

The Quotient Rule

If f(x) = g(x)/h(x), then f′(x) = [h(x)·g′(x) − g(x)·h′(x)] / [h(x)]². This rule is the engine behind every derivation here.
3

Pythagorean Identities

sin²x + cos²x = 1, 1 + tan²x = sec²x, and 1 + cot²x = csc²x. These identities simplify messy numerators into clean results.
4

Paired Derivatives

tan and sec are paired (both involve cos x in the denominator), as are cot and csc (both involve sin x). Cofunctions mirror each other with a sign change.
KEY TAKEAWAY
Think of sin x and cos x as the two basic ingredients in a kitchen. Tan, cot, sec, and csc are just different recipes made from those same two ingredients. To figure out how a recipe changes (its derivative), you just need to know how the ingredients change — and the quotient rule is your cookbook.

Visual Explanation — The Derivative Relationships

The diagram below shows the six trig functions arranged in two columns — the regular functions on the left and their "co" counterparts on the right. Arrows indicate the derivative relationships, and you can see the beautiful symmetry: every cofunction derivative picks up a negative sign compared to its non-co partner.

Notice the pattern: the cofunction column (cos, cot, csc) always introduces a negative sign in the derivative compared to the function column (sin, tan, sec). This symmetry is a powerful memory aid.
💡 Memory Trick
If the function starts with "co" (cosine, cotangent, cosecant), its derivative gets a negative sign. No "co"? No negative. This rule works for all six trig derivatives.

Mathematical Framework — Deriving the Formulas

Let's derive each formula step by step using the quotient rule and Pythagorean identities. Once you see how each one is built, the formulas stop feeling like random things to memorize — they become logical consequences of ideas you already know.

Derivative of tan x

Start by writing tan x = sin x / cos x. Apply the quotient rule with g(x) = sin x and h(x) = cos x. The quotient rule gives us [cos x · cos x − sin x · (−sin x)] / cos²x, which simplifies to [cos²x + sin²x] / cos²x. The Pythagorean identity tells us cos²x + sin²x = 1, so the numerator collapses to 1. The final result is 1/cos²x, which equals sec²x.

DERIVATIVE OF TANGENT
d/dx [tan x] = sec²x
Derived via quotient rule on sin x / cos x, then simplified using sin²x + cos²x = 1.

Derivative of cot x

Write cot x = cos x / sin x. Apply the quotient rule with g(x) = cos x and h(x) = sin x. This gives [sin x · (−sin x) − cos x · cos x] / sin²x = [−sin²x − cos²x] / sin²x = −1 / sin²x. Since 1/sin²x = csc²x, we arrive at −csc²x.

DERIVATIVE OF COTANGENT
d/dx [cot x] = −csc²x
Notice the negative sign — this is the cofunction of tangent, so the derivative carries a minus.

Derivative of sec x

Write sec x = 1 / cos x. Using the quotient rule (or equivalently, the reciprocal rule) with g(x) = 1 and h(x) = cos x, we get [cos x · 0 − 1 · (−sin x)] / cos²x = sin x / cos²x. This can be factored as (1/cos x) · (sin x / cos x) = sec x · tan x.

DERIVATIVE OF SECANT
d/dx [sec x] = sec x · tan x
The result is a product of two trig functions — sec x times tan x.

Derivative of csc x

Write csc x = 1 / sin x. The quotient rule gives [sin x · 0 − 1 · cos x] / sin²x = −cos x / sin²x. Factoring yields −(1/sin x) · (cos x / sin x) = −csc x · cot x.

DERIVATIVE OF COSECANT
d/dx [csc x] = −csc x · cot x
Again, the cofunction picks up a negative sign compared to d/dx[sec x].

All Four Formulas at a Glance

The table below collects all four derivative formulas alongside the two you already know (sin x and cos x). Study the pattern: every cofunction derivative is the negative of the corresponding function's derivative, with trig functions swapped accordingly.

Complete table of trigonometric derivatives
Function f(x)Derivative f′(x)Sign
sin xcos x+
cos x−sin x
tan xsec²x+
cot x−csc²x
sec xsec x tan x+
csc x−csc x cot x
Left panel: tan x (solid cyan) and its derivative sec²x (dashed violet). Notice sec²x is always ≥ 1, confirming tan x is always increasing between its asymptotes. Right panel: sec x (solid amber) and its derivative sec x tan x (dashed emerald).

The left graph illustrates an important observation: since sec²x is always positive (at least 1), the tangent function is always increasing within any interval where it is defined. The right graph shows that sec x has a derivative of zero at x = 0, which corresponds to the local minimum of sec x at that point.

Worked Example — Differentiating a Trig Expression

Let's find the derivative of f(x) = 3 sec x + 2 tan x − 5 csc x. This problem combines three of our new derivative rules along with the constant multiple rule.

Find f′(x) where f(x) = 3 sec x + 2 tan x − 5 csc x
1
Step 1 — Identify the componentsThe function is a sum/difference of three terms: 3 sec x, 2 tan x, and −5 csc x. By the sum rule, we can differentiate each term separately.
2
Step 2 — Differentiate 3 sec xUsing the constant multiple rule and d/dx[sec x] = sec x tan x, we get d/dx[3 sec x] = 3 sec x tan x.
3 sec x tan x
3
Step 3 — Differentiate 2 tan xUsing d/dx[tan x] = sec²x, we get d/dx[2 tan x] = 2 sec²x.
2 sec²x
4
Step 4 — Differentiate −5 csc xUsing d/dx[csc x] = −csc x cot x, we get d/dx[−5 csc x] = −5 · (−csc x cot x) = 5 csc x cot x. Notice the two negatives cancel!
5 csc x cot x
5
Step 5 — Combine all termsAdding the three results together gives us the complete derivative.
f′(x) = 3 sec x tan x + 2 sec²x + 5 csc x cot x
⚠️ Watch the Signs!
The most common mistake students make with these derivatives is losing track of negative signs. In Step 4, the coefficient −5 multiplied the derivative −csc x cot x, and the double negative produced a positive result. Always write out the sign carefully before simplifying.

Common Mistakes & How to Avoid Them

These derivatives are straightforward once memorized, but certain pitfalls trip up students over and over. The table below highlights the most frequent errors alongside the correct approach.

Common errors when differentiating tan, cot, sec, and csc
Common MistakeWhy It's WrongCorrect Approach
Writing d/dx[tan x] = sec xMissing the squared exponent — sec²x ≠ sec xd/dx[tan x] = sec²x (the entire sec x is squared)
Forgetting the negative sign on cot and csc derivativesCofunctions always carry a negative in their derivativesd/dx[cot x] = −csc²x, d/dx[csc x] = −csc x cot x
Confusing sec x tan x with tan x sec xThese are actually the same — multiplication is commutative!sec x tan x = tan x sec x. This is NOT a mistake — both forms are correct.
Swapping tan and cot in the sec/csc derivative formulassec pairs with tan (both use cosine), and csc pairs with cot (both use sine)d/dx[sec x] = sec x · tan x, d/dx[csc x] = −csc x · cot x
Not applying chain rule when the argument isn't just xd/dx[tan(3x)] ≠ sec²(3x); must multiply by inner derivatived/dx[tan(3x)] = sec²(3x) · 3 = 3 sec²(3x)
KEY TAKEAWAY
Think of the derivatives like dance partners at a school dance. Sec always dances with tan, and csc always dances with cot — they never switch partners. The only difference is that the "co" couple (csc and cot) carries a negative sign, like they're dancing in reverse.

Connection to Advanced Topics

Mastering these four derivatives is not just an end in itself — they are building blocks for many topics you'll encounter later in calculus and beyond. The table below shows how the current material connects to more advanced concepts.

Current TopicAdvanced Extension
d/dx[tan x] = sec²x∫ sec²x dx = tan x + C — this becomes an essential antiderivative (integral) formula
d/dx[sec x] = sec x tan xUsed in trigonometric substitution for integrals like ∫ √(x² − 1) dx
Chain rule with trig derivativesImplicit differentiation and related rates problems frequently involve nested trig functions
All six trig derivativesFourier series and differential equations use these derivatives extensively in physics and engineering

When you reach integration (the reverse of differentiation), you'll essentially read these derivative formulas backward. Knowing that the derivative of tan x is sec²x immediately tells you that the integral of sec²x is tan x + C. So the time you invest now in learning these formulas pays off doubly later.

Practice Problems

PROBLEM 1CONCEPTUAL
Explain why the derivative of tan x is always positive (i.e., why sec²x > 0 for all x where tan x is defined). What does this tell you about the graph of tan x?
PROBLEM 2BASIC CALCULATION
Find the derivative of f(x) = 4 cot x.
PROBLEM 3INTERMEDIATE
Find the derivative of g(x) = x² sec x. (Hint: you'll need the product rule in addition to the trig derivative.)
PROBLEM 4APPLIED
A security camera mounted 10 meters above the ground tracks a car moving along a straight road. The angle of depression from the camera to the car is θ, and the horizontal distance from the camera to the car is d = 10 cot θ. If dθ/dt = 0.05 rad/s at the moment when θ = π/4, how fast is the car moving horizontally?
PROBLEM 5CRITICAL THINKING
Starting from the identity tan²x + 1 = sec²x, differentiate both sides with respect to x and show that the result is consistent with the known derivatives of tan x and sec x.

Lesson Summary

The four new derivative formulas in this lesson all stem from the quotient rule and the Pythagorean identities. The derivative of tan x is sec²x, the derivative of cot x is −csc²x, the derivative of sec x is sec x tan x, and the derivative of csc x is −csc x cot x. The unifying pattern is that every cofunction derivative includes a negative sign.

To remember the pairings: sec pairs with tan (both involve cosine in the denominator), and csc pairs with cot (both involve sine). These formulas will reappear when you study integration, where they are read in reverse to find antiderivatives. Practice combining them with the product rule and chain rule to build fluency for more complex problems.

Varsity Tutors • Calculus 1 • Derivatives of tan, cot, sec, csc