AP CALCULUS AB • DIFFERENTIATION: DEFINITION AND FUNDAMENTAL PROPERTIES

Finding the Derivatives of Tangent, Cotangent, Secant, and/or Cosecant Functions

Extend your derivative toolkit beyond sine and cosine to master all six trigonometric functions.

Historical Context & Motivation

The story of differentiating trigonometric functions is inseparable from the broader development of calculus itself. While Isaac Newton and Gottfried Wilhelm Leibniz independently formulated the core ideas of calculus in the late seventeenth century, the systematic differentiation of all six trigonometric functions unfolded over subsequent decades as mathematicians refined the chain of logical dependencies linking sine and cosine to the remaining four ratios. The derivatives of tangent, cotangent, secant, and cosecant were not discovered in isolation; rather, they emerged naturally once the quotient rule and the fundamental limit sin(h)/h → 1 were firmly established.

1665–1676
Newton & Leibniz Develop Calculus
Newton's method of fluxions and Leibniz's differential calculus provide the foundational framework for computing rates of change, including those of trigonometric ratios.
1748
Euler's Introductio in Analysin Infinitorum
Leonhard Euler formalizes the six trigonometric functions as ratios and infinite series, unifying their analytic treatment and making systematic differentiation feasible.
1755
Euler's Institutiones Calculi Differentialis
Euler publishes explicit derivative formulas for all trigonometric functions, demonstrating how the quotient rule applied to sin x / cos x yields sec²x for the derivative of tan x.
1821
Cauchy Rigorizes Limits
Augustin-Louis Cauchy's Cours d'Analyse provides the epsilon-delta definition of a limit, placing the foundational limit lim(h→0) sin h / h = 1 on rigorous footing and securing the derivatives of all trig functions.

If you already know that d/dx [sin x] = cos x and d/dx [cos x] = −sin x, the natural follow-up question is: what are the derivatives of the four remaining trigonometric functions? Because tan x, cot x, sec x, and csc x are all quotients (or reciprocals) of sin x and cos x, we can derive each formula using the quotient rule—a technique that transforms the problem into straightforward algebra with familiar ingredients.

Core Principles & Definitions

Before diving into the derivative formulas, it is essential to recall the algebraic identities that express each function in terms of sine and cosine. These identities form the backbone of every derivation, because once you express a function as a quotient of sin x and cos x, the quotient rule does the rest. The Pythagorean identity sin²x + cos²x = 1 appears repeatedly when simplifying the results, and recognizing it quickly is the single most important algebraic skill for this topic.

1

Prerequisite Derivatives

d/dx [sin x] = cos x and d/dx [cos x] = −sin x. These two results, proven from the limit definition, are the seeds from which all other trig derivatives grow.
2

Quotient Rule

If f(x) = g(x)/h(x) and h(x) ≠ 0, then f ′(x) = [h(x)g ′(x) − g(x)h ′(x)] / [h(x)]². This rule is applied four times to produce the four derivative formulas.
3

Pythagorean Identity

sin²x + cos²x = 1. Dividing through by cos²x gives 1 + tan²x = sec²x; dividing by sin²x gives 1 + cot²x = csc²x. Both forms appear in simplified derivative results.
4

Domain Awareness

Each derivative exists only where the original function is defined. Tangent and secant are undefined at x = π/2 + nπ; cotangent and cosecant are undefined at x = nπ, where n is any integer.
KEY TAKEAWAY
Think of sin x and cos x as the two raw materials in a factory. Tangent, cotangent, secant, and cosecant are four different products assembled from those same two raw materials. To find the rate at which any product changes, you just need the rate at which each raw material changes (which you already know) and the assembly instructions (the quotient rule). Once you assemble and simplify, the Pythagorean identity tidies everything up into compact formulas.

Visual Explanation — The Function-Derivative Relationship

The graph below shows y = tan x alongside its derivative y = sec²x over the interval (−π/2, π/2). Observe that tan x has its flattest slope at x = 0, where sec²(0) = 1, and the slope increases without bound as x approaches ±π/2, exactly where sec²x tends to infinity. The vertical asymptotes of tan x coincide with the points where sec²x is undefined, reinforcing the intimate connection between a function's domain restrictions and its derivative's behavior.

The cyan solid curve is y = tan x and the pink dashed curve is y = sec²x. Notice that sec²x ≥ 1 everywhere it is defined, confirming that tan x is always increasing on each branch.

