
## Section2.2The Sine and Cosine Functions

###### Motivating Questions
• What do the graphs of $y = \sin(x)$ and $y = \cos(x)$ suggest as formulas for their respective derivatives?

• Once we know the derivatives of $\sin(x)$ and $\cos(x)\text{,}$ how do previous derivative rules work when these functions are involved?

Throughout Chapter2, we will develop shortcut derivative rules to help us bypass the limit definition and quickly compute $f'(x)$ from a formula for $f(x)\text{.}$ In Section2.1, we stated the rule for power functions:

\begin{equation*} \text{if}~ f(x) = x^n,~ \text{then}~ f'(x) = nx^{n-1}\text{,} \end{equation*}

and the rule for exponential functions:

\begin{equation*} \text{if}~ a ~ \text{is a positive real number and}~ f(x) = a^x,~ \text{then}~ f'(x) = a^x \ln(a)\text{.} \end{equation*}

In this section, we will use a graphical argument to conjecture derivative formulas for the sine and cosine functions.

### SubsectionThe Sine and Cosine Functions

The sine and cosine functions are among the most important functions in all of mathematics. These periodic functions play a key role in modeling repeating phenomena such as tidal elevations, the behavior of an oscillating mass attached to a spring, or the location of a point on a bicycle tire. Like polynomial and exponential functions, the sine and cosine functions are considered basic functions, ones that are often used in building more complicated functions. As such, we would like to know formulas for $\frac{d}{dx} [\sin(x)]$ and $\frac{d}{dx} [\cos(x)]\text{,}$ and the next two examples lead us to that end.

###### Example2.25

Consider the function $f(x) = \sin(x)\text{,}$ with the graph of $y=f(x)$ shown below in Figure2.26. Note that the grid in the diagram does not have boxes that are $1 \times 1\text{,}$ but rather approximately $1.57 \times 1\text{,}$ as the horizontal scale of the grid is $\frac{\pi}{2}$ units per box.

1. At each of $x = -2\pi, -\frac{3\pi}{2}, -\pi, -\frac{\pi}{2}, 0, \frac{\pi}{2}, \pi, \frac{3\pi}{2}, 2\pi\text{,}$ use a straightedge to sketch an accurate tangent line to $y = f(x)\text{.}$

2. Use the provided grid to estimate the slope of the tangent line you drew at each point. Pay careful attention to the scale of the grid.

3. Use the limit definition of the derivative to estimate $f'(0)$ by using small values of $h\text{,}$ and compare the result to your visual estimate for the slope of the tangent line to $y = f(x)$ at $x = 0$ in (b). Using periodicity, what does this result suggest about $f'(2\pi)\text{?}$ About $f'(-2\pi)\text{?}$

4. Based on your work in (a), (b), and (c), sketch an accurate graph of $y = f'(x)$ on the interval $-2\pi\le x\le 2\pi\text{.}$

5. What familiar function do you think is the derivative of $f(x) = \sin(x)\text{?}$

Hint
1. It's very important to use a straightedge for accuracy.

2. First determine the slopes that appear to be zero. Then estimate $f'(0)$ carefully using the grid. Use symmetry and periodicity to help you estimate other nonzero slopes on the graph.

3. $f'(0) \approx \frac{\sin(h)}{h}$ for small values of $h\text{.}$

4. Recall that $y$-coordinates on the graph of $y=f'(x)$ come from slopes on the graph of $y=f(x)\text{.}$

5. It might be reasonable to expect that the derivative of a trigonometric function is another trigonometric function.

1. $1,0,-1,0,1,0,-1,0,1\text{.}$

2. $f'(0) = f'(-2\pi) = f'(2\pi) = 1\text{.}$

3. $\frac{d}{dx}[\sin(x)] = \cos(x)\text{.}$

Solution
1. See Figure2.28 below.

2. Reading left to right from $-2\pi$ to $2\pi$ with stepsize $\pi/2\text{,}$ the respective slopes of tangent lines appear to be $1,0,-1,0,1,0,-1,0,1\text{.}$

