## Section9.1The Derivatives of Trigonometric Functions

### Subsection9.1.1Essential Trigonometric Identities

When we found the derivative of elementary exponential functions, we found that we needed to use a rule to rewrite $b^{x+h}=b^x \cdot b^h\text{.}$ This type of rule is called an identity. Identities provide rules to rewrite a formula in another form without changing the value of the formula. Trigonometric functions are all defined in terms of the elementary sine and cosine functions. Consequently, we need the basic identities of sine and cosine.

The following geometric proof is valid for acute angles, $0 \lt \alpha,\beta \lt \frac{\pi}{2}\text{.}$ Consider the location of the angle $\alpha$ and $\alpha+\beta$ on the unit circle, illustrated as points $A$ and $B\text{,}$ respectively. The origin at $(0,0)$ will be the point $O$ and the point $(1,0)$ will be the point $P\text{.}$ Construct a line segment from $B$ to intersect $\overline{OA}$ at a right angle; call the point of intersection $C\text{.}$ Draw a vertical line from $C$ which intersects $OP$ at a point $Q\text{.}$ Finally draw a horizontal line through $C$ and a vertical line through $B\text{,}$ which intersect at a point $D\text{.}$

By construction, we know $m \angle POA = \alpha$ and $m \angle AOB = \beta\text{.}$ Because $OB=1\text{,}$ we know that $OC=\cos(\beta)$ and $BC=\sin(\beta)\text{.}$ By geometry, we can prove that triangle $BDC$ is a right triangle with $m \angle DBC = \alpha\text{.}$ Consequently,

\begin{gather*} BD = BC \cos(\alpha) = \cos(\alpha) \sin(\beta),\\ DC = BC \sin(\alpha) = \sin(\alpha) \sin(\beta). \end{gather*}

Similarly, triangle $OQC$ is a right triangle with $m \angle COQ = \alpha\text{.}$ Since $OC = \cos(\beta)\text{,}$ we know

\begin{gather*} OQ = OC \cos(\alpha) = \cos(\alpha) \cos(\beta),\\ CQ = OC \sin(\alpha) = \sin(\alpha) \cos(\beta). \end{gather*}

The $x$-coordinate of $B$ is $\cos(\alpha+\beta)$ so that

\begin{equation*} \cos(\alpha+\beta) = OQ - CD = \cos(\alpha) \cos(\beta) - \sin(\alpha) \sin(\beta). \end{equation*}

The $y$-coordinate of $B$ is $\sin(\alpha+\beta)$ so that

\begin{equation*} \sin(\alpha+\beta) = CQ + DB = \sin(\alpha)\cos(\beta) + \cos(\alpha)\sin(\beta). \end{equation*}

Next, we state the symmetries of sine and cosine.

An angle $-\alpha$ goes in the opposite direction as the angle $\alpha\text{.}$ Consequently, the points on the unit circle have the same horizontal coordinate,

\begin{equation*} \cos(-\alpha) = \cos(\alpha), \end{equation*}

and opposite vertical coordinates,

\begin{equation*} \sin(-\alpha) = - \sin(\alpha). \end{equation*}

Finally, because the sine and cosine are defined on a unit circle (with radius 1), we have a Pythagorean identity regarding the sum of the squared values.

By definition, the point $(x,y) = (\cos(\alpha), \sin(\alpha))$ is on the unit circle $x^2+y^2=1\text{.}$ By substitution, $x=\cos(\alpha)$ and $y=\sin(\alpha)\text{,}$ we get the identity $\cos^2(\alpha) + \sin^2(\alpha) = 1\text{.}$ If we divide both sides of the equation by $\cos^2(\alpha)\text{,}$ we obtain

\begin{equation*} \frac{\cos^2(\alpha)}{\cos^2(\alpha)} + \frac{\sin^2(\alpha)}{\cos^2(\alpha)} = \frac{1}{\cos^2(\alpha)} \quad \Leftrightarrow \quad 1 + \tan^2(\alpha) = \sec^2(\alpha). \end{equation*}