A crucial geometric insight is that sec²x ≥ 1 for all x in its domain. This means the tangent function is strictly increasing on every interval where it is continuous—a fact that is immediately visible from the graph and algebraically verifiable since sec²x = 1 + tan²x, which is the sum of 1 and a squared term. The cotangent function, by contrast, has derivative −csc²x, which is always negative, so cot x is strictly decreasing on each of its branches.

Mathematical Framework — Deriving the Formulas

Each of the four derivatives below is derived by expressing the function as a quotient of sin x and cos x (or their reciprocals) and then applying the quotient rule. The Pythagorean identity is used in every simplification step. Below we present the four formulas and then walk through the full derivation of two of them.

DERIVATIVE OF TANGENT
d/dx [tan x] = sec²x
Since 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
d/dx [cot x] = −csc²x
Since cot x = cos x / sin x, apply the quotient rule: (sin x · (−sin x) − cos x · cos x) / sin²x = −(sin²x + cos²x) / sin²x = −1 / sin²x = −csc²x.
DERIVATIVE OF SECANT
d/dx [sec x] = sec x tan x
Since sec x = 1 / cos x, apply the quotient rule: (cos x · 0 − 1 · (−sin x)) / cos²x = sin x / cos²x = (1/cos x)(sin x / cos x) = sec x tan x.
DERIVATIVE OF COSECANT
d/dx [csc x] = −csc x cot x
Since csc x = 1 / sin x, apply the quotient rule: (sin x · 0 − 1 · cos x) / sin²x = −cos x / sin²x = −(1/sin x)(cos x / sin x) = −csc x cot x.
💡 Mnemonic: The Co-Function Sign Pattern
Notice that the derivatives of the three "co-" functions (cos x, cot x, csc x) each carry a negative sign, whereas sin x, tan x, and sec x all have positive derivatives. This pattern—"co-functions get the minus"—is a reliable memorization aid.

Detailed Breakdown — How the Six Derivatives Connect

The six trigonometric derivatives form an elegant web of relationships. The diagram below maps how each derivative depends on the basic building blocks of sin x and cos x, how the quotient rule generates the four new formulas, and how the Pythagorean identity provides the final simplification. Understanding this dependency structure makes memorization easier because you can always re-derive any formula you forget.

The dependency map shows how sin x and cos x (top row) feed into the four quotient/reciprocal functions (middle rows) via the quotient rule. The sign pattern box at the bottom summarizes the mnemonic: co-functions always introduce a negative sign in their derivatives.
Complete summary of the four derivative formulas with their sign behavior
Function f(x)Rewritten asf ′(x)Sign of f ′(x)
tan xsin x / cos xsec²xAlways positive (≥ 1)
cot xcos x / sin x−csc²xAlways negative (≤ −1)
sec x1 / cos xsec x tan xDepends on quadrant
csc x1 / sin x−csc x cot xDepends on quadrant

Worked Example — Differentiating a Composite Function

Let us differentiate f(x) = 3 sec(2x) − tan²(x). This example combines the derivative of secant with the chain rule and the power rule applied to a trigonometric function, which is exactly the type of multi-step problem that appears on the AP Calculus AB exam.

Find f ′(x) where f(x) = 3 sec(2x) − tan²(x)
1
Step 1 — Identify the component functionsWe have two terms. The first term, 3 sec(2x), is a secant function with an inner function u = 2x. The second term, tan²(x), is [tan(x)]², so we need the power rule combined with the derivative of tangent.
2
Step 2 — Differentiate the first term using the chain ruled/dx [3 sec(2x)] = 3 · sec(2x) tan(2x) · d/dx [2x] = 3 · sec(2x) tan(2x) · 2.
= 6 sec(2x) tan(2x)
3
Step 3 — Differentiate the second term using the power and chain rulesd/dx [tan²(x)] = 2 tan(x) · d/dx [tan(x)] = 2 tan(x) · sec²(x).
= 2 tan(x) sec²(x)
4
Step 4 — Combine the resultsSubtract the derivative of the second term from the derivative of the first term.
f ′(x) = 6 sec(2x) tan(2x) − 2 tan(x) sec²(x)
⚠️ Common Mistake Alert
When differentiating sec(2x), students frequently forget the chain rule factor of 2 from the inner function. Always ask: "Is the argument of the trig function anything other than just x?" If so, multiply by the derivative of that inner function.

Strengths, Limitations & Common Confusions

