CALCULUS 1 • DERIVATIVES: DEFINITION & RULES

Derivatives of tan & Other Trig — Derivatives of Tangent and Other Trig Functions

Learn how to differentiate tangent, cotangent, secant, and cosecant using quotient-rule reasoning and key identities.

Historical Context & Motivation

For centuries, mathematicians studied trigonometric functions to solve problems in astronomy, navigation, and surveying. Once calculus was invented in the late 1600s, the natural next question became: how fast do these functions change at any given instant? The derivatives of sine and cosine were discovered first, and from those two building blocks, mathematicians derived the rates of change for every other trig function—tangent, cotangent, secant, and cosecant.

~1500s
Trig Functions Formalized
Indian and European mathematicians compile detailed trig tables and establish the six standard trigonometric ratios used today.
1665–1676
Calculus Invented
Isaac Newton and Gottfried Leibniz independently develop the fundamental ideas of differentiation and integration, giving us the tools to find instantaneous rates of change.
1748
Euler's Introductio
Leonhard Euler publishes a landmark text treating trigonometric functions as pure functions of real numbers rather than just geometric ratios, making their calculus properties easier to study.
1800s
Standard Derivative Table
By the early nineteenth century, the derivatives of all six trig functions are well established and appear in every calculus textbook worldwide.

You already know that the derivative of sin x is cos x and the derivative of cos x is −sin x. But what happens when you need the derivative of tan x, cot x, sec x, or csc x? This lesson answers that question by showing how each of these derivatives follows logically from sine and cosine, using tools you already have: the quotient rule and the Pythagorean identity.

Core Principles & Definitions

Before jumping into formulas, it helps to understand the three key ideas that make every trig derivative derivable. Each of the remaining four trig functions is built from sine and cosine, so their derivatives are not independent facts—they are consequences of rules you already know.

1

Quotient Relationships

tan x = sin x / cos x and cot x = cos x / sin x. Secant and cosecant are simply reciprocals: sec x = 1 / cos x and csc x = 1 / sin x. Every derivative in this lesson starts by rewriting the function in terms of sine and cosine.
2

The Quotient Rule

If f(x) = g(x)/h(x), then f′(x) = [g′(x)·h(x) − g(x)·h′(x)] / [h(x)]². This rule is the engine that produces every formula in this lesson.
3

Pythagorean Identity

sin²x + cos²x = 1. After applying the quotient rule, this identity lets you simplify the numerator into a clean, memorable result.
4

Pattern Recognition

The six trig derivatives come in pairs that mirror each other: tan ↔ cot, sec ↔ csc. Noticing the patterns (especially the sign differences) helps you memorize all six efficiently.
KEY TAKEAWAY
Think of tan, cot, sec, and csc as remixed versions of sine and cosine—like playlists made from the same two songs. You don't need to memorize their derivatives from scratch. Instead, use the quotient rule to "remix" the derivatives of sin and cos you already know, and the Pythagorean identity to simplify the result.

Visual Explanation — Graphs and Slopes

The graph below shows y = tan x alongside its derivative y = sec²x. Notice how the tan curve gets steeper as it approaches the vertical asymptotes, and the sec²x curve shoots upward at exactly those same locations. Where tan x crosses zero (at x = 0, ±π, ±2π, …), its slope equals 1, which is consistent with sec²(0) = 1.

The cyan curve is y = tan x, and the pink curve is y = sec²x, the derivative. Notice sec²x is always ≥ 1, confirming that tan x is always increasing on each interval between asymptotes.

