Graphing the Sine and Cosine Functions

Learning Objectives

Introduction

You know how to graph many types of functions. Graphs are useful because they can take complicated information and display it in a simple, easy-to-read manner. You’ll now learn how to graph the sine and cosine functions, and see that the graphs of the sine function and cosine function are very similar.

Values of the Sine and Cosine Functions

We have seen a point `(x, y)` on a graph of a function. The first coordinate is the input or value of the variable, and the second coordinate is the output or value of the function.

Each point on the graph of the sine function will have the form `(theta, sin theta)`, and each point on the graph of the cosine function will have the form `(theta, cos theta)`. It is customary to use the Greek letter theta, `theta`, as the symbol for the angle. Graphing points in the form `(theta, sin theta)` is just like graphing points in the form `(x, y)`. Along the `x`-axis, we will be plotting `theta`, and along the `y`-axis, we will be plotting the value of `sin theta`. The graphs that we’ll draw will use values of `theta` in radians. Before drawing the graphs, it will be useful to find some values of `sin theta` and `cos theta`, and then gather them together in a table.

Let’s review the general definitions of these functions. Given any angle `theta`, draw it in standard position together with a unit circle. The terminal sideThe ray that has been rotated around the origin to form an angle with the stationary ray that is the initial side of the angle. will intersect the circle at some point `(x, y)`, as shown below.

An image shows a unit circle with angle theta in standard position. The initial side is on the x-axis, the terminal side is in quadrant 2, and the angle direction is counterclockwise. The terminal side intersects the circle at (X, Y).

The value of `cos theta` has been defined to be the `x`-coordinate of this point, and the value of `sin theta` has been defined to be the `y`-coordinate of this point.

Example

Problem

Find the values of `sin theta` and `cos theta` for `theta =pi/6, (5pi)/6, (7pi)/6, "and" (11pi)/6`.

 

`pi/6=30^@`

`(5pi)/6=150^@`

`(7pi)/6=210^@`

`(11pi)/6=330^@`

You might find it useful to convert these angles to degrees. All four angles have a reference angle of `30^@` or `pi/6` radians.

 

`cos pi/6=cos30^@=sqrt3/2`

`sin pi/6=sin 30^@=1/2`

Use the right triangle definition to find the `sin theta` and `cos theta` for `theta=pi/6`.

 

A unit circle shows an angle in each quadrant. Each angle measures 30 degrees when measured back to the nearest x-axis. The first angle is in quadrant 1, 30-degrees above the x-axis with a measure of pi over 6 radians. The terminal side intersects the circle at (the square root of 3 over 2, one-half). The second angle is in quadrant 2, 30-degrees above the negative x-axis with a measure of 5 pi over 6 radians. The terminal side intersects the circle at (the negative square root of 3 over 2, one-half). The third angle is in quadrant 3, 30-degrees below the negative x-axis with a measure of 7 pi over 6 radians. The terminal side intersects the circle at (the negative square root of 3 over 2, negative one-half). The fourth angle is in quadrant 4, 30-degrees below the x-axis with a measure of 11 pi over 6 radians. The terminal side intersects the circle at (the square root of 3 over 2, negative one-half).

Graph the four angles in standard position. The coordinates of the point in the first quadrant were found above. The `x`-coordinate is the value of `cos theta`, and the `y`-coordinate is the value of `sin theta`. The other points are reflections of the first point over the `x`-axis, the `y`-axis, or both.

Answer

`cos (pi/6)=cos ((11pi)/6)=sqrt3/2``cos ((5pi)/6)=cos ((7pi)/6)=- sqrt3/2`

`sin (pi/6)=sin((5pi)/6)=1/2``sin((7pi)/6)=sin((11pi)/6)=-1/2`

You can go through a similar procedure to find the values of `cos theta` and `sin theta` for `theta=pi/4, (3pi)/4, (5pi)/4, "and" (7pi)/4`. All four angles have a reference angle of `pi/4` radians or `45^@`.

