MX Precalc Graphs of the Sine and Cosine Functions

Section 6.1Graphs of the Sine and Cosine Functions

A photo of a rainbow colored beam of light stretching across the floor.
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.

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.

Table 1
\(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\)

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 \(\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.

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.

Table 2
\(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\)
\(cos(x)\)\(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\)

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

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(x+P)=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.

Side-by-side graphs of sin(x) and cos(x). Graphs show period lengths for both functions, which is 2pi.
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.

A graph of sin(x) that shows that sin(x) is an odd function due to the odd symmetry of 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.\)

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:

  • They are periodic functions with a period of \(2\pi .\)
  • The domain of each function is \((-\infty ,\infty )\) 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 are

\[\begin{array}{l}y=Asin(Bx-C)+D \\ \text{and} \\ y=Acos(Bx-C)+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(x),\) \(B=1,\) so the period is \(2\pi ,\,\) which we knew. If \(f(x)=sin(2x),\) then \(B=2,\) so the period is \(\pi\) and the graph is compressed. If \(f(x)=sin(\frac{x}{2}),\) 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 — Increasing \(B\) compresses the period; decreasing it below 1 stretches the period.
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 forms

\[y=Asin(Bx)\]

\[y=Acos(Bx)\]

The period is \(\frac{2\pi }{|B|}.\)

Example 1

Determine the period of the function \(f(x)=sin(\frac{\pi }{6}x).\)

Compare the coefficient of \(x\) inside the sine to the general form \(\sin(Bx)\), then use period \(=\frac{2\pi}{B}.\)

Let’s begin by comparing the equation to the general form \(y=Asin(Bx).\)

In the given equation, \(B=\frac{\pi }{6},\) so the period will be

\[\begin{array}{l}\begin{array}{l} \\ P=\frac{2\pi }{|B|}\end{array} \\ =\frac{2\pi }{\frac{\pi }{6}} \\ =2\pi \cdot \frac{6}{\pi } \\ =12\end{array}\]

Try It #1

Determine the period of the function \(g(x)=cos(\frac{x}{3}).\)

\(6\pi\)

Did you get it?

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 — Increasing \(|A|\) stretches the amplitude; a negative \(A\) reflects the graph across the x-axis.
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 forms

\[y=Asin(Bx)\text{ and }y=Acos(Bx)\]

The amplitude is \(|A\text{|},\) which is the vertical height from the midline \(.\) In addition, notice in the example that

\[|A|\text{ = amplitude = }\frac{1}{2}|\text{maximum }-\text{ minimum}|\]

Example 2

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

The amplitude is the absolute value of the coefficient out front — compare it to 1 to decide stretch or compression.

Let’s begin by comparing the function to the simplified form \(y=Asin(Bx).\)

In the given function, \(A=-4,\) so the amplitude is \(|A|=|-4|=4.\) The function is stretched.

Analysis

The negative value of \(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.
Figure 10
Try It #2

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

\(\frac{1}{2}\) compressed

Did you get it?

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{array}{l}y=Asin(Bx-C)+D\text{ and }y=Acos(Bx-C)+D \\ or \\ y=Asin(B(x-\frac{C}{B}))+D\text{ and }y=Acos(B(x-\frac{C}{B}))+D\end{array}\]

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(x-\pi )\) shifts to the right by \(\pi\) units, which is more than we see in the graph of \(f(x)=sin(x-\frac{\pi }{4}),\) which shifts to the right by \(\frac{\pi }{4}\) units.

Figure 11 — A positive \(C\) shifts the graph right; a negative \(C\) shifts it left. The greater \(|C|,\) the more the graph shifts.

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 — The function \(y=\cos(x)+D\) has its midline at \(y=D.\)

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.

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.
Figure 13
Variations of Sine and Cosine Functions

Given an equation in the form \(f(x)=Asin(Bx-C)+D\) or \(f(x)=Acos(Bx-C)+D,\) \(\frac{C}{B}\) is the phase shift and \(D\) is the vertical shift.

Example 3

