Unit 3, lesson 26

Derivatives of Trigonometric Functions

Why the derivative of sine is cosine when angles are in radians, and how the derivatives of all six trigonometric functions follow from that one fact.

  • Theory part 51
  • Practice part 52
  • Derivatives of Elementary Functions

Theory, part 51

Practice, part 52

A point moving around a circle at steady speed has a height that rises and falls like a sine curve. How fast is the height changing at a given moment? The answer turns out to be a cosine, and that clean result depends on measuring angles in radians. Once sine and cosine are known, the other four trigonometric functions follow from the quotient rule.

Key terms

Radians

Definition An angle of θ\theta radians is the central angle of a circle of radius rr that cuts off an arc of length rθr\theta. A full turn is 2π2\pi radians, so 180∘=π180^\circ = \pi radians. In calculus the trigonometric functions sin⁡x\sin x, cos⁡x\cos x and the rest always take their input xx in radians.

In plain words Radians measure an angle by the arc it cuts off on a circle of radius 1. With that unit the derivative formulas below come out with no extra constants.

Example The function g(t)=sin⁡(t∘)g(t) = \sin(t^\circ) uses degrees. An angle of tt degrees is πt/180\pi t / 180 radians, so in radian terms

g(t)=sin⁡(πt180),g(t) = \sin\left(\frac{\pi t}{180}\right),

and the chain rule gives

g′(t)=π180cos⁡(πt180).g'(t) = \frac{\pi}{180} \cos\left(\frac{\pi t}{180}\right).

So g′(0)=π/180≈0.01745g'(0) = \pi / 180 \approx 0.01745, not 11. Degrees put an awkward factor into every formula.

The two trigonometric limits

Definition With hh in radians,

lim⁡h→0sin⁡hh=1andlim⁡h→0cos⁡h−1h=0.\lim_{h \to 0} \frac{\sin h}{h} = 1 \qquad \text{and} \qquad \lim_{h \to 0} \frac{\cos h - 1}{h} = 0.

The first comes from the squeeze theorem and the inequality

cos⁡h≤sin⁡hh≤1for 0<∣h∣<π2.\cos h \le \frac{\sin h}{h} \le 1 \qquad \text{for } 0 < \lvert h \rvert < \frac{\pi}{2}.

The second follows from the first. Multiplying top and bottom by cos⁡h+1\cos h + 1 and using cos⁡2h−1=−sin⁡2h\cos^2 h - 1 = -\sin^2 h gives

cos⁡h−1h=−sin⁡hh⋅sin⁡hcos⁡h+1→−1⋅02=0.\frac{\cos h - 1}{h} = -\frac{\sin h}{h} \cdot \frac{\sin h}{\cos h + 1} \to -1 \cdot \frac{0}{2} = 0.

In plain words Near 00 the graph of sin⁡h\sin h is almost the line y=hy = h, and the graph of cos⁡h\cos h is almost flat at height 1.

Example A few values show both limits settling down.

hhsin⁡hh\frac{\sin h}{h}cos⁡h−1h\frac{\cos h - 1}{h}
0.10.10.9983340.998334−0.049958-0.049958
0.010.010.9999830.999983−0.005000-0.005000
0.0010.0010.99999980.9999998−0.0005000-0.0005000

Sine

Definition The sine function is differentiable at every real number xx, and

ddxsin⁡x=cos⁡x.\frac{d}{dx} \sin x = \cos x.

The proof uses the addition formula and the two limits above.

sin⁡(x+h)−sin⁡xh=sin⁡x⋅cos⁡h−1h+cos⁡x⋅sin⁡hh→sin⁡x⋅0+cos⁡x⋅1=cos⁡x.\frac{\sin(x + h) - \sin x}{h} = \sin x \cdot \frac{\cos h - 1}{h} + \cos x \cdot \frac{\sin h}{h} \to \sin x \cdot 0 + \cos x \cdot 1 = \cos x.

In plain words The slope of the sine curve at any point equals the value of cosine there. Sine climbs fastest where it crosses zero going up and is flat at its peaks.

Example At x=π3x = \frac{\pi}{3} the slope of y=sin⁡xy = \sin x is cos⁡π3=12\cos \frac{\pi}{3} = \frac{1}{2}. The tangent line there is

y=32+12(x−π3).y = \frac{\sqrt{3}}{2} + \frac{1}{2}\left(x - \frac{\pi}{3}\right).

Cosine

Definition The cosine function is differentiable at every real number xx, and

ddxcos⁡x=−sin⁡x.\frac{d}{dx} \cos x = -\sin x.

The same method works, now with cos⁡(x+h)=cos⁡xcos⁡h−sin⁡xsin⁡h\cos(x + h) = \cos x \cos h - \sin x \sin h.

In plain words Cosine falls where sine is positive. The minus sign is easy to forget, so check it against the graph. Cosine is decreasing on (0,π)(0, \pi), where sin⁡x>0\sin x > 0.

Example For f(x)=xcos⁡xf(x) = x \cos x the product rule gives f′(x)=cos⁡x−xsin⁡xf'(x) = \cos x - x \sin x. At x=πx = \pi this is −1−π⋅0=−1-1 - \pi \cdot 0 = -1.

Tangent

Definition The function tan⁡x=sin⁡xcos⁡x\tan x = \frac{\sin x}{\cos x} is defined for x≠π2+kπx \neq \frac{\pi}{2} + k\pi with kk an integer. At every such xx it is differentiable and

ddxtan⁡x=sec⁡2x=1cos⁡2x.\frac{d}{dx} \tan x = \sec^2 x = \frac{1}{\cos^2 x}.

