AP Calculus BC • Differentiation: Definition and Fundamental Properties

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

Extend the quotient rule to derive and apply the derivatives of the four remaining trigonometric functions.

AP Calculus BC illustration with summation, combined graphs, and an orbit
Inside this lesson 10 sections 5 questions 9 figures

SECTION 1

Historical Context & Motivation

The story of differentiating trigonometric functions is inseparable from the broader development of calculus itself. While sine and cosine were the first trigonometric functions whose derivatives were rigorously established, mathematicians quickly recognized that the tangent, cotangent, secant, and cosecant functions—defined as ratios and reciprocals of sine and cosine—demanded their own derivative formulas. These secondary derivatives became essential tools in navigation, optics, and the study of periodic phenomena, where slope and rate-of-change information about more complex waveforms was needed.

1614 • Napier's Trigonometric Tables

John Napier published extensive tables of tangent, secant, and other trigonometric values to aid astronomical computation, establishing these functions as independent objects of study.

1665–1676 • Newton & Leibniz Develop Calculus

Newton's method of fluxions and Leibniz's differential calculus provided the formal machinery—particularly the quotient rule—needed to differentiate rational combinations of sine and cosine.

1748 • Euler's Introductio in Analysin Infinitorum

Euler systematized all six trigonometric functions as analytic objects, deriving their series expansions and differentiation formulas in the modern notation we use today.

1800s • Standardized Calculus Curricula

Textbooks by Cauchy, Weierstrass, and others codified the derivatives of all six trigonometric functions as foundational results, embedding them permanently in the calculus canon.

With the derivatives of sin x and cos x already in hand, the central question becomes: how can we systematically derive the derivatives of tan x, cot x, sec x, and csc x using only the quotient rule and the known derivatives of sine and cosine? This lesson answers that question and builds fluency with these four formulas so that you can apply them confidently under exam conditions.

SECTION 2

Core Principles & Definitions

Before deriving any formulas, it is essential to recall the definitions of the four functions in terms of sine and cosine, as well as the two prerequisite derivative facts. The quotient rule serves as the single unifying technique: because 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 in this lesson reduces to a quotient-rule application followed by a Pythagorean-identity simplification.

1

Prerequisite: d/dx [sin x] = cos x

The derivative of sine is cosine. This fact, proved via the limit definition, is a building block for every result in this lesson.
2

Prerequisite: d/dx [cos x] = −sin x

The derivative of cosine is the negative of sine. The negative sign propagates into the derivative formulas for sec x and tan x.
3

Quotient Rule

If h(x) = f(x)/g(x), then h′(x) = [f′(x)g(x) − f(x)g′(x)] / [g(x)]². This rule is applied four times to obtain the four derivatives.
4

Pythagorean Identities

sin²x + cos²x = 1, 1 + tan²x = sec²x, and 1 + cot²x = csc²x. These identities simplify the quotient-rule results into the compact final formulas.
5

Domain Awareness

Each derivative formula is valid only where the original function is defined. Tan x and sec x exclude odd multiples of π/2; cot x and csc x exclude integer multiples of π.
✦

KEY TAKEAWAY

Think of the quotient rule as a universal adapter: just as a single adapter lets you plug any foreign device into a wall outlet, the quotient rule lets you convert any ratio of sine and cosine into its derivative. You only need two facts (the derivatives of sin x and cos x) and one tool (the quotient rule) to unlock four new formulas.

SECTION 3

Visual Explanation — Graphs and Their Derivatives

A powerful way to internalize these derivatives is to see the original function alongside its derivative on the same axes. The diagram below plots y = tan x and its derivative y = sec²x over the interval (−π/2, π/2). Notice that wherever tan x has a horizontal tangent (at x = 0), sec²x equals 1—its minimum value. As tan x steepens near its vertical asymptotes, sec²x grows without bound, reflecting the increasingly rapid rate of change.

y = tan x and y = sec²x on (−π/2, π/2)xy−π/2π/20−π/4π/4tan xsec²xsec²(0) = 1
The cyan curve is y = tan x and the pink curve is y = sec²x. At x = 0, tan x = 0 and sec²x = 1, confirming that the slope of tan x at the origin is 1. As x → ±π/2, both functions diverge to infinity.