The last identity comes from dividing both sides of the equation by $\sin^2(\alpha)\text{.}$

### Subsection9.1.2Differentiation of Sine and Cosine

We start by computing the derivatives for sine and cosine at the origin, $\sin'(0)$ and $\cos'(0)\text{.}$ Once we know those values, we will be able to find the derivatives as functions.

By definition,

\begin{equation*} \displaystyle \sin'(0) = \lim_{h \to 0} \frac{\sin(0+h) - \sin(0)}{h}. \end{equation*}

Since $\sin(0) = 0\text{,}$ we can rewrite

\begin{equation*} \lim_{h \to 0} \frac{\sin(h)}{h} = \lim_{x \to 0}\frac{\sin(x)}{x}, \end{equation*}

since the variable name does not affect the value of the limit.

Consider the figure below with angle $x \gt 0\text{.}$ The point $A$ is on the unit circle and has coordinates $(\cos(x),\sin(x))\text{.}$ Consequently, triangle $OBA$ has area $\frac{1}{2} \sin(x) \cos(x)\text{.}$ The point $Q$ has coordinates $(1, \tan(x))\text{,}$ so triangle $OPQ$ has area $\frac{1}{2} \tan(x)\text{.}$ If we consider the sector of the circle $OAP\text{,}$ it has an area that is the corresponding fraction $\frac{x}{2\pi}$ of the area of the unit circle, $\pi\text{,}$ which has the value $\frac{x}{2}\text{.}$

Comparing the areas leads to the inequality,

\begin{equation*} \frac{1}{2} \sin(x) \cos(x) \lt \frac{1}{2} x \lt \frac{1}{2} \tan(x). \end{equation*}

Multiplying by 2 and dividing by $\sin(x)\text{,}$ we have another inequality

\begin{equation*} \cos(x) \lt \frac{x}{\sin(x)} \lt \frac{1}{\cos(x)}. \end{equation*}

Since $\cos(x)$ is continuous at $x=0\text{,}$ we know

\begin{gather*} \lim_{x \to 0} \cos(x) = \cos(0) = 1,\\ \lim_{x \to 0} \frac{1}{\cos(x)} = 1. \end{gather*}

Using the Limit Squeeze Theorem and the Limit of a Reciprocal, we then know

\begin{equation*} \lim_{x \to 0} \frac{x}{\sin(x)} = 1 \qquad \Rightarrow \qquad \sin'(0) = \lim_{x \to 0}\frac{\sin(x)}{x} = 1. \end{equation*}

It is important to note that getting the value for this limit to be the value 1 was a consequence of measuring angles in radians. For any other way that we might measure angles, the fraction of the circles area would be a ratio of the value $x$ to the measurement of the angle to complete a full circle. For example, if we measured angles in degrees, we would have instead found $\sin_{\mathrm{deg}}'(0) = \frac{2\pi}{360}\text{.}$ Mathematically, one justification for measuring angles in radians is simply in order to guarantee that this $\sin'(0)=1\text{.}$

By definition,

\begin{equation*} \displaystyle \cos'(0) = \lim_{h \to 0} \frac{\cos(0+h) - \cos(0)}{h}. \end{equation*}

Since $\cos(0) = 1\text{,}$ we can rewrite

\begin{equation*} \cos'(0)=\lim_{h \to 0} \frac{\cos(h)-1}{h} = \lim_{x \to 0}\frac{\cos(x)-1}{x}. \end{equation*}

Multiplying the numerator and denominator by $\cos(x)+1\text{,}$ we find

\begin{equation*} \cos'(0) = \lim_{x \to 0}\frac{(\cos(x)-1)(\cos(x)+1)}{x(\cos(x)+1)} = \lim_{x \to 0} \frac{\cos^2(x)-1}{x(\cos(x)+1)}. \end{equation*}

By the Pythagorean identity, we know $\cos^2(x)-1=-\sin^2(x)$ so that we can rewrite

\begin{equation*} \cos'(0) = \lim_{x \to 0}\frac{\sin(x)}{x}\frac{-\sin(x)}{\cos(x)+1}. \end{equation*}

