8.1 Graphs of the Sine and Cosine Functions

Figure 1 Light can be separated into colors because of its wavelike properties. (credit: “wonderferret”/ Flickr)
White light, such as the light from the sun, is not actually white at all. Instead, it is a composition of all the colors of the rainbow in the form of waves. The individual colors can be seen only when white light passes through an optical prism that separates the waves according to their wavelengths to form a rainbow.
Light waves can be represented graphically by the sine function. In the chapter on Trigonometric Functions, we examined trigonometric functions such as the sine function. In this section, we will interpret and create graphs of sine and cosine functions.
8.1.1 Graphing Sine and Cosine Functions
Recall that the sine and cosine functions relate real number values to the \(x\)- and \(y\)-coordinates of a point on the unit circle. So what do they look like on a graph on a coordinate plane? Let’s start with the sine function. We can create a table of values and use them to sketch a graph. Table 1 lists some of the values for the sine function on a unit circle.
| \(x\) | \(0\) | \(\frac{\pi}{6}\) | \(\frac{\pi}{4}\) | \(\frac{\pi}{3}\) | \(\frac{\pi}{2}\) | \(\frac{2\pi}{3}\) | \(\frac{3\pi}{4}\) | \(\frac{5\pi}{6}\) | \(\pi\) |
| \(\sin(x)\) | \(0\) | \(\frac{1}{2}\) | \(\frac{\sqrt{2}}{2}\) | \(\frac{\sqrt{3}}{2}\) | \(1\) | \(\frac{\sqrt{3}}{2}\) | \(\frac{\sqrt{2}}{2}\) | \(\frac{1}{2}\) | \(0\) |
Table 1
Plotting the points from the table and continuing along the \(x\)-axis gives the shape of the sine function. See Figure 2.

Figure 2 The sine function
Notice how the sine values are positive between 0 and \(\pi,\) which correspond to the values of the sine function in quadrants I and II on the unit circle, and the sine values are negative between \(\pi\) and \(2\pi,\) which correspond to the values of the sine function in quadrants III and IV on the unit circle. See Figure 3.

Figure 3 Plotting values of the sine function
Now let’s take a similar look at the cosine function. Again, we can create a table of values and use them to sketch a graph. Table 2 lists some of the values for the cosine function on a unit circle.
| \(\mathbf{x}\) | \(0\) | \(\frac{\pi}{6}\) | \(\frac{\pi}{4}\) | \(\frac{\pi}{3}\) | \(\frac{\pi}{2}\) | \(\frac{2\pi}{3}\) | \(\frac{3\pi}{4}\) | \(\frac{5\pi}{6}\) | \(\pi\) |
| \(\mathbf{\cos}\left( \mathbf{x} \right)\) | \(1\) | \(\frac{\sqrt{3}}{2}\) | \(\frac{\sqrt{2}}{2}\) | \(\frac{1}{2}\) | \(0\) | \(- \frac{1}{2}\) | \(- \frac{\sqrt{2}}{2}\) | \(- \frac{\sqrt{3}}{2}\) | \(- 1\) |
Table 2
As with the sine function, we can plots points to create a graph of the cosine function as in Figure 4.

Figure 4 The cosine function
Because we can evaluate the sine and cosine of any real number, both of these functions are defined for all real numbers. By thinking of the sine and cosine values as coordinates of points on a unit circle, it becomes clear that the range of both functions must be the interval \(\left\lbrack {- 1,1} \right\rbrack.\)
In both graphs, the shape of the graph repeats after \(2\pi,\) which means the functions are periodic with a period of \(2\pi.\) A periodic function is a function for which a specific horizontal shift, \(P\), results in a function equal to the original function: \(f\left( {x + P} \right) = f(x)\) for all values of \(x\) in the domain of \(f.\) When this occurs, we call the smallest such horizontal shift with \(P > 0\) the period of the function. Figure 5 shows several periods of the sine and cosine functions.

Figure 5
Looking again at the sine and cosine functions on a domain centered at the \(y\)-axis helps reveal symmetries. As we can see in Figure 6, the sine function is symmetric about the origin. Recall from The Other Trigonometric Functions that we determined from the unit circle that the sine function is an odd function because \(\sin(-x) = -\sin\; x.\) Now we can clearly see this property from the graph.

