3.5 Derivatives of Trigonometric Functions
One of the most important types of motion in physics is simple harmonic motion, which is associated with such systems as an object with mass oscillating on a spring. Simple harmonic motion can be described by using either sine or cosine functions. In this section we expand our knowledge of derivative formulas to include derivatives of these and other trigonometric functions. We begin with the derivatives of the sine and cosine functions and then use them to obtain formulas for the derivatives of the remaining four trigonometric functions. Being able to calculate the derivatives of the sine and cosine functions will enable us to find the velocity and acceleration of simple harmonic motion.
3.5.1 Derivatives of the Sine and Cosine Functions
We begin our exploration of the derivative for the sine function by using the formula to make a reasonable guess at its derivative. Recall that for a function \(f(x),\)
\[f'(x) = \underset{h\rightarrow 0}{\text{lim}}\frac{f\left( {x + h} \right) - f(x)}{h}. \tag{1}\]
Consequently, for values of \(h\) very close to 0, \(f'(x) \approx \frac{f\left( {x + h} \right) - f(x)}{h}.\) We see that by using \(h = 0.01,\)
\[\frac{d}{dx}(\text{sin}\mspace{2mu} x) \approx \frac{\text{sin}\mspace{2mu}\left( {x + 0.01} \right) - \text{sin}\mspace{2mu} x}{0.01} \tag{2}\]
By setting \(D(x) = \frac{\text{sin}\mspace{2mu}\left( {x + 0.01} \right) - \text{sin}\mspace{2mu} x}{0.01}\) and using a graphing utility, we can get a graph of an approximation to the derivative of \(\text{sin}\mspace{2mu} x\) (Figure 1).

Figure 1 The graph of the function \(D(x)\) looks a lot like a cosine curve.
Upon inspection, the graph of \(D(x)\) appears to be very close to the graph of the cosine function. Indeed, we will show that
\[\frac{d}{dx}\left( {\text{sin}\mspace{2mu} x} \right) = \text{cos}\mspace{2mu} x. \tag{3}\]
If we were to follow the same steps to approximate the derivative of the cosine function, we would find that
\[\frac{d}{dx}(\text{cos}\mspace{2mu} x) = \text{−}\text{sin}\mspace{2mu}{x.} \tag{4}\]
Proof
Because the proofs for \(\frac{d}{dx}\left( {\text{sin}\mspace{2mu} x} \right) = \text{cos}\mspace{2mu} x\) and \(\frac{d}{dx}\left( {\text{cos}\mspace{2mu} x} \right) = \text{−}\text{sin}\mspace{2mu} x\) use similar techniques, we provide only the proof for \(\frac{d}{dx}\left( {\text{sin}\mspace{2mu} x} \right) = \text{cos}\mspace{2mu} x.\) Before beginning, recall two important trigonometric limits we learned in Introduction to Limits:
\[\underset{h\rightarrow 0}{\text{lim}}\frac{\text{sin}\mspace{2mu} h}{h} = 1\ \text{and}\ \underset{h\rightarrow 0}{\text{lim}}\frac{\text{cos}\mspace{2mu} h - 1}{h} = 0. \tag{7}\]
The graphs of \(y = \frac{\left( {\text{sin}\mspace{2mu} h} \right)}{h}\) and \(y = \frac{\left( {\text{cos}\mspace{2mu} h - 1} \right)}{h}\) are shown in Figure 2.

Figure 2 These graphs show two important limits needed to establish the derivative formulas for the sine and cosine functions.
We also recall the following trigonometric identity for the sine of the sum of two angles:
\[\text{sin}\mspace{2mu}\left( {x + h} \right) = \text{sin}\mspace{2mu} x\mspace{2mu}\text{cos}\mspace{2mu} h + \text{cos}\mspace{2mu} x\mspace{2mu}\text{sin}\mspace{2mu} h. \tag{8}\]
Now that we have gathered all the necessary equations and identities, we proceed with the proof.
\[\begin{array}{clccl} {\frac{d}{dx}\mspace{2mu}\text{sin}\mspace{2mu} x} & {= \underset{h\rightarrow 0}{\text{lim}}\frac{\text{sin}\mspace{2mu}\left( {x + h} \right) - \text{sin}\mspace{2mu} x}{h}} & & & {\text{Apply the definition}\ \text{of the derivative.}} \\ & {= \underset{h\rightarrow 0}{\text{lim}}\frac{\text{sin}\mspace{2mu} x\mspace{2mu}\text{cos}\mspace{2mu} h + \text{cos}\mspace{2mu} x\mspace{2mu}\text{sin}\mspace{2mu} h - \text{sin}\mspace{2mu} x}{h}} & & & \text{Use trig identity for the sine of the sum of two angles.} \\ & {= \underset{h\rightarrow 0}{\text{lim}}\left( {\frac{\text{sin}\mspace{2mu} x\mspace{2mu}\text{cos}\mspace{2mu} h - \text{sin}\mspace{2mu} x}{h} + \frac{\text{cos}\mspace{2mu} x\mspace{2mu}\text{sin}\mspace{2mu} h}{h}} \right)} & & & \text{Regroup.} \\ & {= \underset{h\rightarrow 0}{\text{lim}}\left( {\text{sin}\mspace{2mu} x\left( \frac{\text{cos}\mspace{2mu} h - 1}{h} \right) + \text{cos}\mspace{2mu} x\left( \frac{\text{sin}\mspace{2mu} h}{h} \right)} \right)} & & & {\text{Factor out}\ \text{sin}\mspace{2mu} x\ \text{and}\ \text{cos}\mspace{2mu} x.} \\ & {= \text{sin}\mspace{2mu} x{\cdot 0} + \text{cos}\mspace{2mu} x{\cdot 1}} & & & \text{Apply trig limit formulas.} \\ & {= \text{cos}\mspace{2mu} x} & & & \text{Simplify.} \end{array} \tag{9}\]
□
Figure 3 shows the relationship between the graph of \(f(x) = \text{sin}\mspace{2mu} x\) and its derivative \(f'(x) = \text{cos}\mspace{2mu} x.\) Notice that at the points where \(f(x) = \text{sin}\mspace{2mu} x\) has a horizontal tangent, its derivative \(f'(x) = \text{cos}\mspace{2mu} x\) takes on the value zero. We also see that where \(f(x) = \text{sin}\mspace{2mu} x\) is increasing, \(f'(x) = \text{cos}\mspace{2mu} x > 0\) and where \(f(x) = \text{sin}\mspace{2mu} x\) is decreasing, \(f'(x) = \text{cos}\mspace{2mu} x < 0.\)

Figure 3 Where \(f(x)\) has a maximum or a minimum, \(f'(x) = 0\) that is, \(f'(x) = 0\) where \(f(x)\) has a horizontal tangent. These points are noted with dots on the graphs.
3.5.2 Derivatives of Other Trigonometric Functions
Since the remaining four trigonometric functions may be expressed as quotients involving sine, cosine, or both, we can use the quotient rule to find formulas for their derivatives.
The derivatives of the remaining trigonometric functions may be obtained by using similar techniques. We provide these formulas in the following theorem.
3.5.3 Higher-Order Derivatives
The higher-order derivatives of \(\text{sin}\mspace{2mu} x\) and \(\text{cos}\mspace{2mu} x\) follow a repeating pattern. By following the pattern, we can find any higher-order derivative of \(\text{sin}\mspace{2mu} x\) and \(\text{cos}\mspace{2mu} x.\)
For the following exercises, find \(\frac{dy}{dx}\) for the given functions.
1. \(y = x^{2} - \text{sec}\mspace{2mu} x + 1\)
Solution (click to reveal)
\(\frac{dy}{dx} = 2x - \text{sec}\mspace{2mu} x\mspace{2mu}\text{tan}\mspace{2mu} x\)
2. \(y = 3\mspace{2mu}\text{csc}\mspace{2mu} x + \frac{5}{x}\)
3. \(y = x^{2}\text{cot}\mspace{2mu} x\)
Solution (click to reveal)
\(\frac{dy}{dx} = 2x\mspace{2mu}\text{cot}\mspace{2mu} x - x^{2}\text{csc}^{2}x\)
4. \(y = x - x^{3}\text{sin}\mspace{2mu} x\)
5. \(y = \frac{\text{sec}\mspace{2mu} x}{x}\)
Solution (click to reveal)
\(\frac{dy}{dx} = \frac{x\mspace{2mu}\text{sec}\mspace{2mu} x\mspace{2mu}\text{tan}\mspace{2mu} x - \text{sec}\mspace{2mu} x}{x^{2}}\)
6. \(y = \text{sin}\mspace{2mu} x\mspace{2mu}\text{tan}\mspace{2mu} x\)
7. \(y = \left( {x + \text{cos}\mspace{2mu} x} \right)\left( {1 - \text{sin}\mspace{2mu} x} \right)\)
Solution (click to reveal)
\(\frac{dy}{dx} = \left( {1 - \text{sin}\mspace{2mu} x} \right)\left( {1 - \text{sin}\mspace{2mu} x} \right) - \text{cos}\mspace{2mu} x\left( {x + \text{cos}\mspace{2mu} x} \right)\)
8. \(y = \frac{\text{tan}\mspace{2mu} x}{1 - \text{sec}\mspace{2mu} x}\)
9. \(y = \frac{1 - \text{cot}\mspace{2mu} x}{1 + \text{cot}\mspace{2mu} x}\)
Solution (click to reveal)
\(\frac{dy}{dx} = \frac{2\mspace{2mu}\text{csc}^{2}x}{\left( {1 + \text{cot}\mspace{2mu} x} \right)^{2}}\)
10. \(y = \text{cos}\mspace{2mu} x\left( {1 + \text{csc}\mspace{2mu} x} \right)\)
For the following exercises, find an equation of the tangent line to each of the given functions at the indicated values of \(x.\) Then use a calculator to graph both the function and the tangent line to ensure the equation for the tangent line is correct.
11. [T] \(f(x) = \text{−}\text{sin}\mspace{2mu} x,x = 0\)
Solution (click to reveal)
\(y = \text{−}x\)

12. [T] \(f(x) = \text{csc}\mspace{2mu} x,x = \frac{\pi}{2}\)
13. [T] \(f(x) = 1 + \text{cos}\mspace{2mu} x,x = \frac{3\pi}{2}\)
Solution (click to reveal)
\(y = x + \frac{2 - 3\pi}{2}\)

14. [T] \(f(x) = \text{sec}\mspace{2mu} x,x = \frac{\pi}{4}\)
15. [T] \(f(x) = x^{2} - \text{tan}\mspace{2mu} x,\ x = 0\)
Solution (click to reveal)
\(y = \text{−}x\)

16. [T] \(f(x) = 5\mspace{2mu}\text{cot}\mspace{2mu} x,\ x = \frac{\pi}{4}\)
For the following exercises, find \(\frac{d^{2}y}{dx^{2}}\) for the given functions.
17. \(y = x\mspace{2mu}\text{sin}\mspace{2mu} x - \text{cos}\mspace{2mu} x\)
Solution (click to reveal)
\(3\mspace{2mu}\text{cos}\mspace{2mu} x - x\mspace{2mu}\text{sin}\mspace{2mu} x\)
18. \(y = \text{sin}\mspace{2mu} x\mspace{2mu}\text{cos}\mspace{2mu} x\)
19. \(y = x - \frac{1}{2}\mspace{2mu}\text{sin}\mspace{2mu} x\)
Solution (click to reveal)
\(\frac{1}{2}\mspace{2mu}\text{sin}\mspace{2mu} x\)
20. \(y = \frac{1}{x} + \text{tan}\mspace{2mu} x\)
21. \(y = 2\mspace{2mu}\text{csc}\mspace{2mu} x\)
Solution (click to reveal)
\(2\text{csc}\mspace{2mu} x\left( {\text{csc}^{2}x + \text{cot}^{2}x} \right)\)
22. \(y = \text{sec}^{2}x\)
23. Find all \(x\) values on the graph of \(f(x) = -3\mspace{2mu}\text{sin}\mspace{2mu} x\mspace{2mu}\text{cos}\mspace{2mu} x\) where the tangent line is horizontal.
Solution (click to reveal)
\(\frac{(2n + 1)\pi}{4},\text{where}\ n\mspace{2mu}\text{is an integer}\)
24. Find all \(x\) values on the graph of \(f(x) = x - 2\mspace{2mu}\text{cos}\mspace{2mu} x\) for \(0 < x < 2\pi\) where the tangent line has slope 2.
25. Let \(f(x) = \text{cot}\mspace{2mu} x.\) Determine the points on the graph of \(f\) for \(0 < x < 2\pi\) where the tangent line(s) is (are) parallel to the line \(y = -2x.\)
Solution (click to reveal)
\(\left( \frac{\pi}{4},~1 \right),~{\left( \frac{3\pi}{4},~-1 \right),~}\left( \frac{5\pi}{4},~1 \right),~\left( \frac{7\pi}{4},~ - 1 \right)\)
26. [T] A mass on a spring bounces up and down in simple harmonic motion, modeled by the function \(s(t) = -6\mspace{2mu}\text{cos}\mspace{2mu} t\) where \(s\) is measured in inches and \(t\) is measured in seconds. Find the rate at which the spring is oscillating at \(t = 5\) s.
27. Let the position of a swinging pendulum in simple harmonic motion be given by \(s(t) = a\mspace{2mu}\text{cos}\mspace{2mu} t + b\mspace{2mu}\text{sin}\mspace{2mu} t\) where \(a\) and \(b\) are constants, \(t\) measures time in seconds, and \(s\) measures position in centimeters. If the position is 0 cm and the velocity is 3 cm/s when \(t = 0\), find the values of \(a\) and \(b\).
Solution (click to reveal)
\(a = 0,b = 3\)
28. After a diver jumps off a diving board, the edge of the board oscillates with position given by \(s(t) = -5\mspace{2mu}\text{cos}\mspace{2mu} t\) cm at \(t\) seconds after the jump.
- Sketch one period of the position function for \(t \geq 0.\)
- Find the velocity function.
- Sketch one period of the velocity function for \(t \geq 0.\)
- Determine the times when the velocity is 0 over one period.
- Find the acceleration function.
- Sketch one period of the acceleration function for \(t \geq 0.\)
29. The number of hamburgers sold at a fast-food restaurant in Pasadena, California, is given by \(y = 10 + 5\mspace{2mu}\text{sin}\mspace{2mu} x\) where \(y\) is the number of hamburgers sold and \(x\) represents the number of hours after the restaurant opened at 11 a.m. until 11 p.m., when the store closes. Find \(y'\) and determine the intervals where the number of burgers being sold is increasing.
Solution (click to reveal)
\(y' = 5\mspace{2mu}\text{cos}\mspace{2mu}(x),\) increasing on \(\left( {0,\frac{\pi}{2}} \right),\left( {\frac{3\pi}{2},\frac{5\pi}{2}} \right),\) and \(\left( {\frac{7\pi}{2},12} \right)\)
30. [T] The amount of rainfall per month in Phoenix, Arizona, can be approximated by \(y(t) = 0.5 + 0.3\mspace{2mu}\text{cos}\mspace{2mu} t,\) where \(t\) is months since January. Find \(y'\) and use a calculator to determine the intervals where the amount of rain falling is decreasing.
For the following exercises, use the quotient rule to derive the given equations.
31. \(\frac{d}{dx}(\text{cot}\mspace{2mu} x) = \text{−}\text{csc}^{2}x\)
32. \(\frac{d}{dx}(\text{sec}\mspace{2mu} x) = \text{sec}\mspace{2mu} x\mspace{2mu}\text{tan}\mspace{2mu} x\)
33. \(\frac{d}{dx}(\text{csc}\mspace{2mu} x) = \text{−}\text{csc}\mspace{2mu} x\mspace{2mu}\text{cot}\mspace{2mu} x\)
34. Use the definition of derivative and the identity
\(\text{cos}\mspace{2mu}\left( {x + h} \right) = \text{cos}\mspace{2mu} x\mspace{2mu}\text{cos}\mspace{2mu} h - \text{sin}\mspace{2mu} x\mspace{2mu}\text{sin}\mspace{2mu} h\) to prove that \(\frac{d\left( {\text{cos}\mspace{2mu} x} \right)}{dx} = \text{−}\text{sin}\mspace{2mu} x.\)
For the following exercises, find the requested higher-order derivative for the given functions.
35. \(\frac{d^{3}y}{dx^{3}}\) of \(y = 3\mspace{2mu}\text{cos}\mspace{2mu} x\)
Solution (click to reveal)
\(3\mspace{2mu}\text{sin}\mspace{2mu} x\)
36. \(\frac{d^{2}y}{dx^{2}}\) of \(y = 3\mspace{2mu}\text{sin}\mspace{2mu} x + x^{2}\text{cos}\mspace{2mu} x\)
37. \(\frac{d^{4}y}{dx^{4}}\) of \(y = 5\mspace{2mu}\text{cos}\mspace{2mu} x\)
Solution (click to reveal)
\(5\mspace{2mu}\text{cos}\mspace{2mu} x\)
38. \(\frac{d^{2}y}{dx^{2}}\) of \(y = \text{sec}\mspace{2mu} x + \text{cot}\mspace{2mu} x\)
39. \(\frac{d^{3}y}{dx^{3}}\) of \(y = x^{10} - \text{sec}\mspace{2mu} x\)
Solution (click to reveal)
\(720x^{7} - 5\mspace{2mu}\text{tan}\mspace{2mu}(x)\text{sec}^{3}(x) - \text{tan}^{3}(x)\mspace{2mu}\text{sec}\mspace{2mu}(x)\)