Since $\displaystyle \lim_{x \to 0}\frac{\sin(x)}{x} = \sin'(0) = 1$ and

\begin{equation*} \displaystyle \lim_{x \to 0}\frac{-\sin(x)}{\cos(x)+1} = \frac{-\sin(0)}{\cos(0)+1} = \frac{0}{2} = 0, \end{equation*}

the limit rule for a product guarantees $\cos'(0) = 0\text{.}$

Knowing the instantaneous rates of change of sine and cosine at $x=0$ allows us to compute the derivative at any input value. The proofs for these differentiation rules rely on the sum identities for trigonometric functions.

Using the definition of the derivative, we write

\begin{equation*} \sin'(x) = \lim_{h \to 0} \frac{\sin(x+h)-\sin(x)}{h}. \end{equation*}

The sum identity for sine allows us to rewrite $\sin(x+h) = \sin(x)\cos(h)+\cos(x)\sin(h)\text{,}$ so that the derivative can be rewritten

\begin{align*} \sin'(x) &= \lim_{h \to 0} \frac{\sin(x)\cos(h) + \cos(x) \sin(h) - \sin(x)}{h}\\ &= \lim_{h \to 0} \frac{\sin(x) \cdot (\cos(h) - 1) + \cos(x) \cdot \sin(h)}{h} \\ &= \lim_{h \to 0} \sin(x) \cdot \frac{\cos(h)-1}{h} + \cos(x) \frac{\sin(h)}{h}. \end{align*}

Because $\sin(x)$ and $\cos(x)$ do not depend on $h\text{,}$ they play the role of a constant multiple. By the rules for a limit of a sum and the limit of a constant multiple, we can write

\begin{equation*} \sin'(x) = \sin(x) \cos'(0) + \cos(x) \sin'(0) = 0 \cdot \sin(x) + 1 \cdot \cos(x) = \cos(x). \end{equation*}

Using the definition of the derivative, we write

\begin{equation*} \cos'(x) = \lim_{h \to 0} \frac{\cos(x+h)-\cos(x)}{h}. \end{equation*}

The sum identity for cosine allows us to rewrite $\cos(x+h) = \cos(x)\cos(h)-\sin(x)\sin(h)\text{,}$ so that the derivative can be rewritten

\begin{align*} \cos'(x) &= \lim_{h \to 0} \frac{\cos(x)\cos(h) - \sin(x) \sin(h) - \cos(x)}{h}\\ &= \lim_{h \to 0} \frac{\cos(x) \cdot (\cos(h) - 1) - \sin(x) \cdot \sin(h)}{h} \\ &= \lim_{h \to 0} \cos(x) \cdot \frac{\cos(h)-1}{h} - \sin(x) \frac{\sin(h)}{h}. \end{align*}

We can therefore write

\begin{equation*} \cos'(x) = \cos(x) \cos'(0) - \sin(x) \sin'(0) = 0 \cdot \cos(x) - 1 \cdot \sin(x) = -\sin(x). \end{equation*}

### Subsection9.1.3Derivatives of Other Trigonometric Functions

All other trigonometric functions are defined in terms of the sine and cosine functions. Knowing the derivatives of sine and cosine allow us to compute the derivative rules for each of the other trigonometric functions.

The proofs for these rules are all based on the definitions of these trigonometric functions in terms of sine and cosine.

We will look at the derivatives of $\tan(x)$ and $\sec(x)$ and leave the other two proofs to the reader.

Because $\tan(x)$ is defined as a quotient, we compute its derivative using the quotient rule.