Figure 6 Odd symmetry of the sine function
Figure 7 shows that the cosine function is symmetric about the \(y\)-axis. Again, we determined that the cosine function is an even function. Now we can see from the graph that \(\cos(-x) = \cos\; x.\)

Figure 7 Even symmetry of the cosine function
8.1.2 Investigating Sinusoidal Functions
As we can see, sine and cosine functions have a regular period and range. If we watch ocean waves or ripples on a pond, we will see that they resemble the sine or cosine functions. However, they are not necessarily identical. Some are taller or longer than others. A function that has the same general shape as a sine or cosine function is known as a sinusoidal function. The general forms of sinusoidal functions are
\[\begin{array}{l} {y = A\sin\left( {Bx - C} \right) + D} \\ \text{and} \\ {y = A\cos\left( {Bx - C} \right) + D} \end{array}\]
Determining the Period of Sinusoidal Functions
Looking at the forms of sinusoidal functions, we can see that they are transformations of the sine and cosine functions. We can use what we know about transformations to determine the period.
In the general formula, \(B\) is related to the period by \(P = \frac{2\pi}{|B|}.\) If \(|B| > 1,\) then the period is less than \(2\pi\) and the function undergoes a horizontal compression, whereas if \(|B| < 1,\) then the period is greater than \(2\pi\) and the function undergoes a horizontal stretch. For example, \(f(x) = \sin\left( x\operatorname{),} \right.\) \(B = 1,\) so the period is \(2\pi,\) which we knew. If \(f(x) = \sin\left( {2x} \right),\) then \(B = 2,\) so the period is \(\pi\) and the graph is compressed. If \(f(x) = \sin\left( \frac{x}{2} \right),\) then \(B = \frac{1}{2},\) so the period is \(4\pi\) and the graph is stretched. Notice in Figure 8 how the period is indirectly related to \(|B|.\)

Figure 8
Determining Amplitude
Returning to the general formula for a sinusoidal function, we have analyzed how the variable \(B\) relates to the period. Now let’s turn to the variable \(A\) so we can analyze how it is related to the amplitude, or greatest distance from rest. \(A\) represents the vertical stretch factor, and its absolute value \(|A|\) is the amplitude. The local maxima will be a distance \(|A|\) above the horizontal midline of the graph, which is the line \(y = D;\) because \(D = 0\) in this case, the midline is the \(x\)-axis. The local minima will be the same distance below the midline. If \(|A| > 1,\) the function is stretched. For example, the amplitude of \(f(x) = 4\;\sin\; x\) is twice the amplitude of \(f(x) = 2\;\sin\; x.\) If \(|A| < 1,\) the function is compressed. Figure 9 compares several sine functions with different amplitudes.

Figure 9
8.1.3 Analyzing Graphs of Variations of \(y\) = sinx and \(y\) = cos \(x\)
Now that we understand how \(A\) and \(B\) relate to the general form equation for the sine and cosine functions, we will explore the variables \(C\) and \(D.\) Recall the general form:
\[\begin{matrix} {y = A\sin\left( {Bx - C} \right) + D\text{~and~}y = A\cos\left( {Bx - C} \right) + D} \\ {or} \\ {y = A\sin\left( {B\left( {x - \frac{C}{B}} \right)} \right) + D\text{~and~}y = A\cos\left( {B\left( {x - \frac{C}{B}} \right)} \right) + D} \end{matrix}\]
The value \(\frac{C}{B}\) for a sinusoidal function is called the phase shift, or the horizontal displacement of the basic sine or cosine function. If \(C > 0,\) the graph shifts to the right. If \(C < 0,\) the graph shifts to the left. The greater the value of \(|C|,\) the more the graph is shifted. Figure 11 shows that the graph of \(f(x) = \sin\left( {x - \pi} \right)\) shifts to the right by \(\pi\) units, which is more than we see in the graph of \(f(x) = \sin\left( {x - \frac{\pi}{4}} \right),\) which shifts to the right by \(\frac{\pi}{4}\) units.

Figure 11
While \(C\) relates to the horizontal shift, \(D\) indicates the vertical shift from the midline in the general formula for a sinusoidal function. See Figure 12. The function \(y = \cos(x) + D\) has its midline at \(y = D.\)