This visual reinforces a critical observation: the derivative sec²x is always positive on its domain, which is consistent with the fact that tan x is strictly increasing on each interval between consecutive vertical asymptotes. By contrast, the derivative of cot x turns out to be −csc²x, which is always negative, reflecting the strictly decreasing behavior of cotangent on each of its intervals.

SECTION 4

Mathematical Framework — Deriving the Four Formulas

We now carry out the four derivations in full. Each one follows the same three-step pattern: express the function as a quotient of sine and cosine, apply the quotient rule, and simplify using the Pythagorean identity sin²x + cos²x = 1.

Derivative of tan x

Write tan x = sin x / cos x. Let f(x) = sin x and g(x) = cos x. The quotient rule gives d/dx [tan x] = [cos x · cos x − sin x · (−sin x)] / cos²x = [cos²x + sin²x] / cos²x = 1 / cos²x = sec²x.

DERIVATIVE OF TANGENT

d/dx[tanx]=sec2xd/dx [tan x] = sec²x

Valid for all x where cos x ≠ 0, i.e., x ≠ π/2 + nπ for any integer n.

Derivative of cot x

Write cot x = cos x / sin x. Applying the quotient rule with f(x) = cos x and g(x) = sin x yields d/dx [cot x] = [−sin x · sin x − cos x · cos x] / sin²x = −[sin²x + cos²x] / sin²x = −1 / sin²x = −csc²x.

DERIVATIVE OF COTANGENT

d/dx[cotx]=−csc2xd/dx [cot x] = −csc²x

Valid for all x where sin x ≠ 0, i.e., x ≠ nπ for any integer n.

Derivative of sec x

Write sec x = 1 / cos x. Applying the quotient rule with f(x) = 1 and g(x) = cos x gives d/dx [sec x] = [0 · cos x − 1 · (−sin x)] / cos²x = sin x / cos²x. Rewriting this as (1/cos x)(sin x/cos x) yields sec x tan x.

DERIVATIVE OF SECANT

d/dx[secx]=secx⋅tanxd/dx [sec x] = sec x · tan x

Valid for all x where cos x ≠ 0. The product form sec x tan x is the standard representation.

Derivative of csc x

Write csc x = 1 / sin x. The quotient rule with f(x) = 1 and g(x) = sin x gives d/dx [csc x] = [0 · sin x − 1 · cos x] / sin²x = −cos x / sin²x. Factoring as −(1/sin x)(cos x/sin x) produces −csc x cot x.

DERIVATIVE OF COSECANT

d/dx[cscx]=−cscx⋅cotxd/dx [csc x] = −csc x · cot x

Valid for all x where sin x ≠ 0. Note the negative sign—csc x mirrors sec x but with an extra factor of −1.

A floor-mounted spotlight casts one oblique beam to a spot on a laboratory wall.For a light 20 m from a wall rotating at 0.5 rad/s, y = 20 tan θ gives dy/dt = 10 sec²θ. At θ = π/3, the spot moves at 40 m/s.

For a light 20 m from a wall rotating at 0.5 rad/s, y = 20 tan θ gives dy/dt = 10 sec²θ. At θ = π/3, the spot moves at 40 m/s.For a light 20 m from a wall rotating at 0.5 rad/s, y = 20 tan θ gives dy/dt = 10 sec²θ. At θ = π/3, the spot moves at 40 m/s.

SECTION 5

Patterns & Memory Aids

Memorizing four separate formulas becomes far easier when you recognize the structural symmetry between the "co" pairs. The derivative of each co-function (cotangent, cosecant) mirrors the derivative of its companion function (tangent, secant) but carries an extra negative sign. This pattern originates in the fact that d/dx [cos x] = −sin x carries a negative sign while d/dx [sin x] = cos x does not.

FunctionDerivativeCo-functionDerivative of Co-function
tan xsec²xcot x−csc²x
sec xsec x tan xcsc x−csc x cot x