Determine the direction and magnitude of the phase shift for \(f(x)=sin(x+\frac{\pi }{6})-2.\)

Compare the function to the general form \(\sin(x-C)\) — a \(+C\) inside the parentheses shifts the graph the opposite direction.

Let’s begin by comparing the equation to the general form \(y=Asin(Bx-C)+D.\)

In the given equation, notice that \(B=1\) and \(C=-\frac{\pi }{6}.\) So the phase shift is

\[\begin{array}{l} \\ \frac{C}{B}=-\frac{\frac{\pi }{6}}{1} \\ =-\frac{\pi }{6}\end{array}\]

or \(\frac{\pi }{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.\) Therefore \(f(x)=sin(x+\frac{\pi }{6})-2\) can be rewritten as \(f(x)=sin(x-(-\frac{\pi }{6}))-2.\) 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 \(f(x)=3cos(x-\frac{\pi }{2}).\)

\(\frac{\pi }{2};\) right

Did you get it?
Example 4

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

Look at the constant added outside the trig function — that's the vertical shift, up or down.

Let’s begin by comparing the equation to the general form \(y=Acos(Bx-C)+D.\)

In the given equation, \(D=-3\) so the shift is 3 units downward.

Try It #4

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

2 units up

Did you get it?
How To

Given a sinusoidal function in the form \(f(x)=Asin(Bx-C)+D,\) identify the midline, amplitude, period, and phase shift.

  • Determine the amplitude as \(|A|.\)
  • Determine the period as \(P=\frac{2\pi }{|B|}.\)
  • Determine the phase shift as \(\frac{C}{B}.\)
  • Determine the midline as \(y=D.\)
Example 5

Determine the midline, amplitude, period, and phase shift of the function \(y=3sin(2x)+1.\)

Match the equation to the general form \(A\sin(Bx-C)+D\) and read off each constant in turn.

Let’s begin by comparing the equation to the general form \(y=Asin(Bx-C)+D.\)

\(A=3,\) so the amplitude is \(|A|=3.\)

Next, \(B=2,\) so the period is \(P=\frac{2\pi }{|B|}=\frac{2\pi }{2}=\pi .\)

There is no added constant inside the parentheses, so \(C=0\) and the phase shift is \(\frac{C}{B}=\frac{0}{2}=0.\)

Finally, \(D=1,\) so the midline is \(y=1.\)

Analysis

Inspecting the graph, we can determine that the period is \(\pi ,\) the midline is \(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).
Figure 14
Try It #5

Determine the midline, amplitude, period, and phase shift of the function \(y=\frac{1}{2}cos(\frac{x}{3}-\frac{\pi }{3}).\)

midline: \(y=0;\) amplitude: \(|A|=\frac{1}{2};\) period: \(P=\frac{2\pi }{|B|}=6\pi ;\) phase shift: \(\frac{C}{B}=\pi\)

Did you get it?
Example 6

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

Read the midline, amplitude, and period straight off the graph, then build the equation from those three values.

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

\[\begin{array}{l}y=Asin(Bx-C)+D \\ y=Acos(Bx-C)+D\end{array}\]

The graph could represent either a sine or a cosine function that is shifted and/or reflected. When \(x=0,\) the graph has an extreme point, \((0,0).\) Since the cosine function has an extreme point for \(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.\) This value, which is the midline, is \(D\) in the equation, so \(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.\) 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|=\frac{1}{2}=0.5.\) Also, the graph is reflected about the x-axis so that \(A=-0.5.\)

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

Putting this all together,

\[g(x)=-0.5cos(x)+0.5\]

Try It #6

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].
Figure 16

\(f(x)=sin(x)+2\)

Did you get it?
Example 7

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].
Figure 17

Identify the midline and amplitude from the graph's max/min, then use the distance between peaks to find the period.

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, \(P=\frac{2\pi }{|B|}=6.\) Using the positive value for \(B,\) we find that

\[B=\frac{2\pi }{P}=\frac{2\pi }{6}=\frac{\pi }{3}\]

