Graphs of the Sine and Cosine Function
Graph variations of y=sin( x ) and y=cos( x )
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. The table below lists some of the values for the sine function on a unit circle.x | 0 | [latex]\frac{π}{6}\\[/latex] | [latex]\frac{π}{6}\\[/latex] | [latex]\frac{π}{3}\\[/latex] | [latex]\frac{π}{2}\\[/latex] | [latex]\frac{2π}{3}\\[/latex] | [latex]\frac{3π}{4}\\[/latex] | [latex]\frac{5π}{6}\\[/latex] | π |
sin(x) | 0 |
[latex]\frac{1}{2}\\[/latex] |
[latex]\frac{\sqrt{2}}{2}\\[/latex] |
[latex]\frac{\sqrt{3}}{2}\\[/latex] |
1 | [latex]\frac{\sqrt{3}}{2}\\[/latex] | [latex]\frac{\sqrt{2}}{2}\\[/latex] | [latex]\frac{1}{2}\\[/latex] | 0 |
x | 0 | [latex]\frac{π}{6}\\[/latex] | [latex]\frac{π}{4}\\[/latex] | [latex]\frac{π}{3}\\[/latex] | [latex]\frac{π}{2}\\[/latex] | [latex]\frac{2π}{3}\\[/latex] | [latex]\frac{3π}{4}\\[/latex] | [latex]\frac{5π}{6}\\[/latex] | π |
cos(x) | 1 | [latex]\frac{\sqrt{3}}{2}\\[/latex] | [latex]\frac{\sqrt{2}}{2}\\[/latex] | [latex]\frac{1}{2}\\[/latex] |
0 |
[latex]−\frac{1}{2}\\[/latex]
|
[latex]−\frac{\sqrt{2}}{2}\\[/latex] | [latex]−\frac{\sqrt{3}}{2}\\[/latex] | −1 |
A General Note: Characteristics of Sine and Cosine Functions
The sine and cosine functions have several distinct characteristics:- They are periodic functions with a period of 2π.
- The domain of each function is (−∞,∞) and the range is [−1,1].
- The graph of y = sin x is symmetric about the origin, because it is an odd function.
- The graph of y = cos x is symmetric about the y-axis, because it is an even function.
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 areDetermining 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 [latex]\text{P = }\frac{2π}{|B|}[/latex]. If |B| > 1, then the period is less than 2π and the function undergoes a horizontal compression, whereas if |B| < 1, then the period is greater than 2π and the function undergoes a horizontal stretch. For example, f(x) = sin(x), B = 1, so the period is 2π, which we knew. If f(x) = sin(2x), then B = 2, so the period is π and the graph is compressed. If [latex]\text{f (x) = sin} (\frac{x}{2} )[/latex], then [latex]B=\frac{1}{2}[/latex], so the period is 4π and the graph is stretched. Notice in Figure 8 how the period is indirectly related to |B|.A General Note: Period of Sinusoidal Functions
If we let C = 0 and D = 0 in the general form equations of the sine and cosine functions, we obtain the formsExample 1: Identifying the Period of a Sine or Cosine Function
Determine the period of the function [latex]f(x) = \sin(\frac{π}{6}x)\\[/latex].Solution
Let's begin by comparing the equation to the general form [latex]y=Asin(Bx)[/latex]. In the given equation, [latex]B =\frac{π}{6}[/latex], so the period will be[latex]\begin{array}P=\frac{\frac{2}{\pi}}{|B|}\hfill \\ =\frac{2\pi}{\frac{x}{6}}\hfill \\ =2\pi\times \frac{6}{\pi}\hfill \\ =12\hfill \end{array}\\[/latex]
Try It 1
Determine the period of the function [latex]g(x)=\cos(\frac{x}{3})\\[/latex]. SolutionDetermining 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 vertical midline of the graph, which is the line x = 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 ofA General Note: Amplitude of Sinusoidal Functions
If we let C = 0 and D = 0 in the general form equations of the sine and cosine functions, we obtain the formsExample 2: Identifying the Amplitude of a Sine or Cosine Function
What is the amplitude of the sinusoidal function [latex]f(x)=−4\sin(x)\\[/latex]? Is the function stretched or compressed vertically?Solution
Let’s begin by comparing the function to the simplified form y = A sin(Bx). In the given function, A = −4, so the amplitude is |A|=|−4| = 4. The function is stretched.Analysis of the Solution
The negative value of A results in a reflection across the x-axis of the sine function, as shown in Figure 10.Try It 2
What is the amplitude of the sinusoidal function f(x) = 12 sin (x)? Is the function stretched or compressed vertically? SolutionAnalyzing Graphs of Variations of y = sin x 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:A General Note: Variations of Sine and Cosine Functions
Given an equation in the form [latex]f(x)=A\sin(Bx−C)+D\\[/latex] or [latex]f(x)=A\cos(Bx−C)+D\\[/latex], [latex]\frac{C}{B}\\[/latex]is the phase shift and D is the vertical shift.Example 3: Identifying the Phase Shift of a Function
Determine the direction and magnitude of the phase shift for [latex]f(x)=\sin(x+\frac{π}{6})−2\\[/latex].Solution
Let’s begin by comparing the equation to the general form [latex]y=A\sin(Bx−C)+D\\[/latex]. In the given equation, notice that B = 1 and [latex]C=−\frac{π}{6}\\[/latex]. So the phase shift is[latex]\begin{array}\frac{C}{B}=−\frac{\frac{x}{6}}{1}\hfill \\ =−\frac{\pi}{6}\hfill \end{array}\\[/latex]
or [latex]\frac{\pi}{6}\\[/latex] units to the left.Analysis of the Solution
We must pay attention to the sign in the equation for the general form of a sinusoidal function. The equation shows a minus sign before C. Therefore [latex]f(x)=\sin(x+\frac{π}{6})−2\\[/latex] can be rewritten as [latex]f(x)=\sin(x−(−\frac{π}{6}))−2\\[/latex]. If the value of C is negative, the shift is to the left.Try It 3
Determine the direction and magnitude of the phase shift for [latex]f(x)=3\cos(x−\frac{\pi}{2})\\[/latex]. SolutionExample 4: Identifying the Vertical Shift of a Function
Determine the direction and magnitude of the vertical shift for [latex]f(x)=\cos(x)−3\\[/latex].Solution
Let's begin by comparing the equation to the general form [latex]y=A\cos(Bx−C)+D\\[/latex]Try It 4
Determine the direction and magnitude of the vertical shift for [latex]f(x)=3\sin(x)+2\\[/latex]. SolutionHow To: Given a sinusoidal function in the form [latex]f(x)=A\sin(Bx−C)+D[/latex], identify the midline, amplitude, period, and phase shift.
- Determine the amplitude as|A|.
- Determine the period as [latex]P=\frac{2π}{|B|}\\[/latex].
- Determine the phase shift as [latex]\frac{C}{B}\\[/latex].
- Determine the midline as y = D.
Example 5: Identifying the Variations of a Sinusoidal Function from an Equation
Determine the midline, amplitude, period, and phase shift of the function [latex]y=3\sin(2x)+1\\[/latex].Solution
Let’s begin by comparing the equation to the general form [latex]y=A\sin(Bx−C)+D\\[/latex]. A = 3, so the amplitude is |A| = 3. Next, B = 2, so the period is [latex]\text{P}=\frac{2π}{|B|}=\frac{2π}{2}=π\\[/latex]. There is no added constant inside the parentheses, so C = 0 and the phase shift is [latex]\frac{C}{B}=\frac{0}{2}=0\\[/latex]. Finally, D = 1, so the midline is y = 1.Analysis of the Solution
Inspecting the graph, we can determine that the period is π, the midline is y = 1,and the amplitude is 3. See Figure 14.Try It 5
Determine the midline, amplitude, period, and phase shift of the function [latex]y=\frac{1}{2}\cos(\frac{x}{3}−\frac{π}{3})\\[/latex]. SolutionExample 6: Identifying the Equation for a Sinusoidal Function from a Graph
Determine the formula for the cosine function in Figure 15.Solution
Try It 6
Determine the formula for the sine function in Figure 16. SolutionExample 7: Identifying the Equation for a Sinusoidal Function from a Graph
Determine the equation for the sinusoidal function in Figure 17.Solution
With the highest value at 1 and the lowest value at−5, the midline will be halfway between at −2. So D = −2. The distance from the midline to the highest or lowest value gives an amplitude of |A|=3. The period of the graph is 6, which can be measured from the peak at x = 1 to the next peak at x = 7, or from the distance between the lowest points. Therefore, [latex]\text{P}=\frac{2\pi}{|B|}=6[/latex]. Using the positive value for B, we find that[latex]B=\frac{2π}{P}=\frac{2π}{6}=\frac{π}{3}\\[/latex]
So far, our equation is either [latex]y=3\sin(\frac{\pi}{3}x−C)−2\\[/latex] or [latex]y=3\cos(\frac{\pi}{3}x−C)−2\\[/latex]. For the shape and shift, we have more than one option. We could write this as any one of the following:- a cosine shifted to the right
- a negative cosine shifted to the left
- a sine shifted to the left
- a negative sine shifted to the right
[latex]y=3\cos(\frac{π}{3}x−\frac{π}{3})−2\\[/latex] or [latex]y=−3\cos(\frac{π}{3}x+\frac{2π}{3})−2\\[/latex]
Again, these functions are equivalent, so both yield the same graph.Try It 7
Write a formula for the function graphed in Figure 18. SolutionGraphing 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 equationsHow To: Given the function [latex]y=Asin(Bx)\\[/latex], sketch its graph.
- Identify the amplitude,|A|.
- Identify the period, [latex]P=\frac{2π}{|B|}\\[/latex].
- Start at the origin, with the function increasing to the right if A is positive or decreasing if A is negative.
- At [latex]x=\frac{π}{2|B|}\\[/latex] there is a local maximum for A > 0 or a minimum for A < 0, with y = A.
- The curve returns to the x-axis at [latex]x=\frac{π}{|B|}\\[/latex].
- There is a local minimum for A > 0 (maximum for A < 0) at [latex]x=\frac{3π}{2|B|}\\[/latex] with y = –A.
- The curve returns again to the x-axis at [latex]x=\frac{π}{2|B|}\\[/latex].
Example 8: Graphing a Function and Identifying the Amplitude and Period
Sketch a graph of [latex]f(x)=−2\sin(\frac{πx}{2})\\[/latex].Solution
Let’s begin by comparing the equation to the form [latex]y=A\sin(Bx)\\[/latex]. Step 1. We can see from the equation thatA=−2,so the amplitude is 2.|A| = 2
Step 2. The equation shows that [latex]B=\frac{π}{2}\\[/latex], so the period is[latex] \begin{array} \text{P}=\frac{2\pi}{\frac{\pi}{2}}\\=2\pi\times\frac{2}{\pi}\\=4 \end{array}\\[/latex]
Step 3. Because A is negative, the graph descends as we move to the right of the origin. Step 4–7. The x-intercepts are at the beginning of one period, x = 0, the horizontal midpoints are at x = 2 and at the end of one period at x = 4. The quarter points include the minimum at x = 1 and the maximum at x = 3. A local minimum will occur 2 units below the midline, at x = 1, and a local maximum will occur at 2 units above the midline, at x = 3. Figure 19 shows the graph of the function.Try It 8
Sketch a graph of [latex]g(x)=−0.8\cos(2x)\\[/latex]. Determine the midline, amplitude, period, and phase shift. SolutionHow To: Given a sinusoidal function with a phase shift and a vertical shift, sketch its graph.
- Express the function in the general form [latex]y=A\sin(Bx−C)+D[/latex] or [latex]y=A\cos(Bx−C)+D\\[/latex].
- Identify the amplitude, |A|.
- Identify the period, [latex]P=2π|B|[/latex].
- Identify the phase shift, [latex]\frac{C}{B}\\[/latex].
- Draw the graph of [latex]f(x)=A\sin(Bx)\\[/latex] shifted to the right or left by [latex]\frac{C}{B}\\[/latex] and up or down by D.
Example 9: Graphing a Transformed Sinusoid
Sketch a graph of [latex]f(x)=3\sin(\frac{π}{4}x−\frac{π}{4})\\[/latex].Solution
Step 1. The function is already written in general form: [latex]f(x)=3\sin(\frac{π}{4}x−\frac{π}{4})\\[/latex]. This graph will have the shape of a sine function, starting at the midline and increasing to the right. Step 2. |A|=|3|=3. The amplitude is 3. Step 3. Since [latex]|B|=|\frac{π}{4}|=\frac{π}{4}\\[/latex], we determine the period as follows.[latex]\text{P}=\frac{2π}{|B|}=\frac{2π}{\frac{π}{4}}=2π\times\frac{4}{π}=8\\[/latex]
The period is 8. Step 4. Since [latex]\text{C}=\frac{π}{4}\\[/latex], the phase shift is[latex]\frac{C}{B}=\frac{\frac{\pi}{4}}{\frac{\pi}{4}}=1\\[/latex].
The phase shift is 1 unit. Step 5. Figure 20 shows the graph of the function.Try It 9
Draw a graph of [latex]g(x)=−2\cos(\frac{\pi}{3}x+\frac{\pi}{6})\\[/latex]. Determine the midline, amplitude, period, and phase shift. SolutionExample 10: Identifying the Properties of a Sinusoidal Function
Given [latex]y=−2\cos(\frac{\pi}{2}x+\pi)+3\\[/latex], determine the amplitude, period, phase shift, and horizontal shift. Then graph the function.Solution
Begin by comparing the equation to the general form and use the steps outlined in Example 9. [latex-display]y=A\cos(Bx−C)+D\\[/latex-display] Step 1. The function is already written in general form. Step 2. Since A = −2, the amplitude is|A| = 2. Step 3. [latex]|B|=\frac{\pi}{2}\\[/latex], so the period is [latex]\text{P}=\frac{2π}{|B|}=\frac{2\pi}{\frac{\pi}{2}}\times2\pi=4\\[/latex]. The period is 4. Step 4. [latex]C=−\pi\\[/latex], so we calculate the phase shift as [latex]\frac{C}{B}=\frac{−\pi}{\frac{\pi}{2}}=−\pi\times\frac{2}{\pi}=−2\\[/latex]. The phase shift is −2. Step 5. D = 3, so the midline is y = 3, and the vertical shift is up 3. Since A is negative, the graph of the cosine function has been reflected about the x-axis. Figure 21 shows one cycle of the graph of the function.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.Example 11: Finding the Vertical Component of Circular Motion
A point rotates around a circle of radius 3 centered at the origin. Sketch a graph of the y-coordinate of the point as a function of the angle of rotation.Solution
Recall that, for a point on a circle of radius r, the y-coordinate of the point is [latex]y=r\sin(x)[/latex], so in this case, we get the equation [latex]y(x)=3\sin(x)[/latex]. The constant 3 causes a vertical stretch of the y-values of the function by a factor of 3, which we can see in the graph in Figure 22.Analysis of the Solution
Notice that the period of the function is still 2π; as we travel around the circle, we return to the point (3,0) for x = 2π, 4π, 6π, ....Because the outputs of the graph will now oscillate between –3 and 3, the amplitude of the sine wave is 3.Try It 10
What is the amplitude of the function [latex]f(x)=7\cos(x)[/latex]? Sketch a graph of this function. SolutionExample 12: Finding the Vertical Component of Circular Motion
A circle with radius 3 ft is mounted with its center 4 ft off the ground. The point closest to the ground is labeled P, as shown in Figure 23. Sketch a graph of the height above the ground of the point P as the circle is rotated; then find a function that gives the height in terms of the angle of rotation.Solution
Sketching the height, we note that it will start 1 ft above the ground, then increase up to 7 ft above the ground, and continue to oscillate 3 ft above and below the center value of 4 ft, as shown in Figure 24.[latex]y=−3\cos(x)+4[/latex]
Try It 11
A weight is attached to a spring that is then hung from a board, as shown in Figure 25. As the spring oscillates up and down, the position y of the weight relative to the board ranges from –1 in. (at time x = 0) to –7in. (at time x = π) below the board. Assume the position of y is given as a sinusoidal function of x. Sketch a graph of the function, and then find a cosine function that gives the position y in terms of x.Example 13: Determining a Rider’s Height on a Ferris Wheel
The London Eye is a huge Ferris wheel with a diameter of 135 meters (443 feet). It completes one rotation every 30 minutes. Riders board from a platform 2 meters above the ground. Express a rider’s height above ground as a function of time in minutes.Solution
With a diameter of 135 m, the wheel has a radius of 67.5 m. The height will oscillate with amplitude 67.5 m above and below the center. Passengers board 2 m above ground level, so the center of the wheel must be located 67.5 + 2 = 69.5 m above ground level. The midline of the oscillation will be at 69.5 m. The wheel takes 30 minutes to complete 1 revolution, so the height will oscillate with a period of 30 minutes. Lastly, because the rider boards at the lowest point, the height will start at the smallest value and increase, following the shape of a vertically reflected cosine curve.- Amplitude: 67.5, so A = 67.5
- Midline: 69.5, so D = 69.5
- Period: 30, so [latex]B=\frac{2\pi}{30}=\frac{\pi}{15}[/latex]
- Shape: −cos(t)
[latex]y=−67.5\cos(\frac{\pi}{15}t)+69.5[/latex]
where t is in minutes and y is measured in meters.Key Equations
Sinusoidal functions | [latex]f(x)=A\sin(Bx−C)+D[/latex] |
[latex]f(x)=A\cos(Bx−C)+D[/latex] |
Key Concepts
- Periodic functions repeat after a given value. The smallest such value is the period. The basic sine and cosine functions have a period of 2π.
- The function sin x is odd, so its graph is symmetric about the origin. The function cos x is even, so its graph is symmetric about the y-axis.
- The graph of a sinusoidal function has the same general shape as a sine or cosine function.
- In the general formula for a sinusoidal function, the period is [latex]\text{P}=\frac{2\pi}{|B|}[/latex].
- In the general formula for a sinusoidal function, |A|represents amplitude. If |A| > 1, the function is stretched, whereas if|A| < 1, the function is compressed.
- The value [latex]\frac{C}{B}[/latex] in the general formula for a sinusoidal function indicates the phase shift.
- The value D in the general formula for a sinusoidal function indicates the vertical shift from the midline.
- Combinations of variations of sinusoidal functions can be detected from an equation.
- The equation for a sinusoidal function can be determined from a graph.
- A function can be graphed by identifying its amplitude and period.
- A function can also be graphed by identifying its amplitude, period, phase shift, and horizontal shift.
- Sinusoidal functions can be used to solve real-world problems.
Glossary
- amplitude
- the vertical height of a function; the constant A appearing in the definition of a sinusoidal function
- midline
- the horizontal line y = D, where D appears in the general form of a sinusoidal function
- periodic function
- a function f(x) that satisfies [latex]f(x+P)=f(x)[/latex] for a specific constant P and any value of x
- phase shift
- the horizontal displacement of the basic sine or cosine function; the constant [latex]\frac{C}{B}[/latex]
- sinusoidal function
- any function that can be expressed in the form [latex]f(x)=A\sin(Bx−C)+D[/latex] or [latex]f(x)=A\cos(Bx−C)+D[/latex]
Section Exercises
1. Why are the sine and cosine functions called periodic functions? 2. How does the graph of [latex]y=\sin x[/latex] compare with the graph of [latex]y=\cos x[/latex]? Explain how you could horizontally translate the graph of [latex]y=\sin x[/latex] to obtain [latex]y=\cos x[/latex]. 3. For the equation [latex]A\cos(Bx+C)+D[/latex], what constants affect the range of the function and how do they affect the range? 4. How does the range of a translated sine function relate to the equation [latex]y=A\sin(Bx+C)+D[/latex]? 5. How can the unit circle be used to construct the graph of [latex]f(t)=\sin t[/latex]? 6. [latex]f(x)=2\sin x[/latex] 7. [latex]f(x)=\frac{2}{3}\cos x[/latex] 8. [latex]f(x)=−3\sin x[/latex] 9. [latex]f(x)=4\sin x[/latex] 10. [latex]f(x)=2\cos x[/latex] 11. [latex]f(x)=\cos(2x)[/latex] 12. [latex]f(x)=2\sin(\frac{1}{2}x)[/latex] 13. [latex]f(x)=4\cos(\pi x)[/latex] 14. [latex]f(x)=3\cos(\frac{6}{5}x)[/latex] 15. [latex]y=3\sin(8(x+4))+5[/latex] 16. [latex]y=2\sin(3x−21)+4[/latex] 17. [latex]y=5\sin(5x+20)−2[/latex] For the following exercises, graph one full period of each function, starting at [latex]x=0[/latex]. 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 [latex]x>0[/latex]. State the phase shift and vertical translation, if applicable. Round answers to two decimal places if necessary. 18. [latex]f(t)=2\sin(t−\frac{5\pi}{6})[/latex] 19. [latex]f(t)=−\cos(t+\frac{\pi}{3})+1[/latex] 20. [latex]f(t)=4\cos(2(t+\frac{\pi}{4}))−3[/latex] 21. [latex]f(t)=−\sin(12t+\frac{5\pi}{3})[/latex] 22. [latex]f(x)=4\sin(\frac{\pi}{2}(x−3))+7[/latex] 23. Determine the amplitude, midline, period, and an equation involving the sine function for the graph shown in Figure 26.Licenses & Attributions
CC licensed content, Shared previously
- Animation: Graphing the Sine Function Using The Unit Circle . Authored by: Mathispower4u. License: All Rights Reserved. License terms: Standard YouTube License.
- Animation: Graphing the Cosine Function Using the Unit Circle. Authored by: Mathispower4u. License: All Rights Reserved. License terms: Standard YouTube License.
CC licensed content, Specific attribution
- Precalculus. Provided by: OpenStax Authored by: OpenStax College. Located at: https://cnx.org/contents/[email protected]:1/Preface. License: CC BY: Attribution.