3. From the limit definition,

\begin{align*} f'(0) =\mathstrut \amp \lim_{h \to 0} \frac{f(0 + h) - f(0)}{h}\\ =\mathstrut \amp \lim_{h \to 0} \frac{\sin(0 + h) - \sin(0)}{h}\\ =\mathstrut \amp \lim_{h \to 0} \frac{\sin(h)}{h}\text{.} \end{align*}

Because we cannot simplify the fraction $\frac{\sin(h)}{h}$ any further algebraically, we estimate the value of the limit using small values of $h\text{.}$ Doing so, it appears that $\lim_{h \to 0} \frac{\sin(h)}{h} = 1\text{,}$ and thus $f'(0) = 1\text{.}$ This matches the estimate generated visually by sketching the tangent line at $(0,f(0))\text{.}$ Finally, by the periodicity of the sine function, we expect the value of the derivative at 0 to match the derivative value at $-2\pi$ and $2\pi\text{.}$

4. See the figure below.

5. It appears that $\frac{d}{dx}[\sin(x)] = \cos(x)\text{.}$

###### Example2.29

Consider the function $g(x) = \cos(x)\text{,}$ with the graph of $y=g(x)$ shown below in Figure2.30. Note that the grid in the diagram does not have boxes that are $1 \times 1\text{,}$ but rather approximately $1.57 \times 1\text{,}$ as the horizontal scale of the grid is $\frac{\pi}{2}$ units per box.

1. At each of $x = -2\pi, -\frac{3\pi}{2}, -\pi, -\frac{\pi}{2}, 0, \frac{\pi}{2}, \pi, \frac{3\pi}{2}, 2\pi\text{,}$ use a straightedge to sketch an accurate tangent line to $y = g(x)\text{.}$

2. Use the provided grid to estimate the slope of the tangent line you drew at each point. Again, note the scale of the axes and grid.

3. Use the limit definition of the derivative to estimate $g'\big(\frac{\pi}{2}\big)$ by using small values of $h\text{,}$ and compare the result to your visual estimate for the slope of the tangent line to $y = g(x)$ at $x = \frac{\pi}{2}$ in (b). Using periodicity, what does this result suggest about $g'\big(-\frac{3\pi}{2}\big)\text{?}$ Can symmetry on the graph help you estimate other slopes easily?

4. Based on your work in (a), (b), and (c), sketch an accurate graph of $y = g'(x)$ on the interval $-2\pi\le x\le2\pi\text{.}$

5. What familiar function do you think is the derivative of $g(x) = \cos(x)\text{?}$

Hint
1. It's very important to use a straightedge for accuracy.

2. First determine the slopes that appear to be zero. Then estimate $g'\big(\frac{\pi}{2}\big)$ carefully using the grid. Use symmetry and periodicity to help you estimate other nonzero slopes on the graph.

3. $g'\big(\frac{\pi}{2}\big) \approx \frac{\cos\big(\frac{\pi}{2}+h\big)}{h}$ for small values of $h\text{.}$

4. Recall that $y$-coordinates on the graph of $y=g'(x)$ come from slopes on the graph of $y=g(x)\text{.}$

5. It might be reasonable to expect that the derivative of a trigonometric function is another trigonometric function.

1. $0,-1,0,1,0,-1,0,1,0\text{.}$

2. $g'\big(\frac{\pi}{2}\big)=g'\big(-\frac{3\pi}{2}\big)=-1\text{.}$

3. $\frac{d}{dx}[\cos(x)] = -\sin(x)\text{.}$

Solution
1. See Figure2.32 below.

2. Reading left to right from $-2\pi$ to $2\pi$ with stepsize $\pi/2\text{,}$ the respective slopes of tangent lines appear to be $0,-1,0,1,0,-1,0,1,0\text{.}$

3. From the limit definition,

