6.1 Graphs of the Sine and Cosine Functions

A photo of a rainbow colored beam of light stretching across the floor.

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.

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 x 0 0 π 6 π 6 π 4 π 4 π 3 π 3 π 2 π 2 2 π 3 2 π 3 3 π 4 3 π 4 5 π 6 5 π 6 π π
sin ( x ) sin ( x ) 0 0 1 2 1 2 2 2 2 2 3 2 3 2 1 1 3 2 3 2 2 2 2 2 1 2 1 2 0 0

Plotting the points from the table and continuing along the x-axis gives the shape of the sine function. See Figure 2.

A graph of sin(x). Local maximum at (pi/2, 1). Local minimum at (3pi/2, -1). Period of 2pi.

Figure 2 The sine function

Notice how the sine values are positive between 0 and π , π , 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 π π and 2 π , 2 π , which correspond to the values of the sine function in quadrants III and IV on the unit circle. See Figure 3.

A side-by-side graph of a unit circle and a graph of sin(x). The two graphs show the equivalence of the coordinates.

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.

x x 0 0 π 6 π 6 π 4 π 4 π 3 π 3 π 2 π 2 2 π 3 2 π 3 3 π 4 3 π 4 5 π 6 5 π 6 π π
cos ( x ) cos ( x ) 1 1 3 2 3 2 2 2 2 2 1 2 1 2 0 0 − 1 2 − 1 2 − 2 2 − 2 2 − 3 2 − 3 2 − 1 − 1

As with the sine function, we can plots points to create a graph of the cosine function as in Figure 4.

A graph of cos(x). Local maxima at (0,1) and (2pi, 1). Local minimum at (pi, -1). Period of 2pi.

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 [ − 1 , 1 ] . [ − 1 , 1 ] .

In both graphs, the shape of the graph repeats after 2 π , 2 π , which means the functions are periodic with a period of 2 π . 2 π . A periodic function is a function for which a specific horizontal shift , P, results in a function equal to the original function: f ( x + P ) = f ( x ) f ( x + P ) = f ( x ) for all values of x x in the domain of f . f . When this occurs, we call the smallest such horizontal shift with P > 0 P > 0 the period of the function. Figure 5 shows several periods of the sine and cosine functions.

Side-by-side graphs of sin(x) and cos(x). Graphs show period lengths for both functions, which is 2pi.

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 . sin ( − x ) = − sin x . Now we can clearly see this property from the graph.

A graph of sin(x) that shows that sin(x) is an odd function due to <a href=the odd symmetry of the graph." width="489" height="192" />

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 . cos ( − x ) = cos x .

A graph of cos(x) that shows that cos(x) is an even function due to the even symmetry of the graph.

Figure 7 Even symmetry of the cosine function

Characteristics of Sine and Cosine Functions

The sine and cosine functions have several distinct characteristics:

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

y = A sin ( B x − C ) + D and y = A cos ( B x − C ) + D y = A sin ( B x − C ) + D and y = A cos ( B x − C ) + D

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.

A graph with three items. The x-axis ranges from 0 to 2pi. The y-axis ranges from -1 to 1. The first item is the graph of sin(x) for one full period. The second is the graph of sin(2x) over two periods. The third is the graph of sin(x/2) for one half of a period.

Period of Sinusoidal Functions

If we let C = 0 C = 0 and D = 0 D = 0 in the general form equations of the sine and cosine functions, we obtain the forms

y = A sin ( B x ) y = A sin ( B x ) y = A cos ( B x ) y = A cos ( B x )

The period is 2 π | B | . 2 π | B | .

Example 1

Identifying the Period of a Sine or Cosine Function

Determine the period of the function f ( x ) = sin ( π 6 x ) . f ( x ) = sin ( π 6 x ) .

Solution

Let’s begin by comparing the equation to the general form y = A sin ( B x ) . y = A sin ( B x ) .

In the given equation, B = π 6 , B = π 6 , so the period will be

P = 2 π | B | = 2 π π 6 = 2 π ⋅ 6 π = 12 P = 2 π | B | = 2 π π 6 = 2 π ⋅ 6 π = 12

Try It #1

