Unit 2 · Topic 2.10 Beta

Derivatives of tan, cot, sec and csc

4 min read · freeNot practiced

You know the derivatives of sin⁡x\sin x and cos⁡x\cos x. The other four trigonometric functions, tan⁡x\tan x, cot⁡x\cot x, sec⁡x\sec x and csc⁡x\csc x, are all fractions built from those two. So the quotient rule, plus one identity, gives every one of their derivatives. This page works them out, shows a pattern that makes the signs easy to remember, and practices them on exact values.

Rewrite with sine and cosine

FunctionIn terms of sine and cosine
tan⁡x\tan xsin⁡xcos⁡x\frac{\sin x}{\cos x}
cot⁡x\cot xcos⁡xsin⁡x\frac{\cos x}{\sin x}
sec⁡x\sec x1cos⁡x\frac{1}{\cos x}
csc⁡x\csc x1sin⁡x\frac{1}{\sin x}

Every function in the table is a quotient, defined where its denominator is not 0. The one identity you need is the Pythagorean identity, sin2⁡x+cos2⁡x=1\sin^2 x + \cos^2 x = 1.

The derivative of tangent

Worked example 1. Find ddx(tan⁡x)\frac{d}{dx}(\tan x).

High =sin⁡x= \sin x, d-high =cos⁡x= \cos x. Low =cos⁡x= \cos x, d-low =−sin⁡x= -\sin x.

Quotient rule: (cos⁡x)(cos⁡x)−(sin⁡x)(−sin⁡x)cos2⁡x\frac{(\cos x)(\cos x) - (\sin x)(-\sin x)}{\cos^2 x}=cos2⁡x+sin2⁡xcos2⁡x= \frac{\cos^2 x + \sin^2 x}{\cos^2 x}.

Identity: the numerator is 1, so the derivative is 1cos2⁡x=sec2⁡x\frac{1}{\cos^2 x} = \sec^2 x.

Top: y = tan x between its vertical asymptotes at x = minus pi/2 and pi/2 (dashed), with tangent lines at x = 0 (slope 1) and x = pi/4 (slope 2). Bottom, on the same scale: y = sec squared x, which is 1 at x = 0, 2 at x = pi/4, never less than 1, and grows without bound near the asymptotes.
Figure 1. tan⁡x\tan x and its derivative sec2⁡x\sec^2 x. The slope of tangent is 1 at the origin and grows toward the asymptotes. LevlPrep original diagram.

The picture agrees. The graph of tan⁡x\tan x always rises on (−π2,π2)\left( -\frac{\pi}{2}, \frac{\pi}{2} \right), gently through the origin with slope sec2⁡0=1\sec^2 0 = 1, then more and more steeply near the asymptotes, where cos⁡x→0\cos x \to 0 and sec2⁡x\sec^2 x grows without bound. Since cos2⁡x≤1\cos^2 x \le 1, sec2⁡x=1cos2⁡x≥1\sec^2 x = \frac{1}{\cos^2 x} \ge 1: no slope of tan⁡x\tan x is ever less than 1.

The derivative of cotangent

Worked example 2. Find ddx(cot⁡x)\frac{d}{dx}(\cot x).

(−sin⁡x)(sin⁡x)−(cos⁡x)(cos⁡x)sin2⁡x\frac{(-\sin x)(\sin x) - (\cos x)(\cos x)}{\sin^2 x}=−(sin2⁡x+cos2⁡x)sin2⁡x= \frac{-\left( \sin^2 x + \cos^2 x \right)}{\sin^2 x}=−1sin2⁡x= \frac{-1}{\sin^2 x}=−csc2⁡x= -\csc^2 x.

Secant and cosecant: a constant on top

Worked example 3. Find ddx(sec⁡x)\frac{d}{dx}(\sec x).

High =1= 1, d-high =0= 0. Low =cos⁡x= \cos x, d-low =−sin⁡x= -\sin x.

(0)(cos⁡x)−(1)(−sin⁡x)cos2⁡x\frac{(0)(\cos x) - (1)(-\sin x)}{\cos^2 x}=sin⁡xcos2⁡x= \frac{\sin x}{\cos^2 x}=1cos⁡x⋅sin⁡xcos⁡x= \frac{1}{\cos x} \cdot \frac{\sin x}{\cos x}=sec⁡xtan⁡x= \sec x\tan x.

The same steps with csc⁡x=1sin⁡x\csc x = \frac{1}{\sin x} give 0−cos⁡xsin2⁡x\frac{0 - \cos x}{\sin^2 x}=−csc⁡xcot⁡x= -\csc x\cot x.

All six, and the "co-" pattern

f(x)f(x)f′(x)f'(x)PartnerPartner's derivative
sin⁡x\sin xcos⁡x\cos xcos⁡x\cos x−sin⁡x-\sin x
tan⁡x\tan xsec2⁡x\sec^2 xcot⁡x\cot x−csc2⁡x-\csc^2 x
sec⁡x\sec xsec⁡xtan⁡x\sec x\tan xcsc⁡x\csc x−csc⁡xcot⁡x-\csc x\cot x

Read across each row. The partner on the right is the "co-" function: cosine, cotangent, cosecant. Its derivative is the left-hand derivative with every function swapped for its co-function and a minus sign in front. So you only need to learn the left column; the right column follows.

Exact values

On no-calculator questions, evaluate these derivatives at the standard angles by first writing each piece in terms of sine and cosine.

Worked example 4. Find the slope of y=sec⁡xy = \sec x at x=π3x = \frac{\pi}{3}.

cos⁡π3=12\cos \frac{\pi}{3} = \frac{1}{2} and sin⁡π3=32\sin \frac{\pi}{3} = \frac{\sqrt{3}}{2}, so sec⁡π3=2\sec \frac{\pi}{3} = 2 and tan⁡π3=3\tan \frac{\pi}{3} = \sqrt{3}.

Slope: sec⁡xtan⁡x=23\sec x\tan x = 2\sqrt{3}.

Worked example 5. Write the line tangent to y=tan⁡xy = \tan x at x=π4x = \frac{\pi}{4}.

Point: tan⁡π4=1\tan \frac{\pi}{4} = 1. Slope: sec2⁡π4\sec^2 \frac{\pi}{4}=1(2/2)2= \frac{1}{\left( \sqrt{2}/2 \right)^2}=2= 2.

Line: y=1+2(x−π4)y = 1 + 2\left( x - \frac{\pi}{4} \right).

Combining with the other rules

These derivatives work with every rule so far. For y=xtan⁡xy = x\tan x, the product rule gives tan⁡x+xsec2⁡x\tan x + x\sec^2 x. For y=sec⁡x−2cot⁡xy = \sec x - 2\cot x, the difference and constant multiple rules give sec⁡xtan⁡x+2csc2⁡x\sec x\tan x + 2\csc^2 x; note the double negative.

Common mistakes

  • Signs: only the "co-" derivatives are negative.
  • Squares: (tan⁡x)′=sec2⁡x(\tan x)' = \sec^2 x, not sec⁡x\sec x; (sec⁡x)′=sec⁡xtan⁡x(\sec x)' = \sec x\tan x, not tan2⁡x\tan^2 x.
  • Degrees: all of these formulas are for radians.

That completes the basic derivatives of Unit 2. Unit 3 handles functions placed inside other functions, such as sin⁡(x2)\sin\left( x^2 \right).

Spot a mistake on this page?