\begin{align*} g'\left(\frac{\pi}{2}\right) =\mathstrut \amp \lim_{h \to 0} \frac{g\big(\frac{\pi}{2} + h\big) - g\big(\frac{\pi}{2}\big)}{h}\\ =\mathstrut \amp \lim_{h \to 0} \frac{\cos\big(\frac{\pi}{2} + h\big) - \cos\big(\frac{\pi}{2}\big)}{h}\\ =\mathstrut \amp \lim_{h \to 0} \frac{\cos\big(\frac{\pi}{2}+h\big)}{h} \end{align*}

Because we cannot simplify the fraction $\frac{\cos\big(\frac{\pi}{2}+h\big)}{h}$ any further algebraically, we estimate the value of the limit using small values of $h\text{.}$ Doing so, it appears that $\lim_{h \to 0} \frac{\cos\big(\frac{\pi}{2}+h\big)}{h} = -1\text{,}$ and thus $g'\big(\frac{\pi}{2}\big) = -1\text{.}$ This matches the estimate generated visually by sketching the tangent line at $\big(\frac{\pi}{2},g\big(\frac{\pi}{2}\big)\big)\text{.}$ Finally, by the periodicity of the cosine function, we expect the value of the derivative at $\frac{\pi}{2}$ to match the derivative value at $-\frac{3\pi}{2}\text{.}$

4. See Figure2.31.

5. It appears that $\frac{d}{dx}[\cos(x)] = -\sin(x)\text{.}$

The results of the two preceding examples suggest that the sine and cosine functions not only have beautiful connections such as the identities $\sin^2(x) + \cos^2(x) = 1$ and $\cos\big(x - \frac{\pi}{2}\big) = \sin(x)\text{,}$ but that they are even further linked through calculus, as the derivative of each involves the other. The following rules summarize the results of the examples.4These two rules may be formally proved by using the limit definition of the derivative and the expansion identities for $\sin(x+h)$ and $\cos(x+h)\text{.}$

###### Derivative of Sine and Cosine Functions

For all real numbers $x\text{,}$

\begin{equation*} \frac{d}{dx} [\sin(x)] = \cos(x) \ \ \text{and} \ \ \frac{d}{dx} [\cos(x)] = -\sin(x)\text{.} \end{equation*}

We have now added the sine and cosine functions to our library of basic functions whose derivatives we know. The constant multiple and sum rules still hold, of course, as well as all of the inherent meaning of the derivative.

###### Example2.33

Answer each of the following questions. Where a derivative is requested, be sure to label the derivative function with its name using proper notation.

1. Determine the derivative of $h(t) = 3\cos(t) - 4\sin(t)\text{.}$

2. If $f(x)=2x+\frac{\sin(x)}{2}\text{,}$ find the exact slope of the tangent line to the graph of $y = f(x)$ at the point where $x = \frac{\pi}{6}\text{.}$

3. If $g(x)=x^2+2\cos(x)\text{,}$ find the equation of the tangent line to the graph of $y = g(x)$ at the point where $x = \frac{\pi}{2}\text{.}$

4. Determine the derivative of $p(z) = z^4 + 4^z + 4\cos(z) - \sin\big(\frac{\pi}{2}\big)\text{.}$

5. The function $P(t) = 24 + 8\sin(t)$ represents a population of a particular kind of animal that lives on a small island, where $P$ is measured in hundreds and $t$ is measured in decades since January 1, 2010. What is the instantaneous rate of change of $P$ on January 1, 2030? What are the units of this quantity? Write a sentence in everyday language that explains how the population is behaving at this point in time.

Hint
1. Recall the constant multiple and sum rules.

2. $f'\big(\frac{\pi}{6}\big)$ tells us the slope of the tangent line at $\big(\frac{\pi}{6},f\big(\frac{\pi}{6}\big)\big)\text{.}$

3. Find both $\big(\frac{\pi}{2}, g\big(\frac{\pi}{2}\big)\big)$ and $g'\big(\frac{\pi}{2}\big)\text{.}$

4. Note that $\sin\big(\frac{\pi}{2}\big)$ is a constant.