A unit circle shows an angle in each quadrant. Each angle measures 45-degrees when measured back to the nearest x-axis. The first angle is in quadrant 1, 45 degrees above the x-axis with a measure of pi over 4 radians. The terminal side intersects the circle at (the square root of 2 over 2, the square root of 2 over 2). The second angle is in quadrant 2, 45-degrees above the negative x-axis with a measure of 3 pi over 4 radians. The terminal side intersects the circle at (the negative square root of 2 over 2, the square root of 2 over 2). The third angle is in quadrant 3, 45-degrees below the negative x-axis with a measure of 5 pi over 4 radians. The terminal side intersects the circle at (the negative square root of 2 over 2, the negative square root of 2 over 2). The fourth angle is in quadrant 4, 45-degrees below the x-axis with a measure of 7 pi over 4 radians. The terminal side intersects the circle at (the square root of 2 over 2, the negative square root of 2 over 2).

Using the fact that `cos(pi/4)=sqrt2/2=sin(pi/4)` gives you the coordinates of the point in the first quadrant. Since the other points are reflections of this one, the coordinates have the same or the opposite values.

The diagram below can be used to find the values of `cos theta` and `sin theta` for `theta=0, pi/2, pi, (3pi)/2, "and " 2pi`. Note that because `2pi=360^@`, when you draw the angle `2pi` in standard position, you end up back at the `x`-axis. `2pi` radians or `360^@` corresponds to the same point as `0` radians does, namely `(1,0)`.

A diagram shows a unit circle on a coordinate plane. The terminal side of 0 radians is on the x-axis and intersects the unit circle at (1, 0). The terminal side of pi over 2 radians is on the y-axis and intersects the unit circle at (0, 1). The terminal side of pi radians is on the negative x-axis and intersects the unit circle at (negative 1, 0). The terminal side of 3 pi over 2 radians is on the negative y-axis and intersects the circle at (0, negative 1). The terminal side of 2 pi radians is on the x-axis and intersects the unit circle at (1, 0) just as the 0 radians angle did.

Using the coordinates of the four points gives you:

`cos0=cos2pi=1` `sin(pi/2)=1`
`cos(pi/2)=cos((3pi)/2)=0` `sin0=sin pi=sin 2pi=0`
`cospi=-1` `sin((3pi)/2)=-1`

Supplemental Interactive Activity

To become more familiar with the coordinates of points on the unit circle, try the following interactive exercise.

The Graph of the Sine Function

Our goal right now is to graph the function `y=sin theta`. Each point on this function’s graph will have the form `(theta, sin theta)` with the values of `theta` in radians. The first step is to gather together in a table all the values of `sin theta` that you know. To start, we will use values of `theta` between `0^@` and `180^@` (or `0<=theta<=pi`).

`theta` (in degrees)

`theta` (in radians)

`sin theta`

`(theta, sin theta)`

`0^@`

`0`

`0`

`(0, 0)`

`30^@`

`pi/6`

`1/2`

`(pi/6, 1/2)`

`45^@`

`pi/4`

`sqrt2/2`

`(pi/4, sqrt2/2)`

`60^@`

`pi/3`

`sqrt3/2`

`(pi/3, sqrt3/2)`

`90^@`

`pi/2`

`1`

`(pi/2, 1)`

`120^@`

`(2pi)/3`

`sqrt3/2`

`((2pi)/3, sqrt3/2)`

`135^@`

`(3pi)/4`

`sqrt2/2`

`((3pi)/4, sqrt2/2)`

`150^@`

`(5pi)/6`

`1/2`

`((5pi)/6, 1/2)`

`180^@`

`pi`

`0`

`(pi, 0)`

When we graph functions, we often say to graph the function on an interval. We use interval notation to describe the interval. Interval notation has the form `[a, b]`, which means the interval begins at `a` and ends at `b`. In the example, the notation `[0, pi]` has the same meaning as `0<=theta<=pi`.

Example

Problem

Graph the sine function on the interval `[0, pi]`. Describe the values of the function as `theta` goes from `0` to `pi`.

 