\begin{align*} \frac{d}{dx}[\tan(x)] &= \frac{d}{dx}[\frac{\sin(x)}{\cos(x)}] \\ &= \frac{\cos(x) \sin'(x) - \sin(x) \cos'(x)}{\cos^2(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{align*}

Similarly, $\sec(x)$ is defined as a reciprocal, so we use the reciprocal rule of derivatives.

\begin{align*} \frac{d}{dx}[\sec(x)] &= \frac{d}{dx}[\frac{1}{\cos(x)}] \\ &= \frac{-\cos'(x)}{\cos^2(x)} = \frac{-(-\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) \end{align*}

### Subsection9.1.4Practice with Derivatives

When we take into account the chain rule, we have the following general derivative rules for trigonometric functions. Notice that cosine, cotangent, and cosecant all have a negative sign. Also note the similarity in formulas between the derivatives for sine and cosine, for tangent and cotangent, and for secant and cosecant. There are really only three differentiation rules, each with a complementary rule for the complementary functions.

###### General Derivative Rules for Trigonometric Functions

Let $u$ represent any expression that depends on $x\text{.}$

\begin{align*} \frac{d}{dx}[\sin(u)] &= \cos(u) \frac{du}{dx} \\ \frac{d}{dx}[\cos(u)] &= -\sin(u) \frac{du}{dx} \\ \frac{d}{dx}[\tan(u)] &= \sec^2(u) \frac{du}{dx} \\ \frac{d}{dx}[\cot(u)] &= -\csc^2(u) \frac{du}{dx} \\ \frac{d}{dx}[\sec(u)] &= \sec(u) \tan(u) \frac{du}{dx} \\ \frac{d}{dx}[\csc(u)] &= -\csc(u) \cot(u) \frac{du}{dx} \end{align*}

The following examples illustrate how these rules can be used with other rules of differentiation.

###### Example9.1.9

Find $\displaystyle \frac{d}{dx}[3\sin(x^2)]\text{.}$

Solution
\begin{align*} \frac{d}{dx}[3 \sin(x^2)] &= 3 \frac{d}{dx}[\sin(x^2)] & \hbox{Constant Multiple}\\ &= 3 \sin'(x^2) \cdot \frac{d}{dx}[x^2] & \hbox{Chain Rule, $u=x^2$}\\ &= 3 \cos(x^2) \cdot \frac{d}{dx}[x^2] & \hbox{Derivative of Sine}\\ &= 3 \cos(x^2) \cdot (2x) & \hbox{Derivative of Power}\\ &= 6x \cos(x^2) \end{align*}
###### Example9.1.10

Find $\displaystyle \frac{d}{dx}[\sec(e^{3x})]\text{.}$

Solution
\begin{align*} \frac{d}{dx}[\sec(e^{3x})] & = \sec'(e^{3x}) \cdot \frac{d}{dx}[e^{3x}] & \hbox{Chain Rule, $u=e^{3x}$}\\ &= \sec(e^{3x}) \tan(e^{3x}) \frac{d}{dx}[e^{3x}] & \hbox{Derivative of Secant}\\ &= \sec(e^{3x}) \tan(e^{3x}) \cdot e^{3x} \frac{d}{dx}[3x] & \hbox{Chain Rule, $e^u$ with $u=3x$}\\ &= 3e^{3x} \sec(e^{3x}) \tan(e^{3x}) \end{align*}
###### Example9.1.11

Find $\displaystyle \frac{d}{dx}[e^{-3x}\sin(5x)]\text{.}$

Solution

The function is a product of $e^{-3x}$ and $\sin(5x)\text{.}$ Using the chain rule on these individual parts, we find

\begin{align*} \frac{d}{dx}[e^{-3x}] &= e^{-3x} \frac{d}{dx}[-3x] \\ &= -3e^{-3x} \\ \frac{d}{dx}[\sin(5x)] &= \sin'(5x) \frac{d}{dx}[5x] \\ &= 5 \cos(5x) \end{align*}

Knowing those derivatives, we use the product rule to find the derivative of the overall formula.

\begin{align*} \frac{d}{dx}[e^{-3x}\sin(5x)] & = \frac{d}{dx}[e^{-3x}] \cdot \sin(5x) + e^{-3x} \frac{d}{dx}[\sin(5x)] & \hbox{Product Rule}\\ &= (-3e^{-3x}) \sin(5x) + e^{-3x} \cdot (5\cos(5x)) \\ &= -3e^{-3x} \sin(5x) + 5e^{-3x} \cos(5x) \end{align*}