Unit 2: Differentiation: Definition and Fundamental Properties
Derivatives of Tangent, Cotangent, Secant, and Cosecant
Derive and use the derivatives of tan x, cot x, sec x and csc x by rewriting them in sine and cosine, and simplify with identities before differentiating.
Topic 2.10 · 5 min read
Tangent, cotangent, secant and cosecant are all built from sine and cosine by division: tanx=cosxsinx, cotx=sinxcosx, secx=cosx1, cscx=sinx1. So their derivatives need nothing new: the quotient rule (topic 2.9), the derivatives of sine and cosine (topic 2.7), and the identity sin2x+cos2x=1. Deriving them once shows you where each formula comes from, and the same rewriting habit lets you simplify many trig expressions before differentiating.
Tangent and cotangent
For tanx=cosxsinx, the top has derivative cosx and the bottom has derivative −sinx. The quotient rule gives
The Pythagorean identity is what collapses the numerator to 1. This holds wherever cosx=0, which is exactly where tanx is defined.
The result says something about the graph. Since cos2x≤1, its reciprocal sec2x is always at least 1. So every tangent line to y=tanx has slope at least 1: the graph rises on every interval of its domain, with its gentlest slope, exactly 1, at x=0,±π,…, where cos2x=1. Near x=±2π, cosx→0 and the slope grows without bound, matching the vertical asymptotes.
The last step splits cos2x into two factors so the answer can be written with the familiar functions. For cscx=sinx1:
dxdcscx=−sin2xcosx=−sinx1⋅sinxcosx=−cscxcotx.
The pattern makes these easy to keep straight. Each "co" function's derivative is its partner's derivative with every function swapped for its co-function and a minus sign in front: tan→cot, sec→csc, and a negative sign. That is the same pattern as sinx→cosx versus cosx→−sinx.
Equivalent forms are all correct. Because 1+tan2x=sec2x (divide sin2x+cos2x=1 by cos2x), the derivative of tanx can also be written 1+tan2x or cos2x1. Exam answers in any equivalent form earn credit, and multiple-choice questions sometimes list the derivative in one of the less familiar forms.
Rewrite with identities first
These four rules plus the ones from topics 2.6 to 2.9 can differentiate any combination of trig functions, but rewriting first often turns a long calculation into a short one. The tools are the definitions and the Pythagorean identities:
cosxtanx=cosx⋅cosxsinx=sinx (where cosx=0), so its derivative is cosx, without the product rule.
tanxsecx=cosx1⋅sinxcosx=cscx, so its derivative is −cscxcotx, without the quotient rule.
sec2x−tan2x=1, a constant, so its derivative is 0.
The rewritten function equals the original only where the original is defined. cosxtanx is undefined at x=2π even though sinx is not, so the derivative cosx applies only where cosx=0.
Evaluating these derivatives at special angles is where arithmetic errors happen. Get each value from sine and cosine:
x
sinx
cosx
tanx
secx
sec2x
6π
21
23
31
32
34
4π
22
22
1
2
2
3π
23
21
3
2
4
Worked examples
Worked exampleExample 1: evaluating at a special angle
Let f(x)=3tanx−2secx. Find f′(3π).
Show solution
Differentiate term by term with the constant multiple rule:
f′(x)=3sec2x−2secxtanx.
At x=3π, cosx=21, so secx=2 and sec2x=4, and tanx=3:
f′(3π)=3(4)−2(2)(3)=12−43.
Worked exampleExample 2: simplify, then differentiate
Find dxdy for y=sinxcosx1−cos2x.
Show solution
Differentiating this as it stands needs the quotient rule and a product rule in the denominator. Rewrite first. By the Pythagorean identity the numerator is sin2x, so wherever sinx=0 and cosx=0,
y=sinxcosxsin2x=cosxsinx=tanx.
Therefore
dxdy=sec2x,
for every x where the original function is defined (that is, where neither sinx nor cosx is 0).
Worked exampleExample 3: a product with secant
Write an equation for the line tangent to the graph of h(x)=xsecx at x=3π.
Show solution
The point: h(3π)=3π⋅2=32π.
The slope: h is a product, so
h′(x)=1⋅secx+xsecxtanx.
At x=3π, with secx=2 and tanx=3,
h′(3π)=2+3π(2)(3)=2+323π.
The tangent line is
y=32π+(2+323π)(x−3π).
There is nothing to gain from simplifying further; point-slope form with exact values is a complete answer.
Worked exampleExample 4: an exam-style free-response question (no calculator)
Let g(x)=2x−tanx for −2π<x<2π.
(a) Find g′(x).
(b) Find all x in the interval at which the graph of g has a horizontal tangent line.
(c) Is there any x in the interval at which the line tangent to the graph of g has slope 3? Justify your answer.
Show solution
(a) g′(x)=2−sec2x.
(b) Set g′(x)=0: sec2x=2, so cos2x=21 and cosx=22 (cosine is positive on this interval, so the negative root is not possible). Then x=−4π or x=4π.
(c) No. For every x in the interval, 0<cos2x≤1, so sec2x=cos2x1≥1. Therefore g′(x)=2−sec2x≤2−1=1. The slope of the graph of g is never greater than 1, so it is never 3.
Part (c) is the kind of question where a bound on the derivative is the whole argument. The justification must say why sec2x≥1, not only that g′(x)=3 "has no solution".
Where students lose points
On the exam
These four formulas are expected from memory; no formula sheet gives them, and they appear inside product, quotient and chain-rule problems as well as on their own. On no-calculator questions, evaluating them at 6π, 4π and 3π by hand is part of the task, and exact answers such as 12−43 need no decimal approximation.
Check yourself
Question 1
What is the derivative of cotx at x=4π?
A
2
B
−1
C
−2
D
−2
Show answer
C
dxdcotx=−csc2x, and csc4π=2, so the value is −2. Choice A drops the minus sign, and choice D forgets to square cscx.
Question 2
Find dxd(tan2x−sec2x).
Show answer
0
Since 1+tan2x=sec2x, the expression equals −1 wherever it is defined, and a constant has derivative 0. Differentiating each term separately also works, but the identity shows the answer at once.
Question 3
Write an equation for the line tangent to the graph of y=cscx at x=2π.
Show answer
y=1
The point is (2π,csc2π)=(2π,1). The slope is −csc2πcot2π=−(1)(0)=0, so the tangent line is horizontal.
Question 4
For how many values of x in −2π<x<2π is the derivative of tanx equal to 21?
A
One
B
None
C
Two
D
Infinitely many
Show answer
B
The derivative is sec2x=cos2x1, and cos2x≤1 makes it at least 1 everywhere, so it never equals 21. Choice C comes from solving cos2x=21, which is where the derivative equals 2, not 21.