An image shows a graph of the function Y equals sine theta on the interval from 0 to pi. On a coordinate plane, the x-axis goes from 0 to pi, and the y-axis goes from negative 1 to 1. Nine points connected by a smooth curve are shown at the following coordinates: (0, 0), (pi over 6, one-half), (pi over 4, the square root of 2 over 2), (pi over 3, the square root of 3 over 2), (pi over 2, 1), (2 pi over 3, the square root of 3 over 2), (3 pi over 4, the square root of 2 over 2), (5 pi over 6, one-half), and (pi, 0).

Plot all the points from the last column of the table above. Note that `sqrt2/2~~0.7` and that `sqrt3/2~~0.9`. Connect the points with a smooth curve.

Answer

The values increase from `0` to `1` and then decrease from `1` to `0`.

Note that our input is `theta`, the measure of the angle in radians, and that the horizontal axis is labeled `theta`, not `x`. Next we will gather together all the values of `sin theta` that you know for `pi<=theta<=2pi` in one table.

`theta` (in degrees)

`theta` (in radians)

`sin theta`

`(theta, sin theta)`

`180^@`

`pi`

`0`

`(pi, 0)`

`210^@`

`(7pi)/6`

`-1/2`

`((7pi)/6, -1/2)`

`225^@`

`(5pi)/4`

`-sqrt2/2`

`((5pi)/4, -sqrt2/2)`

`240^@`

`(4pi)/3`

`-sqrt3/2`

`((4pi)/3, -sqrt3/2)`

`270^@`

`(3pi)/2`

`-1`

`((3pi)/2, -1)`

`300^@`

`(5pi)/3`

`-sqrt3/2`

`((5pi)/3, -sqrt3/2)`

`315^@`

`(7pi)/4`

`-sqrt2/2`

`((7pi)/4, -sqrt2/2)`

`330^@`

`(11pi)/6`

`-1/2`

`((11pi)/6, -1/2)`

`360^@`

`2pi`

`0`

`(2pi,0)`

You could simply plot all the points from the last column and continue the graph in the last example. But notice the following: the values in the third column (or `y`-coordinates of the points) have the opposite values of the points that we just graphed. This means that instead of plotting points above the `theta`-axis, you will be plotting points below the `theta`-axis. Also, the inputs and outputs are spaced out in the same fashion for this part of the graph as they were for the first part of the graph. So instead of having a “hill” that goes from `0` up to `1` and down to `0`, you will have a “valley” that goes down from `0` to `-1` and then up to `0`.

An image shows a graph of the function Y equals sine theta on the interval from 0 to 2 pi. On a coordinate plane, the x-axis goes from 0 to 2 pi, and the y-axis goes from negative 1 to 1. A curve with one hill and one valley is plotted with the following coordinates: (0, 0), (pi over 2, 1), (pi, 0), (3 pi over 2, negative 1), and (2 pi, 0).

We have used values of `theta` from `0` to `2pi` to draw the graph of the sine function. What does the graph look like if we continue to the right of `2pi` for `2pi<=theta<=4pi`, which is one more time around the unit circle? In terms of degrees, these are angles between `360^@` and `720^@`. Let’s go back and look at one of these angles in standard position with the unit circle. A `400^@` angle is shown below.

An image shows a unit circle and a right triangle in quadrant 1 with a 40-degree angle in standard position. The initial side intersects the circle at (1, 0) and the terminal side intersects the circle at (X, Y). A curved arrow shows the 400-degree-angle. It starts at the x-axis, moves counterclockwise making a full rotation around the circle, and continues another 40 degrees.

Because `400^@=360^@+40^@`, the angle travels a full rotation plus another `40^@`, as shown by the curved arrow in the diagram. Imagine you are on `(1, 0)` and you walk around the circle one complete time and then you walk a little more to end up at `(x, y)`. This point where the terminal side intersects the unit circle is the same point that you would get for a `40^@` angle. All of the trigonometric functions for these two angles are computed using the coordinates of this point. This means that `sin400^@=sin40^@`, `cos400^@=cos40^@``tan400^@=tan40^@`, and the same is true for the three reciprocal functions.