So far, our equation is either \(y=3sin(\frac{\pi }{3}x-C)-2\) or \(y=3cos(\frac{\pi }{3}x-C)-2.\) 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

Choosing to use the cosine function, we observe that the peak, which would normally be at \(x=0\) , is at \(x=1\) , and given the horizontal compression factor of \(\frac{\pi }{3}\) , we get \(C=1·\frac{\pi }{3}=\frac{\pi }{3}\) .

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. So our function becomes

\[y=3cos(\frac{\pi }{3}x-\frac{\pi }{3})-2\text{ or }y=-3cos(\frac{\pi }{3}x+\frac{2\pi }{3})-2\]

Again, these functions are equivalent, so both yield the same graph.

Try It #7

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].
Figure 18

two possibilities: \(y=4sin(\frac{\pi }{5}x-\frac{\pi }{5})+4\) or \(y=-4sin(\frac{\pi }{5}x+\frac{4\pi }{5})+4\)

Did you get it?

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=Asin(Bx-C)+D\text{ and }y=Acos(Bx-C)+D,\]

we will let \(C=0\) and \(D=0\) and work with a simplified form of the equations in the following examples.

How To

Given the function \(y=Asin(Bx),\) sketch its graph.

  • Identify the amplitude, \(|A|.\)
  • Identify the period, \(P=\frac{2\pi }{|B|}.\)
  • Start at the origin, with the function increasing to the right if \(A\) is positive or decreasing if \(A\) is negative.
  • At \(x=\frac{\pi }{2|B|}\) 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 \(x=\frac{\pi }{|B|}.\)
  • There is a local minimum for \(A>0\) (maximum for \(A<0\) ) at \(x=\frac{3\pi }{2|B|}\) with \(y=-A.\)
  • The curve returns again to the x-axis at \(x=\frac{2\pi }{|B|}.\)
Example 8

Sketch a graph of \(f(x)=-2sin(\frac{\pi x}{2}).\)

Find the amplitude and period first, then plot key points a quarter-period apart before connecting them.

Let’s begin by comparing the equation to the form \(y=Asin(Bx).\)

  • Step 1. We can see from the equation that \(A=-2,\) so the amplitude is 2.

    \[|A|=2\]

  • Step 2. The equation shows that \(B=\frac{\pi }{2},\) so the period is

    \[\begin{array}{l}P=\frac{2\pi }{\frac{\pi }{2}} \\ =2\pi \cdot \frac{2}{\pi } \\ =4\end{array}\]

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

A graph of -2sin((pi/2)x). Graph has range of [-2,2], period of 4, and amplitude of 2.
Figure 19
Try It #8

Sketch a graph of \(g(x)=-0.8cos(2x).\) Determine the midline, amplitude, period, and phase shift.

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

midline: \(y=0;\) amplitude: \(|A|=0.8;\) period: \(P=\frac{2\pi }{|B|}=\pi ;\) phase shift: \(\frac{C}{B}=0\) or none

Did you get it?
How To

Given a sinusoidal function with a phase shift and a vertical shift, sketch its graph.

  • Express the function in the general form \(y=Asin(Bx-C)+D\text{ or }y=Acos(Bx-C)+D.\)
  • Identify the amplitude, \(|A|.\)
  • Identify the period, \(P=\frac{2\pi }{|B|}.\)
  • Identify the phase shift, \(\frac{C}{B}.\)
  • Draw the graph of \(f(x)=Asin(Bx)\) shifted to the right or left by \(\frac{C}{B}\) and up or down by \(D.\)
Example 9

Sketch a graph of \(f(x)=3sin(\frac{\pi }{4}x-\frac{\pi }{4}).\)