Figure 12
Any value of \(D\) other than zero shifts the graph up or down. Figure 13 compares \(f(x) = \sin\;(x)\) with \(f(x) = \sin\;(x) + 2,\) which is shifted 2 units up on a graph.

Figure 13
8.1.4 Graphing Variations of \(y\) = sin \(x\) and \(y\) = cos \(x\)
Throughout this section, we have learned about types of variations of sine and cosine functions and used that information to write equations from graphs. Now we can use the same information to create graphs from equations.
Instead of focusing on the general form equations
\[y = A\sin\left( {Bx - C} \right) + D\text{~and~}y = A\cos\left( {Bx - C} \right) + D,\]
we will let \(C = 0\) and \(D = 0\) and work with a simplified form of the equations in the following examples.
8.1.5 Using Transformations of Sine and Cosine Functions
We can use the transformations of sine and cosine functions in numerous applications. As mentioned at the beginning of the chapter, circular motion can be modeled using either the sine or cosine function.
Section Exercises
Verbal
1. Why are the sine and cosine functions called periodic functions?
Solution (click to reveal)
The sine and cosine functions have the property that \(f\left( {x + P} \right) = f(x)\) for a certain \(P.\) This means that the function values repeat for every \(P\) units on the \(x\)-axis.
2. How does the graph of \(y = \sin\; x\) compare with the graph of \(y = \cos\; x?\) Explain how you could horizontally translate the graph of \(y = \sin\; x\) to obtain \(y = \cos\; x.\)
3. For the equation \(A\;\cos(Bx + C) + D,\) what constants affect the range of the function and how do they affect the range?
Solution (click to reveal)
The absolute value of the constant \(A\) (amplitude) increases the total range and the constant \(D\) (vertical shift) shifts the graph vertically.
4. How does the range of a translated sine function relate to the equation \(y = A\;\sin(Bx + C) + D?\)
5. How can the unit circle be used to construct the graph of \(f(t) = \sin\; t?\)
Solution (click to reveal)
At the point where the terminal side of \(t\) intersects the unit circle, you can determine that the \(\sin\; t\) equals the \(y\)-coordinate of the point.
Graphical
For the following exercises, graph two full periods of each function and state the amplitude, period, and midline. State the maximum and minimum \(y\)-values and their corresponding \(x\)-values on one period for \(x > 0.\) Round answers to two decimal places if necessary.
6. \(f(x) = 2\sin\; x\)
7. \(f(x) = \frac{2}{3}\cos\; x\)
Solution (click to reveal)
![A graph of (2/3)cos(x). Graph has amplitude of 2/3, period of 2pi, and range of [-2/3, 2/3].](../images/CNX_Precalc_Figure_06_01_202.jpg)
amplitude: \(\frac{2}{3};\) period: \(2\pi;\) midline: \(y = 0;\) maximum: \(y = \frac{2}{3}\) occurs at \(x = 2\pi;\) minimum: \(y = - \frac{2}{3}\) occurs at \(x = \pi;\) for one period, the graph starts at 0 and ends at \(2\pi\)
8. \(f(x) = - 3\sin\; x\)
9. \(f(x) = 4\sin\; x\)
Solution (click to reveal)
![A graph of 4sin(x). Graph has amplitude of 4, period of 2pi, and range of [-4, 4].](../images/CNX_Precalc_Figure_06_01_204.jpg)
amplitude: 4; period: \(2\pi;\) midline: \(y = 0;\) maximum \(y = 4\) occurs at \(x = \frac{\pi}{2};\) minimum: \(y = - 4\) occurs at \(x = \frac{3\pi}{2};\) one full period occurs from \(x = 0\) to \(x = 2\pi\)
10. \(f(x) = 2\cos\; x\)
11. \(f(x) = \cos\left( {2x} \right)\)
Solution (click to reveal)
![A graph of cos(2x). Graph has amplitude of 1, period of pi, and range of [-1,1].](../images/CNX_Precalc_Figure_06_01_206.jpg)
amplitude: 1; period: \(\pi;\) midline: \(y = 0;\) maximum: \(y = 1\) occurs at \(x = \pi;\) minimum: \(y = - 1\) occurs at \(x = \frac{\pi}{2};\) one full period is graphed from \(x = 0\) to \(x = \pi\)
12. \(f(x) = 2\;\sin\left( {\frac{1}{2}x} \right)\)
13. \(f(x) = 4\;\cos(\pi x)\)
Solution (click to reveal)
![A graph of 4cos(pi*x). Grpah has amplitude of 4, period of 2, and range of [-4, 4].](../images/CNX_Precalc_Figure_06_01_208.jpg)
amplitude: 4; period: 2; midline: \(y = 0;\) maximum: \(y = 4\) occurs at \(x = 2;\) minimum: \(y = - 4\) occurs at \(x = 1\)
14. \(f(x) = 3\;\cos\left( {\frac{6}{5}x} \right)\)
15. \(y = 3\;\sin(8(x + 4)) + 5\)
Solution (click to reveal)
![A graph of 3sin(8(x+4))+5. Graph has amplitude of 3, range of [2, 8], and period of pi/4.](../images/CNX_Precalc_Figure_06_01_210.jpg)
amplitude: 3; period: \(\frac{\pi}{4};\) midline: \(y = 5;\) maximum: \(y = 8\) occurs at \(x = 0.12;\) minimum: \(y = 2\) occurs at \(x = 0.516;\) horizontal shift: \(- 4;\) vertical translation 5; one period occurs from \(x = 0\) to \(x = \frac{\pi}{4}\)
16. \(y = 2\;\sin(3x - 21) + 4\)
17. \(y = 5\;\sin(5x + 20) - 2\)
Solution (click to reveal)
![A graph of 5sin(5x+20)-2. Graph has an amplitude of 5, period of 2pi/5, and range of [-7,3].](../images/CNX_Precalc_Figure_06_01_212.jpg)
amplitude: 5; period: \(\frac{2\pi}{5};\) midline: \(y = -2;\) maximum: \(y = 3\) occurs at \(x = 0.08;\) minimum: \(y = -7\) occurs at \(x = 0.71;\) phase shift: \(-4;\) vertical translation: \(-2;\) one full period can be graphed on \(x = 0\) to \(x = \frac{2\pi}{5}\)
For the following exercises, graph one full period of each function, starting at \(x = 0.\) For each function, state the amplitude, period, and midline. State the maximum and minimum \(y\)-values and their corresponding \(x\)-values on one period for \(x > 0.\) State the phase shift and vertical translation, if applicable. Round answers to two decimal places if necessary.
18. \(f(t) = 2\sin\left( {t - \frac{5\pi}{6}} \right)\)
19. \(f(t) = - \cos\left( {t + \frac{\pi}{3}} \right) + 1\)
Solution (click to reveal)
![A graph of -cos(t+pi/3)+1. Graph has amplitude of 1, period of 2pi, and range of [0,2]. Phase shifted pi/3 to the left.](../images/CNX_Precalc_Figure_06_01_214.jpg)
amplitude: 1 ; period: \(2\pi;\) midline: \(y = 1;\) maximum: \(y = 2\) occurs at \(x = 2.09;\) minimum: \(y = 0\) occurs at \(t = 5.24;\) phase shift: \(- \frac{\pi}{3};\) vertical translation: 1; one full period is from \(t = 0\) to \(t = 2\pi\)
20. \(f(t) = 4\cos\left( {2\left( {t + \frac{\pi}{4}} \right)} \right) - 3\)
21. \(f(t) = - \sin\left( {\frac{1}{2}t + \frac{5\pi}{3}} \right)\)
Solution (click to reveal)
![A graph of -sin((1/2)*t + 5pi/3). Graph has amplitude of 1, range of [-1,1], period of 4pi, and a phase shift of -10pi/3.](../images/CNX_Precalc_Figure_06_01_216.jpg)
amplitude: 1; period: \(4\pi;\) midline: \(y = 0;\) maximum: \(y = 1\) occurs at \(t = 11.52;\) minimum: \(y = - 1\) occurs at \(t = 5.24;\) phase shift: \(- \frac{10\pi}{3};\) vertical shift: 0
22. \(f(x) = 4\sin\left( {\frac{\pi}{2}\left( {x - 3} \right)} \right) + 7\)
23. Determine the amplitude, midline, period, and an equation involving the sine function for the graph shown in Figure 26.
![A sinusoidal graph with amplitude of 2, range of [-5, -1], period of 4, and midline at y=-3.](../images/CNX_Precalc_Figure_06_01_218.jpg)
Figure 26
Solution (click to reveal)
amplitude: 2; midline: \(y = - 3;\) period: 4; equation: \(f(x) = 2\sin\left( {\frac{\pi}{2}x} \right) - 3\)
24. Determine the amplitude, period, midline, and an equation involving cosine for the graph shown in Figure 27.
![A graph with a cosine parent function, with amplitude of 3, period of pi, midline at y=-1, and range of [-4,2]](../images/CNX_Precalc_Figure_06_01_219.jpg)
Figure 27
25. Determine the amplitude, period, midline, and an equation involving cosine for the graph shown in Figure 28.
![A graph with a cosine parent function with an amplitude of 2, period of 5, midline at y=3, and a range of [1,5].](../images/CNX_Precalc_Figure_06_01_220.jpg)
Figure 28
Solution (click to reveal)
amplitude: 2; period: 5; midline: \(y = 3;\) equation: \(f(x) = - 2\cos\left( {\frac{2\pi}{5}x} \right) + 3\)
26. Determine the amplitude, period, midline, and an equation involving sine for the graph shown in Figure 29.
![A sinusoidal graph with amplitude of 4, period of 10, midline at y=0, and range [-4,4].](../images/CNX_Precalc_Figure_06_01_221.jpg)
Figure 29
27. Determine the amplitude, period, midline, and an equation involving cosine for the graph shown in Figure 30.
![A graph with cosine parent function, range of function is [-4,4], amplitude of 4, period of 2.](../images/CNX_Precalc_Figure_06_01_222.jpg)
Figure 30
Solution (click to reveal)
amplitude: 4; period: 2; midline: \(y = 0;\) equation: \(f(x) = - 4\cos\left( {\pi\left( {x - \frac{\pi}{2}} \right)} \right)\)
28. Determine the amplitude, period, midline, and an equation involving sine for the graph shown in Figure 31.