There is nothing special about `400^@`. You could draw other angles that are greater than `360^@` and find similar results. The results above for sine and cosine can be rewritten as `sin(40^@+360^@)=sin40^@` and `cos(40^@+360^@)=cos40^@`. In general, it is true that `sin(theta^@+360^@)=sintheta^@` and `cos(theta^@+360^@)=costheta^@`, or, using radians:

`sin(theta+2pi)=sin theta`       and       `cos(theta+2pi)=cos theta`     

These two equations tell us that when we go around the circle a second time, we are going to get the same values for `sin(theta+2pi)` as we did for `sin theta` and the same values for `cos(theta+2pi)` as we did for `cos theta`. In other words, as we go around the same circle a second time, at the same locations on the circle we will get the same values for the `y`-coordinate and the `x`-coordinate that we did the first time around the circle.

Example

Problem

Sketch the graph of the sine function on the interval `[0, 4pi]` and find the range.

 

Because the values of the sine function between `2pi` and `4pi` are the same as the values between `0` and `2pi`, the shape of the graph between `2pi` and `4pi` is the same as the shape of the graph between `0` and `2pi`.

 

The range is the set of all `y`-values that the function can have, so the range of `y=sin theta` is `-1<=y<=1`.

 

Answer

An image shows a graph of the function Y equals sine theta on the interval from 0 to 4 pi. On a coordinate plane, the x-axis goes from 0 to 4 pi, and the y-axis goes from negative 1 to 1. A curve with a hill and valley pattern starts at (0, 0), increases to (pi over 2, 1), decreases to (pi, 0), decreases to (3 pi over 2, negative 1), increases to (2 pi, 0), increases to (5 pi over 2, 1), decreases to (3 pi, 0), decreases to (7 pi over 2, negative 1), and increases to (4 pi, 0).

 

 

The range of `y=sin theta` is `-1<=y<=1`.

The same reasoning that we used above works for negative angles. For example, the angles `-225^@` and `135^@` are drawn in standard position with the unit circle below.

A drawing shows a unit circle and a right triangle in quadrant 2 with a 135-degree-angle and a negative 225-degree-angle in standard position. The terminal side of each angle intersects the circle at (X, Y).

Because they are coterminal anglesThe description of two angles drawn in standard position that share their terminal side., they intersect the unit circle at the same point and therefore have the same coordinates. Therefore, `sin(-225^@)=sin135^@``cos(-225^@)=cos135^@`, and so on for the other trigonometric functions. Notice that we could rewrite the first equation as `sin(-225^@)=sin(-225^@+360^@)`. Likewise, `sin theta=sin(theta+360^@)`, or `sin theta=sin(theta+2pi)`, is true for any angle `theta` including negative angles. The equation `sin theta=sin(theta+2pi)` tells us that each time we go one additional full revolution around the circle, we get the same values for the sine and the cosine as we did the first time around the circle.

Example

Problem

Sketch the graph of the sine function on the interval `[-2pi, 2pi]`.

 

 

Because `sin theta=sin(theta+2pi)` is true for negative angles as well as positive angles, the values of the sine function between `-2pi` and `0` are the same as the values of the sine function between `0` and `2pi`.

 

Therefore, the shape of the graph between `-2pi` and `0` is the same as the shape of the graph between `0` and `2pi`.

Answer

An image shows a graph of the function Y equals sine theta on the interval from negative 2 pi to 2 pi. On a coordinate plane, the x-axis goes from negative 2 pi to 2 pi, and the y-axis goes from negative 1 to 1. A curve with a hill and valley pattern starts at (negative 2 pi, 0), increases to (negative 3 pi over 2, 1), decreases to (negative pi, 0), decreases to (negative pi over 2, negative 1), increases to (0, 0), increases to (pi over 2, 1), decreases to (pi, 0), decreases to (3 pi over 2, negative 1) and increases to (2 pi, 0).

Since the equation `sin(theta+2pi)=sin theta` is true for any angle, it is an identity. We can use this identity to continue the graph of the sine function in either direction. This “hill and valley” pattern over an interval of length `2pi` will continue in both directions forever.