5. $P'(a)$ tells us the instantaneous rate of change of $P$ with respect to time at the instant $t = a\text{,}$ and its units are units of $P$ per unit of time.

1. $\frac{dh}{dt} = -3\sin(t) - 4\cos(t)\text{.}$

2. $2+\frac{\sqrt3}4\text{.}$

3. $y - \frac{\pi^2}{4} = (\pi-2)\big(x-\frac{\pi}{2}\big)\text{.}$

4. $p'(z) = 4z^3 + 4^z \ln(4) - 4\sin(z)\text{.}$

5. $P'(2) = 8\cos(2) \approx -3.329$ hundred animals per decade.

Solution
1. By the sum and constant multiple rules,

\begin{equation*} \frac{dh}{dt} = 3(-\sin(t)) - 4(\cos(t)) = -3\sin(t) - 4\cos(t)\text{.} \end{equation*}
2. The exact slope of the tangent line to the graph of $y = f(x)$ at $x = \frac{\pi}{6}$ is given by $f'\big(\frac{\pi}{6}\big)\text{.}$ So, we first compute $f'(x)\text{.}$ Since $f(x)=2x+\frac{\sin(x)}{2}\text{,}$ we may use the sum and constant multiple rules to find $f'(x) = 2 + \frac{1}{2}\cos(x)\text{.}$ Thus

\begin{equation*} f'\left(\frac{\pi}{6}\right) = 2 + \frac{1}{2} \cos\left(\frac{\pi}{6}\right) = 2 + \frac{\sqrt{3}}{4}\text{.} \end{equation*}
3. The tangent line to $y=g(x)$ at $x=\frac{\pi}2$ passes through the point $\big(\frac{\pi}{2}, g\big(\frac{\pi}{2}\big)\big)$ with slope $g'\big(\frac{\pi}{2}\big)\text{.}$ We observe first that $g\big(\frac{\pi}{2}\big) = \big(\frac{\pi}{2}\big)^2 + 2\cos\big(\frac{\pi}{2}\big) = \frac{\pi^2}{4}\text{.}$ Next, we compute the derivative function, $g'(x)\text{,}$ and find that

\begin{align*} g'(x)=\mathstrut \amp \frac{d}{dx}[x^2]+2\frac{d}{dx}[\cos(x)]\\ =\mathstrut \amp [2x]+2[-\sin(x)]\\ =\mathstrut \amp 2x - 2\sin(x)\text{.} \end{align*}

Thus $g'\big(\frac{\pi}{2}\big) = 2 \cdot \frac{\pi}{2} - 2 \sin\big(\frac{\pi}{2}\big) = \pi - 2\text{.}$ Hence, the equation of the tangent line (in point-slope form) is given by

\begin{equation*} y - \frac{\pi^2}{4} = (\pi-2)\left(x-\frac{\pi}{2}\right)\text{.} \end{equation*}
4. We first use the power rule to find $\frac{d}{dz}[z^4]=4z^3\text{.}$ We then use the rule for exponential functions to find $\frac{d}{dz}[4^z]=4^z\ln(4)\text{,}$ and the rule for cosine and constant multiples to compute $\frac{d}{dz}[4\cos(z)]=4[-\sin(z)]=-4\sin(z)\text{.}$ Finally, using the sum rule and noting that $\sin\big(\frac{\pi}{2}\big)$ is a constant, we have

\begin{equation*} p'(z) = 4z^3 + 4^z \ln(4) - 4\sin(z)\text{.} \end{equation*}
5. The value of $P'(2)$ will tell us the instantaneous rate of change of $P$ at the instant two decades have elapsed. Observe that $P'(t) = 8\cos(t)\text{,}$ and thus $P'(2) = 8\cos(2) \approx -3.329$ hundred animals per decade. This tells us that the instantaneous rate of change of $P$ on January 1, 2030 is about $-333$ animals per decade, which tells us that the animal population is shrinking moderately at this point in time. We might say that for whatever the population is on January 1, 2030, we expect that population to drop by about 333 animals over the next ten years if the current population trend continues.