One key visual insight is that sec²x is always positive (it's a squared quantity, so it can never be negative or zero). This tells you that tan x is always increasing wherever it is defined—it never flattens out or turns around between its vertical asymptotes. The same kind of slope analysis applies to the other trig functions and their derivatives.

Mathematical Framework — Deriving the Formulas

Let's build each derivative step by step. We start with the two you already know and derive the remaining four.

Starting Point: Sine and Cosine

KNOWN DERIVATIVES
d/dx [sin x] = cos x d/dx [cos x] = −sin x
These are the two foundational trig derivatives. Every formula below is derived from these using the quotient rule.

Derivative of Tangent

DERIVATIVE OF TAN X
d/dx [tan x] = sec²x
Write tan x = sin x / cos x. Apply the quotient rule: [cos x · cos x − sin x · (−sin x)] / cos²x = (cos²x + sin²x) / cos²x = 1 / cos²x = sec²x.

Derivative of Cotangent

DERIVATIVE OF COT X
d/dx [cot x] = −csc²x
Write cot x = cos x / sin x. Quotient rule: [−sin x · sin x − cos x · cos x] / sin²x = −(sin²x + cos²x) / sin²x = −1 / sin²x = −csc²x. Notice the negative sign—cot x is a decreasing function on each interval.

Derivative of Secant

DERIVATIVE OF SEC X
d/dx [sec x] = sec x · tan x
Write sec x = 1 / cos x. Quotient rule (or reciprocal rule): [0 · cos x − 1 · (−sin x)] / cos²x = sin x / cos²x = (1/cos x)(sin x/cos x) = sec x · tan x.

Derivative of Cosecant

DERIVATIVE OF CSC X
d/dx [csc x] = −csc x · cot x
Write csc x = 1 / sin x. Quotient rule: [0 · sin x − 1 · cos x] / sin²x = −cos x / sin²x = −(1/sin x)(cos x/sin x) = −csc x · cot x. Again, the 'co-' function picks up a negative sign.

Complete Trig Derivative Reference

The table below summarizes all six trigonometric derivatives in one place. A helpful pattern to notice: every "co-" function (cosine, cotangent, cosecant) has a negative sign in its derivative. This is not a coincidence—it reflects the way these functions are oriented on the unit circle.

All six standard trigonometric derivatives
Function f(x)Derivative f′(x)Sign Pattern
sin xcos xPositive (no co-)
cos x−sin xNegative (co-)
tan xsec²xPositive (no co-)
cot x−csc²xNegative (co-)
sec xsec x · tan xPositive (no co-)
csc x−csc x · cot xNegative (co-)
This diagram arranges all six trig functions around a circle. Dashed lines connect each function with its co-function (sin↔cos, tan↔cot, sec↔csc). Functions on the right side have positive derivatives; those on the left (the "co-" functions) have negative derivatives.
💡 Memory Tip
If the original function starts with "co" (cosine, cotangent, cosecant), its derivative is negative. If it doesn't start with "co" (sine, tangent, secant), the derivative is positive. This one rule eliminates half the memorization.

Worked Example — Differentiating a Combined Expression

Let's differentiate f(x) = 3 tan x − 2 sec x + 5 cot x. This example uses several of our new formulas at once, combined with the constant multiple rule and the sum/difference rule.

Find f′(x) for f(x) = 3 tan x − 2 sec x + 5 cot x
1
Step 1 — Recall the Relevant Derivativesd/dx [tan x] = sec²x, d/dx [sec x] = sec x · tan x, and d/dx [cot x] = −csc²x. We will apply the constant multiple rule to each term: d/dx [c · f(x)] = c · f′(x).
2
Step 2 — Differentiate Each Term SeparatelyFirst term: d/dx [3 tan x] = 3 · sec²x. Second term: d/dx [−2 sec x] = −2 · sec x · tan x. Third term: d/dx [5 cot x] = 5 · (−csc²x) = −5 csc²x.
3
Step 3 — Combine the ResultsUsing the sum/difference rule, add all three differentiated terms together:
f′(x) = 3 sec²x − 2 sec x · tan x − 5 csc²x
4
Step 4 — Verify ReasonablenessCheck at x = 0: f(0) = 3(0) − 2(1) + 5(undefined). Since cot 0 is undefined, f is not defined at x = 0. Try x = π/4 instead. tan(π/4) = 1, sec(π/4) = √2, cot(π/4) = 1, csc(π/4) = √2. So f′(π/4) = 3(2) − 2(√2)(1) − 5(2) = 6 − 2√2 − 10 = −4 − 2√2 ≈ −6.83. This negative slope is consistent with the behavior of the combined function near π/4.

Common Mistakes & How to Avoid Them

Students frequently make a few predictable errors when working with trig derivatives. The table below highlights the most common ones so you can watch out for them.

Frequent pitfalls with trig derivatives
Common MistakeWhy It's WrongCorrect Approach
Writing d/dx [tan x] = sec xMissing the square; sec x is not the same as sec²xd/dx [tan x] = sec²x (squared!)
Forgetting the negative sign on co-functionscot, csc, and cos all have negative derivativesUse the "co = negative" memory rule
Confusing sec x · tan x with sec²x · tan xThe derivative of sec x has sec to the first power, not secondd/dx [sec x] = sec x · tan x (one sec, one tan)
Applying the chain rule incorrectly (or not at all)If the argument is not just x, you must multiply by the inner derivatived/dx [tan(3x)] = sec²(3x) · 3, not just sec²(3x)
KEY TAKEAWAY
Think of these derivatives like a set of twins: each function has a "co-" partner, and the partner's derivative always comes with a minus sign. If you can remember the positive derivative (sin→cos, tan→sec², sec→sec·tan), you automatically know the co-version by just adding a negative sign and swapping to the co-function.

Connection to the Chain Rule & Advanced Topics

In many real problems, you won't simply differentiate tan x or sec x by itself. Instead, the argument will be a more complicated expression, like tan(x²) or sec(3x + 1). In those cases you'll combine these trig derivative formulas with the chain rule: differentiate the outer trig function first, then multiply by the derivative of the inner function.

How trig derivatives extend with the chain rule
This LessonWith Chain Rule (Next Step)
d/dx [tan x] = sec²xd/dx [tan(u)] = sec²(u) · u′
d/dx [sec x] = sec x · tan xd/dx [sec(u)] = sec(u) · tan(u) · u′
d/dx [csc x] = −csc x · cot xd/dx [csc(u)] = −csc(u) · cot(u) · u′

Beyond the chain rule, these derivatives appear frequently in integration (where you reverse the process), related rates problems (where angles change over time), and trigonometric substitution in integral calculus. Mastering them now builds the foundation for everything that follows.

Practice Problems

PROBLEM 1CONCEPTUAL
Explain why the derivative of tan x (which is sec²x) is always positive. What does this tell you about the graph of y = tan x?
PROBLEM 2BASIC CALCULATION
Find the derivative of f(x) = 4 sec x − 7 csc x.
PROBLEM 3INTERMEDIATE
Differentiate g(x) = x² · tan x. (Hint: you will need the product rule.)
PROBLEM 4APPLIED
A spotlight on the ground shines on a wall 10 meters away. If the angle θ of the light beam is increasing at 0.1 radians per second, find the rate at which the height y of the bright spot on the wall is changing when θ = π/4. (Use y = 10 tan θ.)
PROBLEM 5CRITICAL THINKING
Using the quotient rule and the known derivatives of sin x and cos x, derive the formula d/dx [cot x] = −csc²x from scratch. Show each algebraic step.

Lesson Summary

In this lesson you learned that every trig derivative can be built from the derivatives of sine and cosine using the quotient rule and the Pythagorean identity. The key results are: d/dx [tan x] = sec²x, d/dx [cot x] = −csc²x, d/dx [sec x] = sec x · tan x, and d/dx [csc x] = −csc x · cot x.

The most important pattern to remember is the "co- means negative" rule: cosine, cotangent, and cosecant all have derivatives with a negative sign. These formulas combine naturally with the chain rule when the argument of the trig function is something other than plain x. Mastering these six derivatives gives you the complete toolkit for differentiating any expression involving trigonometric functions.

Varsity Tutors • Calculus 1 • Derivatives of Tangent and Other Trig Functions