Skip to main content

Unit 2 · Topic 2.10

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

The derivatives of tan x, cot x, sec x and csc x come from writing each one in terms of sine and cosine and using the quotient rule. You should memorize the four results and know where they come from.

Key terms

  • derivative of tan x
  • derivative of cot x
  • derivative of sec x
  • derivative of csc x
  • trig identities

The four derivatives

Memorize these four. A pattern helps: the three “co” functions (cos, cot, csc) all have a minus sign in their derivatives, tan pairs with sec, and cot pairs with csc.

FunctionDerivative
tan xsec²x
cot x−csc²x
sec xsec x tan x
csc x−csc x cot x

Deriving tan x

Write tan⁡x=sin⁡xcos⁡x\tan x = \dfrac{\sin x}{\cos x} and use the quotient rule: cos⁡x⋅cos⁡x−sin⁡x⋅(−sin⁡x)cos⁡2x=cos⁡2x+sin⁡2xcos⁡2x.\frac{\cos x \cdot \cos x - \sin x \cdot (-\sin x)}{\cos^2 x} = \frac{\cos^2 x + \sin^2 x}{\cos^2 x}.

By the Pythagorean identity, cos²x + sin²x = 1. So the derivative is 1cos⁡2x=sec⁡2x\frac{1}{\cos^2 x} = \sec^2 x. The derivation for cot⁡x=cos⁡xsin⁡x\cot x = \frac{\cos x}{\sin x} is similar and gives −1sin⁡2x=−csc⁡2x-\frac{1}{\sin^2 x} = -\csc^2 x.

Deriving sec x

Write sec⁡x=1cos⁡x\sec x = \frac{1}{\cos x}. Quotient rule: 0⋅cos⁡x−1⋅(−sin⁡x)cos⁡2x=sin⁡xcos⁡2x\dfrac{0 \cdot \cos x - 1 \cdot (-\sin x)}{\cos^2 x} = \dfrac{\sin x}{\cos^2 x}.

Split it: 1cos⁡x⋅sin⁡xcos⁡x=sec⁡xtan⁡x\frac{1}{\cos x} \cdot \frac{\sin x}{\cos x} = \sec x \tan x. Similarly, csc⁡x=1sin⁡x\csc x = \frac{1}{\sin x} gives −cos⁡xsin⁡2x=−csc⁡xcot⁡x-\frac{\cos x}{\sin^2 x} = -\csc x \cot x.

Domains and values to know

These derivatives exist wherever the original function is defined. tan x and sec x aren't defined where cos x = 0 (x = π/2 + kπ), and cot x and csc x aren't defined where sin x = 0 (x = kπ).

You'll need exact values at the standard angles. For instance, at x = π/4: tan = 1, sec = √2. At x = π/6: csc = 2, cot = √3. At x = π/3: sec = 2, tan = √3.

Using these with other rules

These derivatives combine with the product and quotient rules just like sin x and cos x. For y = eˣ sec x, the product rule gives y′ = eˣ sec x + eˣ sec x tan x = eˣ sec x(1 + tan x).

Identities can make answers look different but still be equal. Since 1 + tan²x = sec²x, the derivative of tan x can also be written 1 + tan²x. If your answer doesn't match an answer choice, try an identity before deciding you're wrong.

When the angle is something other than x, like tan(3x) or sec(x²), you'll also need the chain rule from 3.1.

Worked examples

Try each one yourself first, then open the solution.

  1. Example 1

    Product rule with tan x

    Differentiate f(x) = x tan x.

    Show the solution
    1. Step 1: Product rule: f′(x) = (1)(tan x) + x(sec²x).

    Answer: f′(x) = tan x + x sec²x

  2. Example 2

    Tangent line to sec x

    Find the equation of the line tangent to y = sec x at x = π/4.

    Show the solution
    1. Step 1: Point: sec⁡(π/4)=1cos⁡(π/4)=12/2=2\sec(\pi/4) = \dfrac{1}{\cos(\pi/4)} = \dfrac{1}{\sqrt{2}/2} = \sqrt{2}. So the point is (π/4, √2).
    2. Step 2: Slope: y′ = sec x tan x. At π/4: √2·1 = √2.
    3. Step 3: Equation: y − √2 = √2(x − π/4).

    Answer: y − √2 = √2(x − π/4)

  3. Example 3

    Trap: the missing minus sign

    Find the slope of y = csc x at x = π/6.

    Show the solution
    1. Step 1: y′ = −csc x cot x. The minus sign is part of the formula (csc is a “co” function).
    2. Step 2: csc⁡(π/6)=1sin⁡(π/6)=11/2=2\csc(\pi/6) = \dfrac{1}{\sin(\pi/6)} = \dfrac{1}{1/2} = 2, and cot⁡(π/6)=cos⁡(π/6)sin⁡(π/6)=3/21/2=3\cot(\pi/6) = \dfrac{\cos(\pi/6)}{\sin(\pi/6)} = \dfrac{\sqrt{3}/2}{1/2} = \sqrt{3}.
    3. Step 3: y′(π/6) = −(2)(√3).
    4. Step 4: Sense check: on (0, π/2), csc x decreases from very large values toward 1, so a negative slope makes sense.

    Answer: The slope is −2√3.

Common mistakes

  • Dropping the minus sign on the derivatives of cot x and csc x.
  • Writing the derivative of sec x as tan²x or sec²x. It's sec x tan x.
  • Mixing up sec²x (the derivative of tan x) with 2 sec x.

On the exam

  • These derivatives mostly appear in multiple choice, often inside a chain rule or product rule. The exact values at π/6, π/4 and π/3 come up repeatedly.
  • The reverse facts will matter in Unit 6: since ddxtan⁡x=sec⁡2x\frac{d}{dx}\tan x = \sec^2 x, an antiderivative of sec²x is tan x.

Connected topics

Videos

  • Calculus AB/BC – 2.10 Derivatives of tan(x), cot(x), sec(x), csc(x)

    The AlgebrosWatch on YouTube (opens in a new tab)

  • Derivatives of tan(x) and cot(x) | Derivative rules | AP Calculus AB | Khan Academy

    Khan AcademyWatch on YouTube (opens in a new tab)

  • AP Calculus AB TOPIC 2.10 Finding the Derivatives of Tangent, Cotangent, Secant, Cosecant Functions

    Math Teacher GOATWatch on YouTube (opens in a new tab)

  • Derivatives of Trigonometric Functions

    The Organic Chemistry TutorWatch on YouTube (opens in a new tab)

  • Derivatives of Trigonometric Functions

    Professor Dave ExplainsWatch on YouTube (opens in a new tab)

  • Derivatives of sec(x) and csc(x) | Derivative rules | AP Calculus AB | Khan Academy

    Khan AcademyWatch on YouTube (opens in a new tab)

Check yourself: 2.10 Finding the Derivatives of Tangent, Cotangent, Secant, and/or Cosecant Functions

4 questions on 2.10 Finding the Derivatives of Tangent, Cotangent, Secant, and/or Cosecant Functions. Pick an answer to see if you got it, and why.

Question 1 of 4

If y = csc x + cot x, then dydx=\dfrac{dy}{dx} =

Question 2 of 4

If f(x) = sec x, what is f′(π/3) ?

Question 3 of 4

Which of the following is an equation of the line tangent to the graph of y = tan x at x = π/4 ?

Question 4 of 4

If f(x) = x tan x, what is f′(π4)f'\left(\frac{\pi}{4}\right)?

0 of 4 answered

Something wrong or out of date here?

Something wrong with this page?

What's wrong?

Please don't include personal details.