Each time we add `2pi` to an angle, say `pi/6` or `30^@`, we will get the same function value.

`sin(pi/6)=sin(pi/6+2pi)=sin(pi/6+4pi)=sin(pi/6+6pi)=...=1/2`

You can also use the identity above to simplify calculations of the sine function by repeatedly subtracting `2pi` from the angle. For example:

`sin((17pi)/4)=sin(4pi+pi/4)=sin(2pi+pi/4)=sin(pi/4)=sqrt2/2`

What is the value of `sin((25pi)/6)`?

 

A) `1/2`

 

B) `-1/2` 

 

C) `sqrt3/2` 

 

D) `-sqrt3/2` 

 

The Graph of the Cosine Function

Now our goal is to graph `y=cos theta`. We will go through the same procedure as we did for the sine function, and the result will be similar.

Each point on the function’s graph will have the form `(theta, cos theta)` with the values of `theta` in radians. The first step is to gather together in a table all the values of `cos theta` that you know. To start, we will use values of `theta` between `0^@` and `180^@` (or `0<=theta<=pi`).

`theta` (in degrees)

`theta` (in radians)

`cos theta`

`(theta, cos theta)`

`0^@`

`0`

`1`

`(0, 1)`

`30^@`

`pi/6`

`sqrt3/2`

`(pi/6, sqrt3/2)`

`45^@`

`pi/4`

`sqrt2/2`

`(pi/4, sqrt2/2)`

`60^@`

`pi/3`

`1/2`

`(pi/3, 1/2)`

`90^@`

`pi/2`

`0`

`(pi/2, 0)`

`120^@`

`(2pi)/3`

`-1/2`

`((2pi)/3, -1/2)`

`135^@`

`(3pi)/4`

`-sqrt2/2`

`((3pi)/4, -sqrt2/2)`

`150^@`

`(5pi)/6`

`-sqrt3/2`

`((5pi)/6, -sqrt3/2)`

`180^@`

`pi`

`-1`

`(pi, -1)`

 

Example

Problem

Graph the cosine function on the interval `[0, pi]`. Describe the values of the function as `theta` goes from `0` to `pi`.

 

An image shows a graph of the function Y equals cosine theta on the interval from 0 to pi. On a coordinate plane, the x-axis goes from 0 to pi, and the y-axis goes from negative 1 to 1. Nine points connected by a smooth curve that starts on a hill are shown at the following coordinates: (0, 1), (pi over 6, the square root of 3 over 2), (pi over 4, the square root of 2 over 2), (pi over 3, one-half), (pi over 2, 0), (2 pi over 3, negative one-half), (3 pi over 4, negative the square root of 2 over 2), (5 pi over 6, the negative square root of 3 over 2), and (pi, negative 1).

Plot all the points from the last column of the table above. Note that `sqrt2/2~~0.7` and that `sqrt3/2~~0.9`. Connect them with a smooth curve.

Answer

The values decrease from `1` to `0` and also continue to decrease from `0` to `-1`.

Once again, our input is `theta`, the measure of the angle in radians, and the horizontal axis is labeled `theta`, not `x`. Next, we will gather together all the values of `cos theta` that you know for `pi<=theta<=2pi` in one table.

`theta` (in degrees)

`theta` (in radians)

`cos theta`

`(theta, cos theta)`

`180^@`

`pi`

`-1`

`(pi, -1)`

`210^@`

`(7pi)/6`

`-sqrt3/2`

`((7pi)/6, -sqrt3/2)`

`225^@`

`(5pi)/4`

`-sqrt2/2`

`((5pi)/4, -sqrt2/2)`

`240^@`

`(4pi)/3`

`-1/2`

`((4pi)/3, -1/2)`

`270^@`

`(3pi)/2`

`0`

`((3pi)/2, 0)`

`300^@`

`(5pi)/3`

`1/2`

`((5pi)/3, 1/2)`

`315^@`

`(7pi)/4`

`sqrt2/2`