Figure 31
29. Determine the amplitude, period, midline, and an equation involving cosine for the graph shown in Figure 32.

Figure 32
Solution (click to reveal)
amplitude: 2; period: 2; midline \(y = 1;\) equation: \(f(x) = 2\cos\left( {\pi x} \right) + 1\)
30. Determine the amplitude, period, midline, and an equation involving sine for the graph shown in Figure 33.

Figure 33
Algebraic
For the following exercises, let \(f(x) = \sin\; x.\)
31. On \(\left\lbrack {0,2\pi}\operatorname{),} \right.\) solve \(f(x) = 0.\)
Solution (click to reveal)
\(0,\pi\)
32. On \(\left\lbrack {0,2\pi}\operatorname{),} \right.\) solve \(f(x) = \frac{1}{2}.\)
33. Evaluate \(f\left( \frac{\pi}{2} \right).\)
Solution (click to reveal)
\(\text{sin}\left( \frac{\pi}{2} \right) = 1\)
34. On \(\lbrack 0,2\pi),f(x) = \frac{\sqrt{2}}{2}.\) Find all values of \(x.\)
35. On \(\left\lbrack {0,2\pi}\operatorname{),} \right.\) the maximum value(s) of the function occur(s) at what \(x\)-value(s)?
Solution (click to reveal)
\(\frac{\pi}{2}\)
36. On \(\left\lbrack {0,2\pi}\operatorname{),} \right.\) the minimum value(s) of the function occur(s) at what \(x\)-value(s)?
37. Show that \(f(-x) = - f(x).\) This means that \(f(x) = \sin\; x\) is an odd function and possesses symmetry with respect to ________________.
Solution (click to reveal)
\(f(x) = \text{sin}x\) is symmetric
For the following exercises, let \(f(x) = \cos\; x.\)
38. On \(\left\lbrack {0,2\pi}\operatorname{),} \right.\) solve the equation \(f(x) = \cos\; x = 0.\)
39. On \(\left\lbrack {0,2\pi}\operatorname{),} \right.\) solve \(f(x) = \frac{1}{2}.\)
Solution (click to reveal)
\(\frac{\pi}{3},\frac{5\pi}{3}\)
40. On \(\left\lbrack {0,2\pi}\operatorname{),} \right.\) find the \(x\)-intercepts of \(f(x) = \cos\; x.\)
41. On \(\left\lbrack {0,2\pi}\operatorname{),} \right.\) find the \(x\)-values at which the function has a maximum or minimum value.
Solution (click to reveal)
Maximum: \(1\) at \(x = 0\) ; minimum: \(-1\) at \(x = \pi\)
42. On \(\left\lbrack {0,2\pi}\operatorname{),} \right.\) solve the equation \(f(x) = \frac{\sqrt{3}}{2}.\)
Technology
43. Graph \(h(x) = x + \sin\; x\) on \(\left\lbrack {0,2\pi} \right\rbrack.\) Explain why the graph appears as it does.
Solution (click to reveal)
A linear function is added to a periodic sine function. The graph does not have an amplitude because as the linear function increases without bound the combined function \(h(x) = x + \text{sin}x\) will increase without bound as well. The graph is bounded between the graphs of \(y = x + 1\) and \(y = x - 1\) because sine oscillates between −1 and 1.