Determine the period of the function g ( x ) = cos ( x 3 ) . g ( x ) = cos ( x 3 ) .

Determining Amplitude

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

A graph with four items. The x-axis ranges from -6pi to 6pi. The y-axis ranges from -4 to 4. The first item is the graph of sin(x), which has an amplitude of 1. The second is a graph of 2sin(x), which has amplitude of 2. The third is a graph of 3sin(x), which has an amplitude of 3. The fourth is a graph of 4 sin(x) with an amplitude of 4.

Amplitude of Sinusoidal Functions

If we let C = 0 C = 0 and D = 0 D = 0 in the general form equations of the sine and cosine functions, we obtain the forms

y = A sin ( B x ) and y = A cos ( B x ) y = A sin ( B x ) and y = A cos ( B x )

The amplitude is | A | , | A | , which is the vertical height from the midline . . In addition, notice in the example that

| A | = amplitude = 1 2 | maximum − minimum | | A | = amplitude = 1 2 | maximum − minimum |

Example 2

Identifying the Amplitude of a Sine or Cosine Function

What is the amplitude of the sinusoidal function f ( x ) = −4 sin ( x ) ? f ( x ) = −4 sin ( x ) ? Is the function stretched or compressed vertically?

Solution

Let’s begin by comparing the function to the simplified form y = A sin ( B x ) . y = A sin ( B x ) .

In the given function, A = −4 , A = −4 , so the amplitude is | A | = | −4 | = 4. | A | = | −4 | = 4. The function is stretched.

Analysis

The negative value of A A results in a reflection across the x-axis of the sine function , as shown in Figure 10.

A graph of -4sin(x). The function has an amplitude of 4. Local minima at (-3pi/2, -4) and (pi/2, -4). Local maxima at (-pi/2, 4) and (3pi/2, 4). Period of 2pi.

Try It #2

What is the amplitude of the sinusoidal function f ( x ) = 1 2 sin ( x ) ? f ( x ) = 1 2 sin ( x ) ? Is the function stretched or compressed vertically?

Analyzing Graphs of Variations of y = sin x and y = cos x

Now that we understand how A A and B B relate to the general form equation for the sine and cosine functions, we will explore the variables C C and D . D . Recall the general form:

y = A sin ( B x − C ) + D and y = A cos ( B x − C ) + D o r y = A sin ( B ( x − C B ) ) + D and y = A cos ( B ( x − C B ) ) + D y = A sin ( B x − C ) + D and y = A cos ( B x − C ) + D o r y = A sin ( B ( x − C B ) ) + D and y = A cos ( B ( x − C B ) ) + D

A graph with three items. The first item is a graph of sin(x). The second item is a graph of sin(x-pi/4), which is the same as sin(x) except shifted to the right by pi/4. The third item is a graph of sin(x-pi), which is the same as sin(x) except shifted to the right by pi.

While C C relates to the horizontal shift, D 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 y = cos ( x ) + D has its midline at y = D . y = D .

A graph of y=Asin(x)+D. Graph shows the midline of the function at y=D.

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

A graph with two items. The first item is a graph of sin(x). The second item is a graph of sin(x)+2, which is the same as sin(x) except shifted up by 2.

Variations of Sine and Cosine Functions

Given an equation in the form f ( x ) = A sin ( B x − C ) + D f ( x ) = A sin ( B x − C ) + D or f ( x ) = A cos ( B x − C ) + D , f ( x ) = A cos ( B x − C ) + D , C B C B is the phase shift and D D is the vertical shift .

Example 3

Identifying the Phase Shift of a Function

Determine the direction and magnitude of the phase shift for f ( x ) = sin ( x + π 6 ) − 2. f ( x ) = sin ( x + π 6 ) − 2.

Solution

Let’s begin by comparing the equation to the general form y = A sin ( B x − C ) + D . y = A sin ( B x − C ) + D .

In the given equation, notice that B = 1 B = 1 and C = − π 6 . C = − π 6 . So the phase shift is

C B = − π 6 1 = − π 6 C B = − π 6 1 = − π 6

or π 6 π 6 units to the left.