`((7pi)/4, sqrt2/2)`

`330^@`

`(11pi)/6`

`sqrt3/2`

`((11pi)/6, sqrt3/2)`

`360^@`

`2pi`

`1`

`(2pi, 1)`

Again, you could simply plot all the points from the last column and continue the graph. Instead, compare the values in the third columns of the two tables: they are the same numbers, but in the reverse order. These are the `y`-coordinates of the points. This means that while the first part that we graphed decreased from `1` down to `-1`, this second part that we are graphing will increase from `-1` to `1` and have the “same shape” (turned around the other way). Here it is:

An image shows a graph of the function Y equals cosine theta on the interval from 0 to 2 pi. On a coordinate plane, the x-axis goes from 0 to 2 pi, and the y-axis goes from negative 1 to 1. A curve that starts on a hill, decreases, and increases again, is plotted with the following coordinates: (0, 1), (pi over 2, 0), (pi, negative 1), (3 pi over 4, 0), and (2 pi, 1).

The next step is to continue the graph for input values `2pi<=theta<=4pi`. When we were in the process of graphing the sine function, we established the following identity:

`cos(theta+2pi)=cos theta`

This equation tells us that when we go around the circle a second time, we are going to get the same values for `cos(theta+2pi)` as we did for `cos theta`.

In other words, as we go around the same circle a second time, at the same locations on the circle we will get the same values for the `x`-coordinate that we did the first time around the circle.

Example

Problem

Sketch the graph of the cosine function on the interval `[0, 4pi]`.

 

Because the outputs between `2pi` and `4pi` are the same as the outputs between `0` and `2pi`, the shape of the graph between `2pi` and `4pi` is the same as the shape of the graph between `0` and `2pi`.

Answer

An image shows a graph of the function Y equals cosine theta on the interval from 0 to 4 pi. On a coordinate plane, the x-axis goes from 0 to 4 pi, and the y-axis goes from negative 1 to 1. A curve with a valley and hill pattern starts at (0, 1), decreases to (pi over 2, 0), decreases to (pi, negative 1), increases to (3 pi over 2 4, 0), increases to (2 pi, 1), decreases to (5 pi over 2, 0), decreases to (3 pi, negative 1), increases to (7 pi over 2, 0), and increases to (4 pi, 1).

Just as the identity `sin theta=sin(theta+2pi)` is true for negative angles, the identity `cos(theta+2pi)=cos theta` is also true for any negative angle `theta`.

Example

Problem

Sketch the graph of the cosine function on the interval `[-2pi, 2pi]`.

 

 

Because `costheta=cos(theta+2pi)` is true for negative angles as well as positive angles, the values of the cosine function between `-2pi` and `0` are the same as the values of the cosine function between `0` and `2pi`.

 

Therefore, the shape of the graph between `-2pi` and `0` is the same as the shape of the graph between `0` and `2pi`.

Answer

An image shows a graph of the function Y equals cosine theta on the interval from negative 2pi to 2 pi. On a coordinate plane, the x-axis goes from negative 2 pi to 2 pi, and the y-axis goes from negative 1 to 1. A curve with a valley and hill pattern starts at (negative 2 pi, 1), decreases to (negative 3 pi over 2, 0), decreases to (negative pi, negative 1), increases to (negative pi over 2, 0), increases to (0, 1), decreases to (pi over 2, 0), decreases to (pi, negative 1), increases to (3 pi over 2, 0), and increases to (2 pi, 1).

The identity `cos(theta+2pi)=cos theta` was used above to extend the graph of the cosine function to the right and to the left. You can use this to continue to extend the graph in both directions. You will get another “hill and valley” pattern that repeats after intervals of length `2pi` in both directions.

Another important feature of the graph of `y=cos theta` is that the left and right halves are mirror images of each other over the `y`-axis. The graph of `y=x^2` has this same property. Another way to describe this is to say that if you substitute a number and its opposite into the function, you will get the same value as the previous equation. For example, `cos(-pi/4)=cos(pi/4)``cos(-pi)=cospi`, or in general, `cos(-theta)=cos theta`. We say that the graph is symmetric about the y-axisThe left and right halves of the graph are mirror images of each other over the `y`-axis. . The diagram below shows two points taken from a symmetric graph.