44. Graph \(h(x) = x + \sin\; x\) on \(\left\lbrack {- 100{,}100} \right\rbrack.\) Did the graph appear as predicted in the previous exercise?
45. Graph \(f(x) = x\;\sin\; x\) on \(\left\lbrack {0,2\pi} \right\rbrack\) and verbalize how the graph varies from the graph of \(f(x) = \sin\; x.\)
Solution (click to reveal)
There is no amplitude because the function is not bounded.

46. Graph \(f(x) = x\;\sin\; x\) on the window \(\left\lbrack {-10,10} \right\rbrack\) and explain what the graph shows.
47. Graph \(f(x) = \frac{\sin\; x}{x}\) on the window \(\left\lbrack {-5\pi,5\pi} \right\rbrack\) and explain what the graph shows.
Solution (click to reveal)
The graph is symmetric with respect to the y-axis and there is no amplitude because the function’s bounds decrease as \(|x|\) grows. There appears to be a horizontal asymptote at \(y = 0\) .

Real-World Applications
48. A Ferris wheel is 25 meters in diameter and boarded from a platform that is 1 meter above the ground. The six o’clock position on the Ferris wheel is level with the loading platform. The wheel completes 1 full revolution in 10 minutes. The function \(h(t)\) gives a person’s height in meters above the ground \(t\) minutes after the wheel begins to turn.
ⓐ Find the amplitude, midline, and period of \(h(t).\)
ⓑ Find a formula for the height function \(h(t).\)
ⓒ How high off the ground is a person after 5 minutes?