Factor out the coefficient of \(x\) inside the sine to see the phase shift clearly, then plot key points.

  • Step 1. The function is already written in general form: \(f(x)=3sin(\frac{\pi }{4}x-\frac{\pi }{4}).\) 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 \(|B|=|\frac{\pi }{4}|=\frac{\pi }{4},\) we determine the period as follows. The period is 8.

    \[P=\frac{2\pi }{|B|}=\frac{2\pi }{\frac{\pi }{4}}=2\pi \cdot \frac{4}{\pi }=8\]

    The period is 8.

  • Step 4. Since \(C=\frac{\pi }{4},\) the phase shift is The phase shift is 1 unit.

    \[\frac{C}{B}=\frac{\frac{\pi }{4}}{\frac{\pi }{4}}=1.\]

    The phase shift is 1 unit.

  • Step 5. Figure 20 shows the graph of the function.
    A graph of 3sin(*(pi/4)x-pi/4). Graph has amplitude of 3, period of 8, and a phase shift of 1 to the right.
    Figure 20 — A horizontally compressed, vertically stretched, and horizontally shifted sinusoid
Try It #9

Draw a graph of \(g(x)=-2cos(\frac{\pi }{3}x+\frac{\pi }{6}).\) Determine the midline, amplitude, period, and phase shift.

A graph of -2cos((pi/3)x+(pi/6)). Graph has amplitude of 2, period of 6, and has a phase shift of 0.5 to the left.

midline: \(y=0;\) amplitude: \(|A|=2;\) period: \(P=\frac{2\pi }{|B|}=6;\) phase shift: \(\frac{C}{B}=-\frac{1}{2}\)

Did you get it?
Example 10

Given \(y=-2cos(\frac{\pi }{2}x+\pi )+3,\) determine the amplitude, period, phase shift, and vertical shift. Then graph the function.

Match the equation to \(A\cos(Bx-C)+D\) term by term to pull out each of the four values.

Begin by comparing the equation to the general form and use the steps outlined in Example 9.

\[y=Acos(Bx-C)+D\]

  • Step 1. The function is already written in general form.
  • Step 2. Since \(A=-2,\) the amplitude is \(|A|=2.\)
  • Step 3. \(|B|=\frac{\pi }{2},\) so the period is \(P=\frac{2\pi }{|B|}=\frac{2\pi }{\frac{\pi }{2}}=2\pi \cdot \frac{2}{\pi }=4.\) The period is 4.
  • Step 4. \(C=-\pi ,\) so we calculate the phase shift as \(\frac{C}{B}=\frac{-\pi ,}{\frac{\pi }{2}}=-\pi \cdot \frac{2}{\pi }=-2.\) 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.

A graph of -2cos((pi/2)x+pi)+3. Graph shows an amplitude of 2, midline at y=3, and a period of 4.
Figure 21

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

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.

The y-coordinate on a circle of radius r at angle \(\theta\) is \(r\sin(\theta)\) — that's your function directly.

Recall that, for a point on a circle of radius r, the y-coordinate of the point is \(y=r\,sin(x),\) so in this case, we get the equation \(y(x)=3\,sin(x).\) 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.

A graph of 3sin(x). Graph has period of 2pi, amplitude of 3, and range of [-3,3].
Figure 22
Analysis

Notice that the period of the function is still \(2\pi ;\) as we travel around the circle, we return to the point \((3,0)\) for \(x=2\pi ,4\pi ,6\pi ,...\) 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 \(f(x)=7cos(x)?\) Sketch a graph of this function.

7

A graph of 7cos(x). Graph has amplitude of 7, period of 2pi, and range of [-7,7].
Did you get it?
Example 12

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.

An illustration of a circle lifted 4 feet off the ground. Circle has radius of 3 ft. There is a point P labeled on the circle's circumference.
Figure 23

Add the circle's radius (as amplitude) to its center height (as vertical shift) in the general sine form.

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.

A graph of -3cox(x)+4. Graph has midline at y=4, amplitude of 3, and period of 2pi.
Figure 24

Although we could use a transformation of either the sine or cosine function, we start by looking for characteristics that would make one function easier to use than the other. Let’s use a cosine function because it starts at the highest or lowest value, while a sine function starts at the middle value. A standard cosine starts at the highest value, and this graph starts at the lowest value, so we need to incorporate a vertical reflection.