Having all six derivative formulas at your disposal is powerful, but students often encounter predictable pitfalls. The table below contrasts correct reasoning with common errors, helping you build the pattern recognition that prevents mistakes under time pressure on the AP exam.

Correct ApproachCommon ErrorWhy It Matters
d/dx [tan x] = sec²x (positive)Writing −sec²x by falsely applying the co-function sign rule to tangentTangent is NOT a co-function, so it has a positive derivative. Only cos, cot, and csc carry the minus sign.
d/dx [sec x] = sec x · tan xWriting sec x · sec x = sec²x by confusing with the tangent derivativeThe secant derivative pairs sec with tan, not sec with sec. Mixing them up changes the answer entirely.
d/dx [csc(3x)] = −csc(3x) cot(3x) · 3Omitting the chain rule factor of 3Any composite trig function requires multiplying by the derivative of the inner function. This error loses points on nearly every FRQ.
Domain: d/dx [tan x] is undefined at x = π/2 + nπClaiming the derivative exists everywhere because sec²x has no obvious zerosec²x itself is undefined at the same points where tan x has vertical asymptotes. The derivative inherits the parent function's domain restrictions.
KEY TAKEAWAY
In engineering, system diagnostics follow a hierarchy: check power, check connections, then check components. Similarly, when differentiating trig functions, follow your own diagnostic hierarchy: (1) identify the outer function's derivative rule, (2) check for an inner function (chain rule), and (3) verify the sign. This three-step mental checklist catches the vast majority of errors.

Connection to Advanced Theory — Integration and Beyond

Mastering these derivative formulas is not merely an exercise in memorization—it lays the groundwork for the antiderivative and integration techniques you will encounter later in the AP Calculus AB curriculum. Each derivative formula, read in reverse, becomes an antiderivative formula. For instance, knowing that d/dx [tan x] = sec²x immediately tells you that ∫ sec²x dx = tan x + C. The table below previews how each derivative connects to its corresponding integral.

Derivative (Current Topic)Corresponding Antiderivative (Future Topic)
d/dx [tan x] = sec²x∫ sec²x dx = tan x + C
d/dx [cot x] = −csc²x∫ csc²x dx = −cot x + C
d/dx [sec x] = sec x tan x∫ sec x tan x dx = sec x + C
d/dx [csc x] = −csc x cot x∫ csc x cot x dx = −csc x + C

Beyond antiderivatives, these formulas reappear when you study related rates problems involving angles (e.g., a spotlight rotating at a constant angular velocity illuminating a wall) and optimization problems where trigonometric expressions must be differentiated and set equal to zero. In multivariable calculus and differential equations, these same identities and derivative rules carry over directly, making fluency with them a long-term investment in mathematical capability.

Practice Problems

1
Which of the following correctly explains why the derivative of tan x is always positive on its domain?
2
What is d/dx [csc(5x)]?
3
If g(x) = x² tan(x), what is g ′(x)?
PROBLEM 4APPLIED
A searchlight rotates at a constant rate, and its beam hits a wall that is 20 meters away. The position along the wall is given by y = 20 tan(θ), where θ is the angle the beam makes with the line perpendicular to the wall, and θ is measured in radians. Suppose dθ/dt = π/6 radians per second. (a) Find dy/dθ. (b) Find dy/dt when θ = π/4. (c) Find dy/dt when θ = π/3. (d) Explain in the context of the problem why the speed along the wall increases as θ increases toward π/2.
PROBLEM 5CRITICAL THINKING
Using the quotient rule and the Pythagorean identity, prove that d/dx [cot x] = −csc²x. Then explain why the result guarantees that cot x is strictly decreasing on every interval in its domain.

Lesson Summary

The derivatives of the four remaining trigonometric functions—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—are all derived by expressing each function as a quotient of sin x and cos x and then applying the quotient rule. In each case the Pythagorean identity simplifies the result to a clean, memorizable formula.

The key memorization aid is the co-function sign rule: derivatives of cos x, cot x, and csc x all carry a negative sign, while sin x, tan x, and sec x have positive derivatives. When combined with the chain rule, these formulas enable you to differentiate any composite trigonometric expression, a skill that is essential for related rates, optimization, and the eventual study of antiderivatives later in the AP Calculus AB course.

Varsity Tutors • AP Calculus AB • Finding the Derivatives of Tangent, Cotangent, Secant, and/or Cosecant Functions