![A graph of -0.5cos(x)+0.5. The graph has an amplitude of 0.5. The graph has a period of 2pi. The graph has a range of [0, 1]. The graph is also reflected about the x-axis from the parent function cos(x).](../images/CNX_Precalc_Figure_06_01_015.jpg)
![A graph of sin(x)+2. Period of 2pi, amplitude of 1, and range of [1, 3].](../images/CNX_Precalc_Figure_06_01_016.jpg)
![A graph of 3cos(pi/3x-pi/3)-2. Graph has amplitude of 3, period of 6, range of [-5,1].](../images/CNX_Precalc_Figure_06_01_017.jpg)
![A graph of 4sin((pi/5)x-pi/5)+4. Graph has period of 10, amplitude of 4, range of [0,8].](../images/CNX_Precalc_Figure_06_01_018n-0a72.jpg)
![A graph of -2sin((pi/2)x). Graph has range of [-2,2], period of 4, and amplitude of 2.](../images/CNX_Precalc_Figure_06_01_019.jpg)
![A graph of -0.8cos(2x). Graph has range of [-0.8, 0.8], period of pi, amplitude of 0.8, and is reflected about the x-axis compared to it's parent function cos(x).](../images/CNX_Precalc_Figure_06_01_020.jpg)



![A graph of 3sin(x). Graph has period of 2pi, amplitude of 3, and range of [-3,3].](../images/CNX_Precalc_Figure_06_01_023.jpg)
![A graph of 7cos(x). Graph has amplitude of 7, period of 2pi, and range of [-7,7].](../images/CNX_Precalc_Figure_06_01_024.jpg)



![A cosine graph with range [-1,-7]. Period is 2 pi. Local maximums at (0,-1), (2pi,-1), and (4pi, -1). Local minimums at (pi,-7) and (3pi, -7).](../images/CNX_Precalc_Figure_06_01_027.jpg)