### SubsectionSummary

• By carefully analyzing the graphs of $y = \sin(x)$ and $y = \cos(x)\text{,}$ and by using the limit definition of the derivative at select points, we found that $\frac{d}{dx} [\sin(x)] = \cos(x)$ and $\frac{d}{dx} [\cos(x)] = -\sin(x)\text{.}$

• We note that all previously encountered derivative rules still hold and may now also be applied to functions involving the sine and cosine. All of the established meaning of the derivative applies to these trigonometric functions as well.

### SubsectionExercises

Suppose that $V(t) = 24 \cdot 1.07^t + 6 \sin(t)$ represents the value of a person's investment portfolio in thousands of dollars in year $t\text{,}$ where $t = 0$ corresponds to January 1, 2010.

1. At what instantaneous rate is the portfolio's value changing on January 1, 2012? Include units on your answer.

2. Determine the value of $V''(2)\text{.}$ What are the units on this quantity and what does it tell you about how the portfolio's value is changing?

3. On the interval $0 \le t \le 20\text{,}$ graph the function $V(t) = 24 \cdot 1.07^t + 6 \sin(t)$ and describe its behavior in the context of the problem. Then, compare the graphs of the functions $A(t) = 24 \cdot 1.07^t$ and $V(t) = 24 \cdot 1.07^t + 6 \sin(t)\text{,}$ as well as the graphs of their derivatives $A'(t)$ and $V'(t)\text{.}$ What is the impact of the term $6 \sin(t)$ on the behavior of the function $V(t)\text{?}$

Let $f(x) = 3\cos(x) - 2\sin(x) + 6\text{.}$

1. Determine the exact slope of the tangent line to $y = f(x)$ at the point where $a = \frac{\pi}{4}\text{.}$

2. Determine the equation of the tangent line to $y = f(x)$ at the point where $a = \pi\text{.}$

3. At the point where $a = \frac{\pi}{2}\text{,}$ is $f$ increasing, decreasing, or neither?

4. At the point where $a = \frac{3\pi}{2}\text{,}$ does the tangent line to $y = f(x)$ lie above the curve, below the curve, or neither? How can you answer this question without even graphing the function or the tangent line?

In this exercise, we explore how the limit definition of the derivative more formally shows that $\frac{d}{dx}[\sin(x)] = \cos(x)\text{.}$ Letting $f(x) = \sin(x)\text{,}$ note that the limit definition of the derivative tells us that

\begin{equation*} f'(x) = \lim_{h \to 0} \frac{\sin(x+h) - \sin(x)}{h}\text{.} \end{equation*}
1. Recall the trigonometric identity for the sine of a sum of angles $\alpha$ and $\beta\text{:}$ $\sin(\alpha + \beta) = \sin(\alpha)\cos(\beta) + \cos(\alpha)\sin(\beta)\text{.}$ Use this identity and some algebra to show that

\begin{equation*} f'(x) = \lim_{h \to 0} \frac{\sin(x)(\cos(h)-1) + \cos(x)\sin(h)}{h}\text{.} \end{equation*}
2. Next, note that as $h$ changes, $x$ remains constant. Explain why it therefore makes sense to say that

\begin{equation*} f'(x) = \sin(x) \cdot \lim_{h \to 0} \frac{\cos(h) -1 }{h} + \cos(x) \cdot \lim_{h \to 0} \frac{\sin(h)}{h}\text{.} \end{equation*}
3. Finally, use small values of $h$ to estimate the values of the two limits in (c):

\begin{equation*} \lim_{h \to 0} \frac{\cos(h) - 1}{h} \ \ \text{and} \ \ \lim_{h \to 0} \frac{\sin(h)}{h}\text{.} \end{equation*}
4. What do your results in (b) and (c) thus tell you about $f'(x)\text{?}$

5. By emulating the steps taken above, use the limit definition of the derivative to argue convincingly that $\frac{d}{dx}[\cos(x)] = -\sin(x)\text{.}$