Skip to main content

Section 2.2 The sine and cosine functions

Throughout Chapter 2, 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 Section 2.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*}

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

Preview Activity 2.2.1.

In this activity we will consider the derivative of the sine function by exploring the graph of the slopes of the tangent lines to the graph of \(g(x) = \sin(x)\) where \(x\) is given in radians.

  1. Sketch a careful graph of \(y=\sin(x)\text{.}\) Mark the \(x\)-axis in intervals \(-2,\;-1,\,0,\;1,\;2,\;3,\;4,\;5,\;6,\;7\text{.}\) Make your sketch large enough so that your tangent lines for part (b) are clear.

  2. Carefully draw tangent lines for at least eight points on your graph from (a) and record the slope of your tangent line at each point.

  3. Sketch a second graph of the slopes of the tangent lines you drew in part (b) to get an estimate of the graph of \(g'(x)\text{.}\)

  4. Conjecture a formula for the derivative of \(g(x) = \sin(x).\) That is, what do you think is the formula for \(g'(x).\)

Subsection 2.2.1 The sine and cosine functions

The sine and cosine functions are among the most important functions in all of mathematics. Sometimes called the circular functions due to their definition on the unit circle, 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 two activities for the day will lead us to that end.

Activity 2.2.2.

Consider the function \(f(x) = \sin(x)\text{,}\) which is graphed in Figure 2.2.1 below. Note carefully 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 \(\pi/2\) units per box.

Figure 2.2.1. At left, the graph of \(y = f(x) = \sin(x)\text{.}\)
  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 axes adjacent to the graph of \(y = f(x)\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 heights on \(f'\) come from slopes on \(f\text{.}\)

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

Answer
  1. Figure 2.2.2.

  2. \(1,0,-1,0,1,0,-1,0,1\text{.}\)

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

  4. Figure 2.2.2.

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

Figure 2.2.2. At left, the graph of \(y = f(x) = \sin(x)\text{.}\) At right, the graph of \(y=f'(x)\text{.}\)
Solution
  1. See Figure 2.2.3.

  2. Reading left to right from \(-2\pi, \ldots, 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} \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{.}\)

Figure 2.2.3. At left, the graph of \(y = f(x) = \sin(x)\text{.}\) At right, the graph of \(y=f'(x)\text{.}\)
Activity 2.2.3.

Consider the function \(g(x) = \cos(x)\text{,}\) which is graphed in Figure 2.2.4 below. Note carefully 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 \(\pi/2\) units per box.

Figure 2.2.4. At left, the graph of \(y = g(x) = \cos(x)\text{.}\)
  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'(\frac{\pi}{2})\) 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'(-\frac{3\pi}{2})\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 axes adjacent to the graph of \(y = g(x)\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'(\frac{\pi}{2})\) carefully using the grid. Use symmetry and periodicity to help you estimate other nonzero slopes on the graph.

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

  4. Recall that heights on \(g'\) come from slopes on \(g\text{.}\)

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

Answer
  1. Figure 2.2.5.

  2. \(0,-1,0,1,0,-1,0,1,0\text{.}\)

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

  4. Figure 2.2.5.

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

Figure 2.2.5. At left, the graph of \(y = g(x) = \cos(x)\text{.}\) At right, the graph of \(y = g'(x)\)
Solution
  1. See Figure 2.2.6..

  2. Reading left to right from \(-2\pi, \ldots, 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'(\frac{\pi}{2}) =\mathstrut \amp \lim_{h \to 0} \frac{g(\frac{\pi}{2} + h) - g(\frac{\pi}{2})}{h}\\ =\mathstrut \amp \lim_{h \to 0} \frac{\cos(\frac{\pi}{2} + h) - \cos(\frac{\pi}{2})}{h}\\ =\mathstrut \amp \lim_{h \to 0} \frac{\cos(\frac{\pi}{2}h)}{h} \end{align*}

    Because we cannot simplify the fraction \(\frac{\cos(\frac{\pi}{2}+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{\cos(\frac{\pi}{2}+h)}{h} = -1\text{,}\) and thus \(g'(\frac{\pi}{2}) = -1\text{.}\) This matches the estimate generated visually by sketching the tangent line at \((\frac{\pi}{2},g(\frac{\pi}{2}))\text{.}\) Finally, by the periodicity of the sine 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 Figure 2.2.5.

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

Figure 2.2.6. At left, the graph of \(y = g(x) = \cos(x)\text{.}\) At right, the graph of \(y = g'(x)\)

The sine and cosine functions not only have beautiful connections such as the identities \(\sin^2(x) + \cos^2(x) = 1\) and \(\cos(x - \frac{\pi}{2}) = \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 activities 1 .

These two rules may be formally proved using the limit definition of the derivative and the expansion identities for \(\sin(x+h)\) and \(\cos(x+h)\text{.}\)
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.

Activity 2.2.4.

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. Find the exact slope of the tangent line to \(y = f(x) = 2x + \frac{\sin(x)}{2}\) at the point where \(x = \frac{\pi}{6}\text{.}\)

  3. Find the equation of the tangent line to \(y = g(x) = x^2 + 2\cos(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(\frac{\pi}{2})\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'(\frac{\pi}{6})\) tells us the slope of the tangent line at \((\frac{\pi}{6},\frac{\pi}{6})\text{.}\)

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

  4. \(\sin(\frac{\pi}{2})\) 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.”

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

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

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

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

Solution
  1. By the sum and constant multiple rules, \(\frac{dh}{dt} = 3(-\sin(t)) - 4(\cos(t)) = -3\sin(t) - 4\cos(t)\text{.}\)

  2. The exact slope of the tangent line to \(y = f(x) = 2x + \frac{\sin(x)}{2}\) at \(x = \frac{\pi}{6}\) is given by \(f'(\frac{\pi}{6})\text{.}\) So, we first compute \(f'(x)\text{.}\) Using the sum and constant multiple rules, \(f'(x) = 2 + \frac{1}{2}\cos(x)\text{,}\) and thus \(f'(\frac{\pi}{6}) = 2 + \frac{1}{2} \cos(\frac{\pi}{6}) = 2 + \frac{\sqrt{3}}{4}\text{.}\)

  3. The tangent line passes through the point \((\frac{\pi}{2}, g(\frac{\pi}{2}))\) with slope \(g'(\frac{\pi}{2})\text{.}\) We observe first that \(g(\frac{\pi}{2}) = (\frac{\pi}{2})^2 + 2\cos(\frac{\pi}{2}) = \frac{\pi^2}{4}\text{.}\) Next, we compute the derivative function, \(g'(x)\text{,}\) and find that

    \begin{equation*} g'(x) = 2x - 2\sin(x)\text{.} \end{equation*}

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

    \begin{equation*} y - \frac{\pi^2}{4} = (\pi-1)(x-\frac{\pi}{2})\text{.} \end{equation*}
  4. Noting that \(\sin(\frac{\pi}{2})\) is a constant, we have \(p'(z) = 4z^3 + 4^z \ln(4) - 4\sin(z)\text{.}\)

  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 \(-3329\) animals per decade, which tells us that the animal population is shrinking considerably 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 3300 animals over the next ten years, provided the current population trend continues.

Subsection 2.2.2 Summary

  • By carefully analyzing the graphs of \(y = \sin(x)\) and that of the slopes of the tangent lines, in the Preview Activity, we found that \(\frac{d}{dx} [\sin(x)] = \cos(x)\) seems like a plausible result.

  • By using the limit definition for the derivative in the Activity sheet, 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, but now may 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.

Exercises 2.2.3 Exercises

1.

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{?}\)

Answer
  1. \(V'(2) = 24 \cdot 1.07^2 \cdot \ln(1.07) + 6 \cos(2) \approx -0.63778\) thousands of dollars per year.

  2. \(V''(2) = 24 \cdot 1.07^2 \cdot \ln(1.07)^2 - 6 \sin(2) \approx -5.33\) thousands of dollars per year per year. At this moment, \(V'\) is decreasing and we expect the derivative's value to decrease by about \(5.33\) thousand dollars per year over the course of the next year.

  3. See the figure below. Adding the term \(6\sin(t)\) to \(A\) to create the function \(V\) adds volatility to the value of the portfolio.

Solution
  1. January 1, 2012 corresponds to the instant \(t = 2\text{,}\) so we compute \(V'(2)\text{.}\) First, we observe by the sum and constant multiple rules that \(V'(t) = 24 \cdot 1.07^t \cdot \ln(1.07) + 6 \cos(t)\text{.}\) Thus, \(V'(2) = 24 \cdot 1.07^2 \cdot \ln(1.07) + 6 \cos(2) \approx -0.63778\text{.}\) Since \(V\) is measured in thousands of dollars and \(t\) in years, we know that the portfolio's value is decreasing at a rate of \(637.78\) dollars per year on January 1, 2012.

  2. Since \(V'(t) = 24 \cdot 1.07^t \cdot \ln(1.07) + 6 \cos(t)\text{,}\) it follows that \(V''(t) = 24 \cdot 1.07^t \cdot (\ln(1.07))^2 - 6 \sin(t)\text{,}\) and thus \(V''(2) = 24 \cdot 1.07^2 \cdot \ln(1.07)^2 - 6 \sin(2) \approx -5.33\text{,}\) with units ``thousands of dollars per year per year.'' This means that at the moment \(t = 2\text{,}\) the portfolio's value is decreasing at a decreasing rate. More specifically, we know that \(V'\) is decreasing at the moment \(t = 2\) and expect the derivative's value to decrease by about \(5.33\) thousand dollars per year over the course of the next year. In other words, the portfolio's value is not only decreasing, but we expect it to decrease more rapidly as the year goes on.

  3. In the figure below, we see plots of both \(V\) and \(A\) along with their corresponding derivatives. We see that the function \(A\) is a purely exponential function that always increases at an increasing rate. By adding the term \(6\sin(t)\) to \(A\) to create the function \(V\text{,}\) we add volatility to the value of the portfolio: the oscillating nature of the sine function not only creates variance in the stock's value, but also in its rate of change. We also observe that as time progresses and the value of \(24 \cdot (1.07)^t\) increases, the effect of \(6 \sin(t)\) lessens.

2.

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 tangent line approximation 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?

Answer
  1. \(f'\left(\frac{\pi}{4}\right) = -5\left(\frac{\sqrt{2}}{2}\right)\text{.}\)

  2. \(L(x) = 3+2(x-\pi)\text{.}\)

  3. Decreasing.

  4. The tangent line to \(f\) lies above the curve at this point.

Solution
  1. The slope of the line tangent to the graph of \(f\) at \(a = \frac{\pi}{4}\) is given by \(f'\left(\frac{\pi}{4}\right)\text{.}\) To find \(f'\left(\frac{\pi}{4}\right)\) we first find \(f'(x)\text{,}\) which is \(f'(x) = -3\sin(x) - 2\cos(x)\text{.}\) Thus,

    \begin{align*} f'\left(\frac{\pi}{4}\right) &= -3\sin\left(\frac{\pi}{4}\right) - 2\cos\left(\frac{\pi}{4}\right)\\ & -3\left(\frac{\sqrt{2}}{2}\right) - 3\left(\frac{\sqrt{2}}{2}\right) = -5\left(\frac{\sqrt{2}}{2}\right)\text{.} \end{align*}
  2. The linearization \(L(x)\) to \(f\) at \(a = \pi\) is \((x) = f(\pi) + f'(\pi)(x-\pi)\)L. We calculated \(f'(x)\) in part (a) and so \(f'(\pi) = -3\sin(\pi) - 2\cos(\pi) = 2\text{.}\) We also have \(f(\pi) = 3\cos(\pi) - 2\sin(\pi) + 6 = 3\text{.}\) Hence \(L(x) = 3+2(x-\pi)\text{.}\)

  3. A differentiable function \(f\) is increasing at \(x=a\) if and only if \(f'(a) \gt 0\) and decreasing if and only if \(f'(a) \lt 0\text{.}\) Now \(f'\left(\frac{\pi}{2}\right) = -3\sin\left(\frac{\pi}{2}\right) - 2\cos\left(\frac{\pi}{2}\right) = -3\text{,}\) so \(f\) is decreasing at \(a = \frac{\pi}{2}\text{.}\)

  4. If a curve defined by a function \(f\) is concave up at \(x=a\text{,}\) then the tangent line to \(f\) at \(x=a\) lies below the curve and if the graph of \(f\) is concave down at \(x=a\text{,}\) then the tangent line to \(f\) at \(x=a\) lies above the curve. The concavity of a curve is determined by the second derivative and \(f''(x) = -3\cos(x)+2\sin(x)\text{.}\) Since

    \begin{equation*} f''\left(\frac{3\pi}{2}\right) = -3\cos\left(\frac{3\pi}{2}\right) + 2\sin\left(\frac{3\pi}{2}\right) = -2\text{,} \end{equation*}

    the graph of \(f\) is concave down at \(a = \frac{3\pi}{2}\) and the tangent line to \(f\) lies above the curve at this point.