Co-function derivative pairs — the co-version always picks up a negative sign.

Co-function Symmetry Maptan x→ sec²xcot x→ −csc²xadd negativesec x→ sec x tan xcsc x→ −csc x cot xadd negativesin x→ cos xcos x→ −sin xadd negativeFunctionsCo-functions
Every co-function derivative mirrors its partner but with a negative sign. This pattern holds across all three pairs: sin/cos, tan/cot, sec/csc.
💡

Memory Tip

If a trig function starts with "co" (cosine, cotangent, cosecant), its derivative carries a negative sign. Functions without the "co" prefix (sine, tangent, secant) yield positive derivatives. This single mnemonic eliminates half the sign confusion on exam day.

SECTION 6

Worked Example — Differentiating a Composite Expression

Let us work through a representative problem that combines the chain rule with the derivative formulas developed in Section 4. Problems of this type appear routinely on the AP Calculus BC exam.

Find dy/dx for y = 3 sec(2x) + tan²(x)

  1. 1

    Step 1 — Identify the component functions

    The expression has two additive terms. The first term, 3 sec(2x), is a constant multiple of the secant of a linear inner function u = 2x. The second term, tan²(x), is [tan x]² — a power of a trigonometric function.
  2. 2

    Step 2 — Differentiate the first term using the chain rule

    d/dx [3 sec(2x)] = 3 · sec(2x) tan(2x) · d/dx [2x] = 3 · sec(2x) tan(2x) · 2 = 6 sec(2x) tan(2x). We applied d/du [sec u] = sec u tan u and multiplied by the inner derivative du/dx = 2.
    6 sec(2x) tan(2x)
  3. 3

    Step 3 — Differentiate the second term using the chain rule

    Write tan²(x) = [tan x]². Applying the general power rule: d/dx [tan x]² = 2 tan x · d/dx [tan x] = 2 tan x · sec²x.
    2 tan x sec²x
  4. 4

    Step 4 — Combine the results

    Adding the derivatives of both terms gives the final answer.
    dy/dx = 6 sec(2x) tan(2x) + 2 tan x sec²x
⚠

Common Pitfall

Students frequently forget to multiply by the inner derivative when applying the chain rule to expressions like sec(2x). On the AP exam, always write out the inner function explicitly and multiply by its derivative as a separate factor. Omitting this step is one of the most heavily penalized errors on FRQ scoring.

SECTION 7

Strengths, Limitations & Common Errors

Understanding where each formula excels and where students commonly stumble is just as important as knowing the formulas themselves. The table below contrasts the properties of each derivative formula, highlighting domain restrictions and typical error patterns.

FormulaAlways Positive/Negative?Common Student Errors
d/dx [tan x] = sec²xAlways positive (sec²x ≥ 1)Writing sec x instead of sec²x; forgetting the square
d/dx [cot x] = −csc²xAlways negative (−csc²x ≤ −1)Dropping the negative sign; confusing with sec²x
d/dx [sec x] = sec x tan xSign matches sign of tan xWriting sec²x tan x instead of sec x tan x
d/dx [csc x] = −csc x cot xSign opposite to cot xOmitting the negative sign; mixing up csc and sec

Derivative properties and frequent mistakes

✦

KEY TAKEAWAY

Think of the sign of the derivative as a quality-control check. After computing any trigonometric derivative, ask: does the sign make geometric sense? If you know cot x is strictly decreasing on (0, π), then its derivative must be negative everywhere on that interval. A positive answer would be an immediate red flag, much like an engineer noticing a bridge stress calculation that predicts a negative force where tension should exist.

SECTION 8

Connection to Advanced Topics

The four derivative formulas derived in this lesson serve as essential building blocks for several advanced calculus topics that appear later on the AP Calculus BC exam. Integration of trigonometric functions, in particular, frequently relies on recognizing these derivatives in reverse. For example, knowing that d/dx [tan x] = sec²x immediately tells you that ∫ sec²x dx = tan x + C. Similarly, the integral ∫ sec x tan x dx = sec x + C follows directly from the derivative of sec x.