Analysis

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 . C . Therefore f ( x ) = sin ( x + π 6 ) − 2 f ( x ) = sin ( x + π 6 ) − 2 can be rewritten as f ( x ) = sin ( x − ( − π 6 ) ) − 2. f ( x ) = sin ( x − ( − π 6 ) ) − 2. If the value of C C is negative, the shift is to the left.

Try It #3

Determine the direction and magnitude of the phase shift for f ( x ) = 3 cos ( x − π 2 ) . f ( x ) = 3 cos ( x − π 2 ) .

Example 4

Identifying the Vertical Shift of a Function

Determine the direction and magnitude of the vertical shift for f ( x ) = cos ( x ) − 3. f ( x ) = cos ( x ) − 3.

Solution

Let’s begin by comparing the equation to the general form y = A cos ( B x − C ) + D . y = A cos ( B x − C ) + D .

In the given equation, D = −3 D = −3 so the shift is 3 units downward.

Try It #4

Determine the direction and magnitude of the vertical shift for f ( x ) = 3 sin ( x ) + 2. f ( x ) = 3 sin ( x ) + 2.

How To

Given a sinusoidal function in the form f ( x ) = A sin ( B x − C ) + D , f ( x ) = A sin ( B x − C ) + D , identify the midline, amplitude, period, and phase shift.

  1. Determine the amplitude as | A | . | A | .
  2. Determine the period as P = 2 π | B | . P = 2 π | B | .
  3. Determine the phase shift as C B . C B .
  4. Determine the midline as y = D . 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 y = 3 sin ( 2 x ) + 1. y = 3 sin ( 2 x ) + 1.

Solution

Let’s begin by comparing the equation to the general form y = A sin ( B x − C ) + D . y = A sin ( B x − C ) + D .

A = 3 , A = 3 , so the amplitude is | A | = 3. | A | = 3.

Next, B = 2 , B = 2 , so the period is P = 2 π | B | = 2 π 2 = π . P = 2 π | B | = 2 π 2 = π .

There is no added constant inside the parentheses, so C = 0 C = 0 and the phase shift is C B = 0 2 = 0. C B = 0 2 = 0.

Finally, D = 1 , D = 1 , so the midline is y = 1. y = 1.

Analysis

Inspecting the graph, we can determine that the period is π , π , the midline is y = 1 , y = 1 , and the amplitude is 3. See Figure 14.

A graph of y=3sin(2x)+1. The graph has an amplitude of 3. There is a midline at y=1. There is a period of pi. Local maximum at (pi/4, 4) and local minimum at (3pi/4, -2).

Try It #5

Determine the midline, amplitude, period, and phase shift of the function y = 1 2 cos ( x 3 − π 3 ) . y = 1 2 cos ( x 3 − π 3 ) .

Example 6

Identifying the Equation for a Sinusoidal Function from a Graph

Determine the formula for the cosine function in Figure 15.

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).

Solution

To determine the equation, we need to identify each value in the general form of a sinusoidal function.

y = A sin ( B x − C ) + D y = A cos ( B x − C ) + D y = A sin ( B x − C ) + D y = A cos ( B x − C ) + D

The graph could represent either a sine or a cosine function that is shifted and/or reflected. When x = 0 , x = 0 , the graph has an extreme point, ( 0 , 0 ) . ( 0 , 0 ) . Since the cosine function has an extreme point for x = 0 , x = 0 , let us write our equation in terms of a cosine function.

Let’s start with the midline. We can see that the graph rises and falls an equal distance above and below y = 0.5. y = 0.5. This value, which is the midline, is D D in the equation, so D = 0.5. D = 0.5.

The greatest distance above and below the midline is the amplitude. The maxima are 0.5 units above the midline and the minima are 0.5 units below the midline. So | A | = 0.5. | A | = 0.5. Another way we could have determined the amplitude is by recognizing that the difference between the height of local maxima and minima is 1, so | A | = 1 2 = 0.5. | A | = 1 2 = 0.5. Also, the graph is reflected about the x-axis so that A = − 0.5. A = − 0.5.

The graph is not horizontally stretched or compressed, so B = 1; B = 1; and the graph is not shifted horizontally, so C = 0. C = 0.

Putting this all together,