Math Core

Lesson 2.9 · Differentiation: Definition and Basic Rules

Derivatives of other trig functions

You already know the derivatives of sine and cosine. The other four trig functions are all built from those two, tan⁡x=sin⁡xcos⁡x\tan x = \dfrac{\sin x}{\cos x}, sec⁡x=1cos⁡x\sec x = \dfrac{1}{\cos x} and so on, so the quotient rule is all you need to find their derivatives. This lesson derives them and shows how they fit with the rest of your rules.

Tangent

Worked example: Deriving the derivative of tan x

Write tan⁡x=sin⁡xcos⁡x\tan x = \dfrac{\sin x}{\cos x} and apply the quotient rule:

ddx[tan⁡x]=cos⁡x⋅cos⁡x−sin⁡x⋅(−sin⁡x)cos⁡2x=cos⁡2x+sin⁡2xcos⁡2x=1cos⁡2x=sec⁡2x\begin{aligned} \frac{d}{dx}[\tan x] &= \frac{\cos x \cdot \cos x - \sin x \cdot (-\sin x)}{\cos^2 x} \\ &= \frac{\cos^2 x + \sin^2 x}{\cos^2 x} = \frac{1}{\cos^2 x} = \sec^2 x \end{aligned}

The Pythagorean identity sin⁡2x+cos⁡2x=1\sin^2 x + \cos^2 x = 1 does the simplifying.

Since sec⁡2x\sec^2 x is never negative, the graph of tan⁡x\tan x is always increasing on each branch, and its smallest slope is 11, at x=0x = 0 and every multiple of π\pi.

y = tan x rises on every branch. At x = 0 its slope is sec² 0 = 1, the same as the line y = x.Open in grapher →

Secant

Worked example: Deriving the derivative of sec x

Write sec⁡x=1cos⁡x\sec x = \dfrac{1}{\cos x}. The numerator is constant, so its derivative is 00:

ddx[sec⁡x]=0⋅cos⁡x−1⋅(−sin⁡x)cos⁡2x=sin⁡xcos⁡2x=1cos⁡x⋅sin⁡xcos⁡x=sec⁡xtan⁡x\frac{d}{dx}[\sec x] = \frac{0 \cdot \cos x - 1 \cdot (-\sin x)}{\cos^2 x} = \frac{\sin x}{\cos^2 x} = \frac{1}{\cos x} \cdot \frac{\sin x}{\cos x} = \sec x \tan x

Cotangent and cosecant work the same way, starting from cot⁡x=cos⁡xsin⁡x\cot x = \dfrac{\cos x}{\sin x} and csc⁡x=1sin⁡x\csc x = \dfrac{1}{\sin x}. You'll derive one in the practice.

Derivatives of the six trig functions

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

Notice the pattern: each function in the right column is the "co-" partner of the one on its left, and every co-function derivative has a minus sign and swaps each function for its co-partner. If you remember the left column, you can build the right one.

You don't need to memorize these by rote if you remember where they come from. Every one of them is the quotient rule applied to sine and cosine, followed by a Pythagorean identity or a split into two familiar ratios. If you ever blank on a sign during a test, you can rebuild the formula in under a minute. Also note which functions have slopes that are always positive: sec⁡2x\sec^2 x is never negative, so tan⁡x\tan x is increasing on every interval where it's defined, while −csc⁡2x-\csc^2 x is never positive, so cot⁡x\cot x is always decreasing.

Combining with other rules

Worked example: Product rule with a trig function

Differentiate y=xtan⁡xy = x\tan x.

dydx=1⋅tan⁡x+x⋅sec⁡2x=tan⁡x+xsec⁡2x\frac{dy}{dx} = 1 \cdot \tan x + x \cdot \sec^2 x = \tan x + x\sec^2 x

Worked example: A tangent line to sec x

Find the tangent line to y=sec⁡xy = \sec x at x=π3x = \dfrac{\pi}{3}.

The point: sec⁡π3=1cos⁡(π/3)=11/2=2\sec\dfrac{\pi}{3} = \dfrac{1}{\cos(\pi/3)} = \dfrac{1}{1/2} = 2, so the point is (π3,2)\left(\dfrac{\pi}{3}, 2\right).

The slope: sec⁡π3tan⁡π3=23\sec\dfrac{\pi}{3} \tan\dfrac{\pi}{3} = 2\sqrt{3}.

The tangent line is

y−2=23(x−π3)y - 2 = 2\sqrt{3}\left(x - \frac{\pi}{3}\right)

Point-slope form like this is the expected final answer on the AP exam; there's no need to distribute.

Worked example: Recognizing a derivative

Evaluate lim⁡h→0tan⁡(π6+h)−tan⁡π6h\displaystyle \lim_{h \to 0} \frac{\tan\left(\frac{\pi}{6} + h\right) - \tan\frac{\pi}{6}}{h}.

This is the derivative of tan⁡x\tan x at x=π6x = \dfrac{\pi}{6}:

sec⁡2π6=1cos⁡2(π/6)=13/4=43\sec^2\frac{\pi}{6} = \frac{1}{\cos^2(\pi/6)} = \frac{1}{3/4} = \frac{4}{3}

Common mistake

sec⁡2x\sec^2 x means (sec⁡x)2(\sec x)^2, not sec⁡(x2)\sec(x^2). When you evaluate it, find sec⁡x\sec x first and then square: sec⁡2π4=(2)2=2\sec^2\dfrac{\pi}{4} = \left(\sqrt{2}\right)^2 = 2. And keep the minus signs on the co-functions; dropping one is the most common error in this lesson.

Tip

To evaluate secant, cosecant and cotangent at special angles, convert to sine and cosine first: sec⁡θ=1cos⁡θ\sec\theta = \dfrac{1}{\cos\theta}, csc⁡θ=1sin⁡θ\csc\theta = \dfrac{1}{\sin\theta}, cot⁡θ=cos⁡θsin⁡θ\cot\theta = \dfrac{\cos\theta}{\sin\theta}.

Practice

Practice 1

Find f′(x)f'(x) for f(x)=3tan⁡x−2sec⁡xf(x) = 3\tan x - 2\sec x.

Enter an expression, e.g. 3x^2 - 2x + 1

Practice 2

Find dydx\dfrac{dy}{dx} for y=x2cot⁡xy = x^2 \cot x.

Enter an expression, e.g. 3x^2 - 2x + 1

Practice 3

Let f(x)=tan⁡xf(x) = \tan x. Find f′(π3)f'\left(\dfrac{\pi}{3}\right).

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 4

Find the slope of the tangent line to y=sec⁡xy = \sec x at x=π4x = \dfrac{\pi}{4}.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 5

Find an equation of the tangent line to y=tan⁡xy = \tan x at x=π4x = \dfrac{\pi}{4}.

Enter an expression, e.g. 3x^2 - 2x + 1

Practice 6

Use the quotient rule on csc⁡x=1sin⁡x\csc x = \dfrac{1}{\sin x}. What is ddx[csc⁡x]\dfrac{d}{dx}[\csc x]?

Practice 7

Let f(x)=extan⁡xf(x) = e^x \tan x. Find f′(0)f'(0).

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 8

For 0<x<π20 \lt x \lt \dfrac{\pi}{2}, at what value of xx does y=2x−tan⁡xy = 2x - \tan x have a horizontal tangent line?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.