Second, we see that the graph oscillates 3 above and below the center, while a basic cosine has an amplitude of 1, so this graph has been vertically stretched by 3, as in the last example.

Finally, to move the center of the circle up to a height of 4, the graph has been vertically shifted up by 4. Putting these transformations together, we find that

\[y=-3cos(x)+4\]

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 \(-7\) in. (at time \(x=\pi )\) 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.\)

An illustration of a spring with length y.
Figure 25

\(y=3cos(x)-4\)

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).
Did you get it?
Example 13

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.

Find the period from the rotation time, the amplitude and vertical shift from the wheel's radius and boarding height, then build the sine equation.

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 \(B=\frac{2\pi }{30}=\frac{\pi }{15}\)
  • Shape: \(-cos(t)\)

An equation for the rider’s height would be

\[y=-67.5cos(\frac{\pi }{15}t)+69.5\]

where \(t\) is in minutes and \(y\) is measured in meters.

Media

Access these online resources for additional instruction and practice with graphs of sine and cosine functions.

Key Equations

Table 3
Sinusoidal functions\(\begin{array}{l}f(x)=Asin(Bx-C)+D \\ f(x)=Acos(Bx-C)+D\end{array}\)

Key Concepts

Section Exercises

Verbal

1

Why are the sine and cosine functions called periodic functions?

The sine and cosine functions have the property that \(f(x+P)=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?

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?\)

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)=2sin\,x\)

7

\(f(x)=\frac{2}{3}cos\,x\)

A graph of (2/3)cos(x). Graph has amplitude of 2/3, period of 2pi, and range of [-2/3, 2/3].

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)=-3sin\,x\)

9

\(f(x)=4sin\,x\)

A graph of 4sin(x). Graph has amplitude of 4, period of 2pi, and range of [-4, 4].

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)=2cos\,x\)

11

\(f(x)=cos(2x)\)

A graph of cos(2x). Graph has amplitude of 1, period of pi, and range of [-1,1].

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(\frac{1}{2}x)\)

13

\(f(x)=4\,cos(\pi x)\)

A graph of 4cos(pi*x). Grpah has amplitude of 4, period of 2, and range of [-4, 4].

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(\frac{6}{5}x)\)

15

\(y=3\,sin(8(x+4))+5\)

A graph of 3sin(8(x+4))+5. Graph has amplitude of 3, range of [2, 8], and period of pi/4.

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

A graph of 5sin(5x+20)-2. Graph has an amplitude of 5, period of 2pi/5, and range of [-7,3].

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)=2sin(t-\frac{5\pi }{6})\)

19

\(f(t)=-cos(t+\frac{\pi }{3})+1\)

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.

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)=4cos(2(t+\frac{\pi }{4}))-3\)

21

\(f(t)=-sin(\frac{1}{2}t+\frac{5\pi }{3})\)

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.

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)=4sin(\frac{\pi }{2}(x-3))+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.
Figure 26

amplitude: 2; midline: \(y=-3;\) period: 4; equation: \(f(x)=2sin(\frac{\pi }{2}x)-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]
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].
Figure 28

amplitude: 2; period: 5; midline: \(y=3;\) equation: \(f(x)=-2cos(\frac{2\pi }{5}x)+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].
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.
Figure 30

amplitude: 4; period: 2; midline: \(y=0;\) equation: \(f(x)=-4cos(\pi (x-\frac{\pi }{2}))\)

28

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

A graph with sine parent function. Amplitude 2, period 2, midline y=0
Figure 31
29

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

A graph with cosine parent function. Amplitude 2, period 2, midline y=1
Figure 32

amplitude: 2; period: 2; midline \(y=1;\) equation: \(f(x)=2cos(\pi x)+1\)

30

Determine the amplitude, period, midline, and an equation involving sine for the graph shown in Figure 33.

A graph with a sine parent function. Amplitude 1, period 4 and midline y=0.
Figure 33

Algebraic

For the following exercises, let \(f(x)=sin\,x.\)

31

On \([0,2\pi ),\) solve \(f(x)=0.\)