This Lesson's ResultAdvanced Application (BC Exam)
d/dx [tan x] = sec²xAntiderivative: ∫ sec²x dx = tan x + C; integral of tan x via substitution
d/dx [sec x] = sec x tan xTrigonometric substitution in integrals (e.g., x = a sec θ); integration of sec x
d/dx [cot x] = −csc²xAntiderivative: ∫ csc²x dx = −cot x + C; appears in partial fraction integrals
d/dx [csc x] = −csc x cot xReduction formulas for ∫ cscⁿx dx; arc-length computations involving csc x
Chain rule + trig derivativesImplicit differentiation, related rates, parametric and polar derivatives

How today's derivatives feed into advanced BC topics

Beyond the AP exam, these derivatives play central roles in Fourier analysis, where trigonometric functions form the basis for representing periodic signals, and in differential equations, where solutions often involve combinations of all six trigonometric functions and their derivatives. Mastering these formulas now establishes a foundation that extends well beyond a single exam.

SECTION 9

Practice Problems

Question 1: CONCEPTUAL

Which of the following correctly explains why the derivative of cot x carries a negative sign while the derivative of tan x does not?
  • A. Because cot x = cos x / sin x, the quotient rule produces cos²x + sin²x = 1 in the numerator, which is positive, so the derivative is positive—it does not carry a negative sign.
  • B. The negative sign arises because cot x is the reciprocal of tan x, and taking the reciprocal always introduces a negative sign in the derivative.
  • C. When the quotient rule is applied to cos x / sin x, the numerator becomes −sin²x − cos²x = −(sin²x + cos²x) = −1, producing the overall negative sign.
  • D. The negative sign is a convention chosen so that the co-function derivatives all carry negative signs; the derivation itself yields a positive result.
  • E. The derivative of cot x is −sec²x, and the negative comes from the chain rule applied to cos(x).
Show answer (C)
The correct answer is C. When we differentiate cot x = cos x / sin x using the quotient rule, the numerator is (−sin x)(sin x) − (cos x)(cos x) = −sin²x − cos²x = −(sin²x + cos²x) = −1. Dividing by sin²x gives −1/sin²x = −csc²x. Option A is incorrect because it misidentifies the sign of the numerator: the quotient rule for cot x yields −1, not +1. Option B is wrong because the reciprocal rule gives d/dx [1/f] = −f′/f², which introduces a negative from the rule structure, not simply from 'being a reciprocal'—and furthermore cot x ≠ 1/tan x in terms of why the sign appears. Option D is incorrect because the negative sign is a mathematical consequence, not a convention. Option E gives the wrong derivative entirely; d/dx [cot x] = −csc²x, not −sec²x.

Question 2: BASIC CALCULATION

Find d/dx [5 csc x − 2 tan x].
  • A. −5 csc x cot x − 2 sec²x
  • B. 5 csc x cot x − 2 sec²x
  • C. −5 csc x cot x + 2 sec²x
  • D. −5 csc²x − 2 sec x tan x
  • E. 5 sec x tan x − 2 csc²x
Show answer (A)
The correct answer is A. By the constant multiple rule and the standard derivative formulas: d/dx [5 csc x] = 5(−csc x cot x) = −5 csc x cot x, and d/dx [−2 tan x] = −2 sec²x. Combining: −5 csc x cot x − 2 sec²x. Option B is wrong because it drops the negative sign from the csc x derivative. Option C incorrectly makes the tan x term positive. Option D confuses the derivative of csc x with csc²x (mixing up the cot and csc formulas) and the derivative of tan x with sec x tan x. Option E swaps the derivative formulas entirely, applying the sec x rule to the csc x term and vice versa.

Question 3: INTERMEDIATE

Let f(x) = sec(3x²). What is f ′(x)?
  • A. sec(3x²) tan(3x²)
  • B. 6x sec(3x²) tan(3x²)
  • C. 3x² sec(3x²) tan(3x²)
  • D. 6x sec²(3x²)
  • E. 6x sec(3x²) sec²(3x²)
