7 Graphs of the Sine and Cosine Functions
Learning Objectives
In this section, you will:
- Graph variations of y = sin( x ) and y = cos( x ).
- Use phase shifts of sine and cosine curves.

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. (Figure 1) lists some of the values for the sine function on a unit circle.
Plotting the points from the table and continuing along the x-axis gives the shape of the sine function. See (Figure 2).

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
which correspond to the values of the sine function in quadrants III and IV on the unit circle. See (Figure 3).

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. (Figure 4) lists some of the values for the cosine function on a unit circle.
As with the sine function, we can plots points to create a graph of the cosine function as in (Figure 4).

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
In both graphs, the shape of the graph repeats after which means the functions are periodic with a period of
A periodic function is a function for which a specific horizontal shift, P, results in a function equal to the original function:
for all values of
in the domain of
When this occurs, we call the smallest such horizontal shift with
the period of the function. (Figure 5) shows several periods of the sine and cosine functions.

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
Now we can clearly see this property from the graph.

(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

Characteristics of Sine and Cosine Functions
The sine and cosine functions have several distinct characteristics:
- They are periodic functions with a period of
- The domain of each function is
and the range is
- The graph of
is symmetric about the origin, because it is an odd function.
- The graph of
is symmetric about the
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 are
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, is related to the period by
If
then the period is less than
and the function undergoes a horizontal compression, whereas if
then the period is greater than
and the function undergoes a horizontal stretch. For example,
so the period is
which we knew. If
then
so the period is
and the graph is compressed. If
then
so the period is
and the graph is stretched. Notice in (Figure 8) how the period is indirectly related to

Period of Sinusoidal Functions
If we let and
in the general form equations of the sine and cosine functions, we obtain the forms
The period is
Identifying the Period of a Sine or Cosine Function
Determine the period of the function
Show Solution
Let’s begin by comparing the equation to the general form
In the given equation, so the period will be
Try It
Determine the period of the function
Show Solution
Determining Amplitude
Returning to the general formula for a sinusoidal function, we have analyzed how the variable relates to the period. Now let’s turn to the variable
so we can analyze how it is related to the amplitude, or greatest distance from rest.
represents the vertical stretch factor, and its absolute value
is the amplitude. The local maxima will be a distance
above the horizontal midline of the graph, which is the line
because
in this case, the midline is the x-axis. The local minima will be the same distance below the midline. If
the function is stretched. For example, the amplitude of
is twice the amplitude of
If
the function is compressed. (Figure 9) compares several sine functions with different amplitudes.

Amplitude of Sinusoidal Functions
If we let and
in the general form equations of the sine and cosine functions, we obtain the forms
The amplitude is and the vertical height from the midline is
In addition, notice in the example that
Identifying the Amplitude of a Sine or Cosine Function
What is the amplitude of the sinusoidal function Is the function stretched or compressed vertically?
Show Solution
Let’s begin by comparing the function to the simplified form
In the given function, so the amplitude is
The function is stretched vertically.
Analysis
The negative value of results in a reflection across the x-axis of the sine function, as shown in (Figure 10).

Try It
What is the amplitude of the sinusoidal function Is the function stretched or compressed vertically?
compressed
Analyzing Graphs of Variations of y = sin x and y = cos x
Now that we understand how and
relate to the general form equation for the sine and cosine functions, we will explore the variables
and
Recall the general form:
The value for a sinusoidal function is called the phase shift, or the horizontal displacement of the basic sine or cosine function. If
the graph shifts to the right. If
the graph shifts to the left. The greater the value of
the more the graph is shifted. (Figure 11) shows that the graph of
shifts to the right by
units, which is more than we see in the graph of
which shifts to the right by
units.

While effects the horizontal shift,
indicates the vertical shift from the midline in the general formula for a sinusoidal function. See (Figure 12). The function
has its midline at

Any value of other than zero shifts the graph up or down. (Figure 13) compares
with
which is shifted 2 units up on a graph.

Variations of Sine and Cosine Functions
Given an equation in the form or
is the phase shift and
is the vertical shift.
Identifying the Phase Shift of a Function
Determine the direction and magnitude of the phase shift for
Show Solution
Let’s begin by comparing the equation to the general form
In the given equation, notice that and
So the phase shift is
or 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 Therefore
can be rewritten as
If the value of
is negative, the shift is to the left.
Try It
Determine the direction and magnitude of the phase shift for
Show Solution
right
Identifying the Vertical Shift of a Function
Determine the direction and magnitude of the vertical shift for
Show Solution
Let’s begin by comparing the equation to the general form
In the given equation, so the shift is 3 units downward.
Try It
Determine the direction and magnitude of the vertical shift for
Show Solution
2 units up
Given a sinusoidal function in the form or
identify the midline, amplitude, period, and phase shift.
- Determine the amplitude as
- Determine the period as
- Determine the phase shift as
- Determine the midline as
Identifying the Variations of a Sinusoidal Function from an Equation
Determine the midline, amplitude, period, and phase shift of the function
Show Solution
Let’s begin by comparing the equation to the general form
so the amplitude is
Next, so the period is
There is no added constant inside the parentheses, so and the phase shift is
Finally, so the midline is
Analysis
Inspecting the graph, we can determine that the period is the midline is
and the amplitude is 3. See (Figure 14).

Try It
Determine the midline, amplitude, period, and phase shift of the function
Show Solution
midline: amplitude:
period:
phase shift:
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).](https://s3-us-west-2.amazonaws.com/courses-images/wp-content/uploads/sites/3252/2018/07/19143157/CNX_Precalc_Figure_06_01_015.jpg)
Show Solution
To determine the equation, we need to identify each value in the general form of a sinusoidal function.
The graph could represent either a sine or a cosine function that is shifted and/or reflected. When the graph has an extreme point,
Since the cosine function has an extreme point for
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 This value, which is the midline, is
in the equation, so
Note that this minimum is the reflection across the x-axis of cosine before the vertical shift.
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 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
Also, the graph is reflected about the x-axis so that
We can determine the period by measuring the distance between peaks. Since we have peaks at and
the period is
The graph is not horizontally stretched or compressed, so and since cosine has an extreme point at x = 0, the graph is not shifted horizontally, so
Putting this all together,
Try It
Determine the formula for the sine function in (Figure 16).
![A graph of sin(x)+2. Period of 2pi, amplitude of 1, and range of [1, 3].](https://s3-us-west-2.amazonaws.com/courses-images/wp-content/uploads/sites/3252/2018/07/19143201/CNX_Precalc_Figure_06_01_016.jpg)
Show Solution
Identifying the Equation for a Sinusoidal Function from a Graph
Determine the equation for the sinusoidal function in (Figure 17).
![A graph of 3cos(pi/3x-pi/3)-2. Graph has amplitude of 3, period of 6, range of [-5,1].](https://s3-us-west-2.amazonaws.com/courses-images/wp-content/uploads/sites/3252/2018/07/19143204/CNX_Precalc_Figure_06_01_017.jpg)
Show Solution
With the highest value at 1 and the lowest value a t the midline will be halfway between at
So
The distance from the midline to the highest or lowest value gives an amplitude of
The period of the graph is 6, which can be measured from the peak at to the next peak at
or from the distance between the lowest points. Therefore,
Using the positive value for
we find that
So far, our equation is either or
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
While any of these would be correct, the cosine shifts are easier to work with than the sine shifts in this case because they involve integer values. Since our phase shift is 1, and we have and
then
. So our function becomes
Again, these functions are equivalent, so both yield the same graph.
Try It
Write a formula for the function graphed in (Figure 18).
![A graph of 4sin((pi/5)x-pi/5)+4. Graph has period of 10, amplitude of 4, range of [0,8].](https://s3-us-west-2.amazonaws.com/courses-images/wp-content/uploads/sites/3252/2018/07/19143209/CNX_Precalc_Figure_06_01_018n.jpg)
Show Solution
two possibilities: or