A diagram shows a coordinate plane with a point in quadrant 1 at (X, Y) and a symmetrical point in quadrant 2 at (negative X, Y).

The height of the points at opposite inputs is the same. The height is the value of the function. A function whose graph is symmetric about the `y`-axis has `f(-x)=f(x)`.

What is the range of the cosine function?

 

A) all values in the interval `[0, 1]` 

 

B) all values in the interval `[-1, 1]`

 

C) all values in the interval `[0, 2pi]`

 

D) all real numbers

 

A Comparison of the Graphs of Sine and Cosine

The graphs of sine and cosine both have hills and valleys in a repeating pattern.

Since this repeating pattern can be extended indefinitely to the left and right, the domain for both functions is the real numbers. The range for both of them is the interval `[-1, 1]`.

An image shows a graph of the function Y equals sine theta on the interval from negative 2pi to 2 pi. On a coordinate plane, the x-axis goes from negative 2 pi to 2 pi, and the y-axis goes from negative 1 to 1. The curve has a hill and valley pattern that starts at (negative 2 pi, 0), increases to (negative three pi over 2, 1), decreases to (negative pi, 0), decreases to (negative pi over 2, negative 1), increases to (0, 0), increases to (pi over 2, 1), decreases to (pi, 0), decreases to (3 pi over 2, negative 1) and increases to (2 pi, 0).  An image shows a graph of the function Y equals cosine theta on the interval from negative 2 pi to 2 pi. On a coordinate plane, the x-axis goes from negative 2 pi to 2 pi, and the y-axis goes from negative 1 to 1. The curve has a valley and hill pattern that starts at (negative 2 pi, 1), decreases to (negative 3 pi over 2, 0), decreases to (negative pi, negative 1), increases to (negative pi over 2, 0), increases to (0, 1), decreases to (pi over 2, 0), decreases to (pi, negative 1), increases to (3 pi over 2, 0) and increases to (2 pi, 1).

Let’s now compare these graphs in some other ways.

First, we want to see what happens to the graph of a function when you change the input by adding a constant to it. Compare `y=sin theta`  and `y=sin(theta+pi/2)`. Here is a table with some values for these two functions.

`theta` (in radians)

`sin theta`

`theta+pi/2` (in radians)

`sin(theta+pi/2)` 

`0`

`0`

`pi/2`

`1`

`pi/6`

`1/2`

`(2pi)/3`

`sqrt3/2`

`pi/4`

`sqrt2/2`

`(3pi)/4`

`sqrt2/2`

`pi/3`

`sqrt3/2`

`(5pi)/6`

`1/2`

`pi/2`

`1`

`pi`

`0`

`(2pi)/3`

`sqrt3/2`

`(7pi)/6`

`-1/2`

`(3pi)/4`

`sqrt2/2`

`(5pi)/4`

`-sqrt2/2`

`(5pi)/6`

`1/2`

`(4pi)/3`

`-sqrt3/2`

`pi`

`0`

`(3pi)/2`

`-1`

Now we’ll graph these two functions. As a reminder, the input is `theta` for both of these functions. To graph `y=sin theta`, you use the numbers in the first and second columns. To graph `y=sin(theta+pi/2)`, you use the numbers in the first and fourth columns. (The third column was just written as a convenient intermediate step. You do not use that for the graph.)