Show answer (B)
The correct answer is B. Let u = 3x². Then f(x) = sec(u), so f ′(x) = sec(u) tan(u) · du/dx = sec(3x²) tan(3x²) · 6x. Option A omits the chain rule factor du/dx = 6x entirely. Option C uses the inner function 3x² instead of its derivative 6x. Option D applies the tan x derivative formula (sec²x) instead of the sec x derivative formula (sec x tan x). Option E incorrectly writes sec · sec² instead of sec · tan.

Question 4: APPLIED

5 pts
A spotlight mounted on the ground is located 20 meters from a vertical wall. The light rotates at a constant rate of dθ/dt = 0.5 rad/s, where θ is the angle between the beam and the line perpendicular to the wall. Let y be the vertical distance from the point on the wall closest to the light to the point where the beam hits the wall. (a) Express y as a function of θ. (1 point) (b) Find dy/dθ. (1 point) (c) Find dy/dt in terms of θ. (1 point) (d) Evaluate dy/dt when θ = π/3. (1 point) (e) Explain in the context of this problem why dy/dt increases without bound as θ → π/2⁻. (1 point)
Show answer
Rubric (5 points): (a) [1 point] Since the wall is 20 m from the light and the beam makes angle θ with the perpendicular, y = 20 tan θ. Award 1 point for correctly setting up the tangent relationship. (b) [1 point] dy/dθ = 20 sec²θ. Award 1 point for correct differentiation using d/dθ [tan θ] = sec²θ with the constant multiple. (c) [1 point] By the chain rule, dy/dt = (dy/dθ)(dθ/dt) = 20 sec²θ · 0.5 = 10 sec²θ. Award 1 point for correctly applying the chain rule and substituting dθ/dt = 0.5. (d) [1 point] When θ = π/3, sec(π/3) = 2, so sec²(π/3) = 4. Therefore dy/dt = 10 · 4 = 40 m/s. Award 1 point for correct evaluation. (e) [1 point] As θ → π/2⁻, sec θ → ∞, so sec²θ → ∞ and dy/dt = 10 sec²θ → ∞. In context, when the beam is nearly parallel to the wall, a small change in angle sweeps the illuminated point across a very large distance on the wall in a short time, so the speed of the light spot increases without bound. Award 1 point for a correct limit argument connected to a contextual interpretation.

Question 5: CRITICAL THINKING

3 pts
Prove, using only the quotient rule and the Pythagorean identity, that d/dx [csc x] = −csc x cot x. Then explain why csc x has exactly one critical point on the interval (0, π).
Show answer
Rubric (3 points): [1 point] Proof setup and quotient rule application: Write csc x = 1/sin x. By the quotient rule, d/dx [csc x] = [0 · sin x − 1 · cos x] / sin²x = −cos x / sin²x. [1 point] Algebraic simplification to final form: Rewrite −cos x / sin²x = −(1/sin x)(cos x / sin x) = −csc x cot x. This completes the proof. [1 point] Critical point analysis: A critical point occurs where the derivative is zero or undefined. On (0, π), sin x > 0, so csc x is defined and continuous. The derivative −csc x cot x = 0 only when cot x = 0, i.e., at x = π/2. At x = π/2, csc(π/2) = 1 and cot(π/2) = 0, so the derivative equals 0, and it is the only such point in (0, π). Thus csc x has exactly one critical point on (0, π), at x = π/2, where it attains its minimum value of 1. Award the point for correctly identifying that −csc x cot x = 0 only when cot x = 0 on (0, π) and providing valid justification.

SUMMARY

Lesson Summary

Summary

This lesson established the derivatives of the four remaining trigonometric functions by applying the quotient rule to ratios and reciprocals of sine and cosine. The central 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. Each derivation relied on the Pythagorean identity sin²x + cos²x = 1 for simplification.

A powerful mnemonic connects all six trigonometric derivatives: co-function derivatives always carry a negative sign. When combined with the chain rule, these four formulas enable differentiation of composite, product, and quotient expressions involving any trigonometric function—skills that are tested extensively in both the multiple-choice and free-response sections of the AP Calculus BC exam.

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