The quotient rule and cos⁡2x+sin⁡2x=1\cos^2 x + \sin^2 x = 1 give

ddxsin⁡xcos⁡x=cos⁡x⋅cos⁡x−sin⁡x⋅(−sin⁡x)cos⁡2x=1cos⁡2x.\frac{d}{dx} \frac{\sin x}{\cos x} = \frac{\cos x \cdot \cos x - \sin x \cdot (-\sin x)}{\cos^2 x} = \frac{1}{\cos^2 x}.

In plain words The slope of the tangent curve is always at least 1, and it grows huge near the vertical asymptotes.

Example At x=π4x = \frac{\pi}{4} we have cos⁡x=22\cos x = \frac{\sqrt{2}}{2}, so cos⁡2x=12\cos^2 x = \frac{1}{2} and the slope is sec⁡2x=2\sec^2 x = 2.

Cotangent

Definition The function cot⁡x=cos⁡xsin⁡x\cot x = \frac{\cos x}{\sin x} is defined for x≠kπx \neq k\pi with kk an integer. At every such xx

ddxcot⁡x=−csc⁡2x=−1sin⁡2x.\frac{d}{dx} \cot x = -\csc^2 x = -\frac{1}{\sin^2 x}.

In plain words Cotangent is decreasing on each piece of its domain, and its slope is never above −1-1.

Example At x=π6x = \frac{\pi}{6} we have sin⁡x=12\sin x = \frac{1}{2}, so csc⁡x=2\csc x = 2 and the derivative is −22=−4-2^2 = -4.

Secant

Definition The function sec⁡x=1cos⁡x\sec x = \frac{1}{\cos x} is defined for x≠π2+kπx \neq \frac{\pi}{2} + k\pi with kk an integer. At every such xx

ddxsec⁡x=sec⁡xtan⁡x.\frac{d}{dx} \sec x = \sec x \tan x.

This follows from the quotient rule.

ddx1cos⁡x=0⋅cos⁡x−1⋅(−sin⁡x)cos⁡2x=1cos⁡x⋅sin⁡xcos⁡x\frac{d}{dx} \frac{1}{\cos x} = \frac{0 \cdot \cos x - 1 \cdot (-\sin x)}{\cos^2 x} = \frac{1}{\cos x} \cdot \frac{\sin x}{\cos x}

In plain words Differentiating secant gives secant back, times tangent.

Example At x=π3x = \frac{\pi}{3} we have sec⁡x=2\sec x = 2 and tan⁡x=3\tan x = \sqrt{3}, so the slope is 23≈3.4642\sqrt{3} \approx 3.464.

Cosecant

Definition The function csc⁡x=1sin⁡x\csc x = \frac{1}{\sin x} is defined for x≠kπx \neq k\pi with kk an integer. At every such xx

ddxcsc⁡x=−csc⁡xcot⁡x.\frac{d}{dx} \csc x = -\csc x \cot x.

In plain words It mirrors the secant rule, with the “co” functions and a minus sign. A handy memory aid is that the derivatives of all three “co” functions carry a minus sign.

Example At x=π4x = \frac{\pi}{4} we have csc⁡x=2\csc x = \sqrt{2} and cot⁡x=1\cot x = 1, so the derivative is −2-\sqrt{2}.

Domains

Definition Each of the six derivative formulas holds at exactly the points where the original function is defined. Sine and cosine and their derivatives are defined on all of R\mathbb{R}. Tangent and secant and their derivatives are defined on R\mathbb{R} minus the points π2+kπ\frac{\pi}{2} + k\pi. Cotangent and cosecant and their derivatives are defined on R\mathbb{R} minus the points kπk\pi.

In plain words A derivative formula says nothing about points where the function itself does not exist. Domains with gaps also limit what a derivative sign can tell you.

Example Since sec⁡2x>0\sec^2 x > 0, tangent is increasing on each interval (−π2,π2)\left(-\frac{\pi}{2}, \frac{\pi}{2}\right), (π2,3π2)\left(\frac{\pi}{2}, \frac{3\pi}{2}\right) and so on. It is not increasing on its whole domain. The inputs satisfy π4<3π4\frac{\pi}{4} < \frac{3\pi}{4}, yet the outputs go the other way.

tan⁡π4=1>−1=tan⁡3π4\tan \frac{\pi}{4} = 1 > -1 = \tan \frac{3\pi}{4}

The gap at π2\frac{\pi}{2} breaks the pattern.

Check yourself

  1. Differentiate f(x)=sin⁡xcos⁡xf(x) = \sin x \cos x and simplify.
Show the answer

By the product rule

f′(x)=cos⁡x⋅cos⁡x+sin⁡x⋅(−sin⁡x)=cos⁡2x−sin⁡2x=cos⁡2x.f'(x) = \cos x \cdot \cos x + \sin x \cdot (-\sin x) = \cos^2 x - \sin^2 x = \cos 2x.
  1. Find every xx in [0,2π][0, 2\pi] where y=x+2cos⁡xy = x + 2\cos x has a horizontal tangent.
Show the answer

The derivative is y′=1−2sin⁡xy' = 1 - 2\sin x, which is zero when sin⁡x=12\sin x = \frac{1}{2}, so x=π6x = \frac{\pi}{6} or x=5π6x = \frac{5\pi}{6}.

  1. Where is ddxcsc⁡x=−csc⁡xcot⁡x\frac{d}{dx} \csc x = -\csc x \cot x valid?
Show the answer

At every xx with sin⁡x≠0\sin x \neq 0, that is x≠kπx \neq k\pi for every integer kk. That is the whole domain of csc⁡x\csc x.

How this lesson connects

It also uses trigonometry and radians.