An image on the left shows a graph of the function Y equals sine theta on the interval from negative 2pi to 2 pi. On a coordinate plane, the x-axis goes from negative 2 pi to 2 pi, and the y-axis goes from negative 1 to 1. The curve has a hill and valley pattern that starts at (negative 2 pi, 0), increases to (negative three pi over 2, 1), decreases to (negative pi, 0), decreases to (negative pi over 2, negative 1), increases to (0, 0), increases to (pi over 2, 1), decreases to (pi, 0), decreases to (3 pi over 2, negative 1) and increases to (2 pi, 0). The portion of the curve from (0, 0) to (2 pi, 0) is highlighted red.  An image on the right shows a graph of the function Y equals sine of the quantity theta plus pi over 2 on the interval from negative 2 pi to 2 pi. On a coordinate plane, the x-axis goes from negative 2 pi to 2 pi, and the y-axis goes from negative 1 to 1. The curve has a valley and hill pattern that shifts to the left by pi over 2 units from the previous graph. It starts at (negative 2 pi, 1), decreases to (negative 3 pi over 2, 0), decreases to (negative pi, negative 1), increases to (negative pi over 2, 0), increases to (0, 1), decreases to (pi over 2, 0), decreases to (pi, negative 1), increases to (3 pi over 2, 0) and increases to (2 pi, 1). The portion of the curve from (negative pi over 2, 0) to (3 pi over 2, 0) is highlighted in red, rather than 0 to 2 pi from the previous graph.

First observe, as shown by the pieces in red, that the effect of adding `pi/2` to the input is to shift the graph to the left by `pi/2` units. You may recall seeing this effect when you graphed radical functions such as `y=sqrtx` and `y=sqrt(x+1)` (adding the `1` to the input shifted the graph of `y=sqrtx` to the left `1` unit). In general, if you add a positive constant `c` to the input of a function, that will have the effect of shifting the original graph to the left by `c` units. If you subtract a positive constant `c` from the input of a function, that will have the effect of shifting the original graph to the right by `c` units.

Next, observe that the graph on the right is already familiar to you. It is the graph of `y=cos theta`! So you can say that the graph of `y=sin(theta+pi/2)` is the same as the graph of `y=cos theta`, or you can say that the graph of `y=sin theta` shifted to the left by `pi/2` units is the graph of `y=cos theta`.

The next example looks at a shift in the other direction.

Example

Problem

Sketch the graph of `y=cos(theta-pi/2)` on the interval `[-2pi, 2pi]`How does the graph compare to the graph of `y=sin theta`?

 

The graph of `y=cos(theta-pi/2)` is the same as the graph of `y=cos theta` shifted `pi/2` units to the right.

 

An image shows a graph of the function Y equals cosine of the quantity theta minus pi over 2. On a coordinate plane, the x-axis goes from negative 2 pi to 2 pi, and the y-axis goes from negative 1 to 1. The curve has a hill and valley pattern that starts at (negative 2 pi, 0), increases to (negative 3 pi over 2, 1), decreases to (negative pi, 0), decreases to (negative pi over 2, negative 1), increases to (0, 0), increases to (pi over 2, 1), decreases to (pi, 0), decreases to (3 pi over 2, negative 1), and increases to (2 pi, 0).

Answer

The graph of `y=cos(theta-pi/2)` is the same as the graph of `y=sin theta`.

Because the patterns repeat, you could start with the graph of either sine or cosine and shift it by different amounts to the right or left to get the graph of the other function.

Which comparison of the graphs of `y=sin theta` and `y=cos theta` is true?

 

A) They are the same.

 

B) The graph of `y=sin theta` shifted `pi/2` units to the right is the graph of  `y=cos theta`.

 

C) The graph of `y=sin theta` shifted `pi` units to the right is the graph of `y=cos theta`.

 

D) The graph of `y=sin theta` shifted `pi/2` units to the left is the graph of `y=cos theta`.

 

Supplemental Interactive Activity

For practice graphing sine and cosine, try the following interactive exercise.

Summary

The graphs of sine and cosine have the same shape: a repeating “hill and valley” pattern over an interval on the horizontal axis that has a length of `2pi`. The sine and cosine functions have the same domain, the real numbers, and the same range, the interval of values `[-1, 1]`.

The graphs of the two functions, though similar, are not identical. One way to describe their relationship is to say that the graph of `y=cos theta` is identical to the graph of `y=sin theta` shifted `pi/2` units to the left. Another way to describe their relationship is to say that the graph of `y=sin theta` is identical to the graph of `y=cos theta` shifted `pi/2` units to the right.