\(0,\pi\)

32

On \([0,2\pi ),\) solve \(f(x)=\frac{1}{2}.\)

33

Evaluate \(f(\frac{\pi }{2}).\)

\(\text{sin}(\frac{\pi }{2})=1\)

34

On \([0,2\pi ),f(x)=\frac{\sqrt{2}}{2}.\) Find all values of \(x.\)

35

On \([0,2\pi ),\) the maximum value(s) of the function occur(s) at what x-value(s)?

\(\frac{\pi }{2}\)

36

On \([0,2\pi ),\) 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 ________________.

\(f(x)=\text{sin}x\) is symmetric

For the following exercises, let \(f(x)=cos\,x.\)

38

On \([0,2\pi ),\) solve the equation \(f(x)=cos\,x=0.\)

39

On \([0,2\pi ),\) solve \(f(x)=\frac{1}{2}.\)

\(\frac{\pi }{3},\frac{5\pi }{3}\)

40

On \([0,2\pi ),\) find the x-intercepts of \(f(x)=cos\,x.\)

41

On \([0,2\pi ),\) find the x-values at which the function has a maximum or minimum value.

Maximum: \(1\) at \(x=0\) ; minimum: \(-1\) at \(x=\pi\)

42

On \([0,2\pi ),\) solve the equation \(f(x)=\frac{\sqrt{3}}{2}.\)

Technology

43

Graph \(h(x)=x+sin\,x\) on \([0,2\pi ].\) Explain why the graph appears as it does.

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.

This image displays a graph of the function h(t) versus t. The horizontal axis represents t, ranging from 0 to 2π, with key markers at π/2, π, and 3π/2. The vertical axis represents h(t), ranging from 0 to 6. The curve starts at the origin (0,0) and rises continuously to approximately (2π, 6). The function exhibits an initial period of increasing slope, followed by a region where the slope decreases (around t=π, where h(t) is about 3), indicating a slowing rate of increase, and then the slope increases again, showing an accelerating rate of increase towards the end of the interval.
44

Graph \(h(x)=x+sin\,x\) on \([-100,100].\) Did the graph appear as predicted in the previous exercise?

45

Graph \(f(x)=x\,sin\,x\) on \([0,2\pi ]\) and verbalize how the graph varies from the graph of \(f(x)=sin\,x.\)

There is no amplitude because the function is not bounded.

The image presents a graph of a periodic function plotted on a coordinate system featuring an inverted y-axis. The x-axis, labeled &quot;X&quot;, spans from 0 to 2pi, with key markings at pi/2, pi, 3pi/2, and 2pi. The y-axis, labeled &quot;f(x)&quot;, shows its origin (0) at the top, and positive integer values from 1 to 5 increase as one moves downwards. The curve commences at the point (0,0), which represents a local minimum for the function's value. It then descends, indicating an increase in the function's value, reaching a local maximum of 2 around x=pi/2. Following this, the curve ascends, showing a decrease in value, returning to a local minimum of 0 at x=pi. The function then continues to descend, with its value increasing further to a global maximum of 5 around x=3pi/2, before finally ascending back to a local minimum of 0 at x=2pi, thereby completing one full period of oscillation.
46

Graph \(f(x)=x\,sin\,x\) on the window \([-10,10]\) and explain what the graph shows.

47

Graph \(f(x)=\frac{sin\,x}{x}\) on the window \([-5\pi ,5\pi ]\) and explain what the graph shows.

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

A graph showing a damped oscillatory function resembling sin(x)/x. The x-axis spans from -5π to 5π, and the y-axis from -2 to 2. The curve peaks at (0,1) and crosses the x-axis at integer multiples of π.

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?

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 \(f(x+P)=f(x)\) for a specific constant \(P\) and any value of \(x\)
phase shift
the horizontal displacement of the basic sine or cosine function; the constant \(\frac{C}{B}\)
sinusoidal function
any function that can be expressed in the form \(f(x)=Asin(Bx-C)+D\) or \(f(x)=Acos(Bx-C)+D\)