Skip to content
Graphs of the Sine and Cosine Functions

Graphs of the Sine and Cosine Functions

By the end of this section, you will be able to:

  • Graph variations of y=sin(x)y=\sin(x) and y=cos(x)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 xx- and yy-coordinates of a point on the unit circle. So what do they look like on a graph on a coordinate plane? Let’s start with the sine function. We can create a table of values and use them to sketch a graph. The table below lists some of the values for the sine function on a unit circle.

xx00π6\tfrac{\pi}{6}π4\tfrac{\pi}{4}π3\tfrac{\pi}{3}π2\tfrac{\pi}{2}2π3\tfrac{2\pi}{3}3π4\tfrac{3\pi}{4}5π6\tfrac{5\pi}{6}π\pi
sin(x)\sin(x)0012\tfrac1222\tfrac{\sqrt2}{2}32\tfrac{\sqrt3}{2}1132\tfrac{\sqrt3}{2}22\tfrac{\sqrt2}{2}12\tfrac1200

Plotting the points from the table and continuing along the xx-axis gives the shape of the sine function, shown below.

Notice how the sine values are positive between 00 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π2\pi, which correspond to the values of the sine function in quadrants III and IV on the unit circle, as shown below.

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. The table below lists some of the values for the cosine function on a unit circle.

xx00π6\tfrac{\pi}{6}π4\tfrac{\pi}{4}π3\tfrac{\pi}{3}π2\tfrac{\pi}{2}2π3\tfrac{2\pi}{3}3π4\tfrac{3\pi}{4}5π6\tfrac{5\pi}{6}π\pi
cos(x)\cos(x)1132\tfrac{\sqrt3}{2}22\tfrac{\sqrt2}{2}12\tfrac120012-\tfrac1222-\tfrac{\sqrt2}{2}32-\tfrac{\sqrt3}{2}1-1

As with the sine function, we can plot points to create a graph of the cosine function, as below.

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\pi, which means the functions are periodic with a period of 2π2\pi. A periodic function is a function for which a specific horizontal shift, PP, results in a function equal to the original function: f(x+P)=f(x)f(x+P)=f(x) for all values of xx in the domain of ff. When this occurs, we call the smallest such horizontal shift with P>0P>0 the period of the function. The figure below shows several periods of the sine and cosine functions.

Looking again at the sine and cosine functions on a domain centered at the yy-axis helps reveal symmetries. As we can see below, 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)=sinx\sin(-x)=-\sin x. Now we can clearly see this property from the graph.

The figure below shows that the cosine function is symmetric about the yy-axis. Again, we determined that the cosine function is an even function. Now we can see from the graph that cos(x)=cosx\cos(-x)=\cos x.

Characteristics of Sine and Cosine Functions. The sine and cosine functions have several distinct characteristics:

  • They are periodic functions with a period of 2π2\pi.
  • The domain of each function is (,)(-\infty,\infty) and the range is [1,1][-1,1].
  • The graph of y=sinxy=\sin x is symmetric about the origin, because it is an odd function.
  • The graph of y=cosxy=\cos x is symmetric about the yy-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

y=Asin(BxC)+Dandy=Acos(BxC)+Dy=A\sin(Bx-C)+D\qquad\text{and}\qquad y=A\cos(Bx-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.

In the general formula, BB is related to the period by P=2πBP=\tfrac{2\pi}{|B|}. If B>1|B|>1, then the period is less than 2π2\pi and the function undergoes a horizontal compression, whereas if B<1|B|<1, then the period is greater than 2π2\pi and the function undergoes a horizontal stretch. For example, f(x)=sin(x)f(x)=\sin(x), B=1B=1, so the period is 2π2\pi, which we knew. If f(x)=sin(2x)f(x)=\sin(2x), then B=2B=2, so the period is π\pi and the graph is compressed. If f(x)=sin(x2)f(x)=\sin\left(\tfrac{x}{2}\right), then B=12B=\tfrac12, so the period is 4π4\pi and the graph is stretched. The figure below shows how the period is indirectly related to B|B|.

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

y=Asin(Bx)y=Acos(Bx)y=A\sin(Bx)\qquad y=A\cos(Bx)

The period is 2πB\tfrac{2\pi}{|B|}.

Example. Determine the period of the function f(x)=sin(π6x)f(x)=\sin\left(\tfrac{\pi}{6}x\right).

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

In the given equation, B=π6B=\tfrac{\pi}{6}, so the period will be

P=2πB=2ππ6=2π6π=12 \begin{array}{lrcl} & P &=& \tfrac{2\pi}{|B|} \\[4pt] & &=& \tfrac{2\pi}{\tfrac{\pi}{6}} \\[4pt] & &=& 2\pi\cdot\tfrac{6}{\pi} \\[4pt] & &=& 12 \end{array}

Determine the period of the functiong(x)=cos(x3)g(x)=\cos\left(\tfrac{x}{3}\right).

Determining Amplitude

Returning to the general formula for a sinusoidal function, we have analyzed how the variable BB relates to the period. Now let’s turn to the variable AA so we can analyze how it is related to the amplitude, or greatest distance from rest. AA 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=Dy=D; because D=0D=0 in this case, the midline is the xx-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)=4sinxf(x)=4\sin x is twice the amplitude of f(x)=2sinxf(x)=2\sin x. If A<1|A|<1, the function is compressed. The figure below compares several sine functions with different amplitudes.

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

y=Asin(Bx)y=Acos(Bx)y=A\sin(Bx)\qquad y=A\cos(Bx)

The amplitude is A|A|, which is the vertical height from the midline. In addition, A=amplitude=12maximumminimum|A|=\text{amplitude}=\tfrac12\lvert\text{maximum}-\text{minimum}\rvert.

Example. What is the amplitude of the sinusoidal function f(x)=4sin(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=Asin(Bx)y=A\sin(Bx).

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

Analysis. The negative value of AA results in a reflection across the xx-axis of the sine function, as shown below.

What is the amplitude of the sinusoidal functionf(x)=12sin(x)f(x)=\tfrac12\sin(x), entered as a decimal? Is the function stretched or compressed vertically?

Is the sinusoidal functionf(x)=12sin(x)f(x)=\tfrac12\sin(x)stretched or compressed vertically, compared toy=sin(x)y=\sin(x)?

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

Now that we understand how AA and BB relate to the general form equation for the sine and cosine functions, we will explore the variables CC and DD. Recall the general form:

y=Asin(BxC)+Dandy=Acos(BxC)+Dory=Asin(B(xCB))+Dandy=Acos(B(xCB))+D \begin{array}{l} y=A\sin(Bx-C)+D\quad\text{and}\quad y=A\cos(Bx-C)+D \\[4pt] \text{or} \\[4pt] y=A\sin\left(B\left(x-\tfrac{C}{B}\right)\right)+D\quad\text{and}\quad y=A\cos\left(B\left(x-\tfrac{C}{B}\right)\right)+D \end{array}

The value CB\tfrac{C}{B} for a sinusoidal function is called the phase shift, or the horizontal displacement of the basic sine or cosine function. If C>0C>0, the graph shifts to the right. If C<0C<0, the graph shifts to the left. The greater the value of C|C|, the more the graph is shifted. The figure below shows that the graph of f(x)=sin(xπ)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π4)f(x)=\sin\left(x-\tfrac{\pi}{4}\right), which shifts to the right by π4\tfrac{\pi}{4} units.

While CC relates to the horizontal shift, DD indicates the vertical shift from the midline in the general formula for a sinusoidal function, as in the figure below. The function y=cos(x)+Dy=\cos(x)+D has its midline at y=Dy=D.

Any value of DD other than zero shifts the graph up or down. The figure below compares f(x)=sin(x)f(x)=\sin(x) with f(x)=sin(x)+2f(x)=\sin(x)+2, which is shifted 22 units up on a graph.

Variations of Sine and Cosine Functions. Given an equation in the form f(x)=Asin(BxC)+Df(x)=A\sin(Bx-C)+D or f(x)=Acos(BxC)+Df(x)=A\cos(Bx-C)+D, CB\tfrac{C}{B} is the phase shift and DD is the vertical shift.

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

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

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

CB=π61=π6 \begin{array}{lrcl} & \tfrac{C}{B} &=& \tfrac{-\tfrac{\pi}{6}}{1} \\[4pt] & &=& -\tfrac{\pi}{6} \end{array}

or π6\tfrac{\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 CC. Therefore f(x)=sin(x+π6)2f(x)=\sin\left(x+\tfrac{\pi}{6}\right)-2 can be rewritten as f(x)=sin(x(π6))2f(x)=\sin\left(x-\left(-\tfrac{\pi}{6}\right)\right)-2. If the value of CC is negative, the shift is to the left.

Determine the phase shift forf(x)=3cos(xπ2)f(x)=3\cos\left(x-\tfrac{\pi}{2}\right)as a signed value (positive = right, negative = left).

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

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

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

What is the midline off(x)=3sin(x)+2f(x)=3\sin(x)+2?

How to: given a sinusoidal function in the form f(x)=Asin(BxC)+Df(x)=A\sin(Bx-C)+D, identify the midline, amplitude, period, and phase shift.

  1. Determine the amplitude as A|A|.
  2. Determine the period as P=2πBP=\tfrac{2\pi}{|B|}.
  3. Determine the phase shift as CB\tfrac{C}{B}.
  4. Determine the midline as y=Dy=D.

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

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

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

Next, B=2B=2, so the period is P=2πB=2π2=πP=\tfrac{2\pi}{|B|}=\tfrac{2\pi}{2}=\pi.

There is no added constant inside the parentheses, so C=0C=0 and the phase shift is CB=02=0\tfrac{C}{B}=\tfrac{0}{2}=0.

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

Analysis. Inspecting the graph, we can determine that the period is π\pi, the midline is y=1y=1, and the amplitude is 33, as shown below.

For the amplitude, period, and phase shift of y=12cos(x3π3)y=\tfrac12\cos\left(\tfrac{x}{3}-\tfrac{\pi}{3}\right) (its midline is y=0y=0):

What is the amplitude ofy=12cos(x3π3)y=\tfrac12\cos\left(\tfrac{x}{3}-\tfrac{\pi}{3}\right), entered as a decimal?

What is the period ofy=12cos(x3π3)y=\tfrac12\cos\left(\tfrac{x}{3}-\tfrac{\pi}{3}\right)?

Determine the phase shift fory=12cos(x3π3)y=\tfrac12\cos\left(\tfrac{x}{3}-\tfrac{\pi}{3}\right)as a signed value (positive = right, negative = left).

Example. Determine the formula for the cosine function in the figure below.

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

y=Asin(BxC)+Dy=Acos(BxC)+Dy=A\sin(Bx-C)+D\qquad y=A\cos(Bx-C)+D

The graph could represent either a sine or a cosine function that is shifted and/or reflected. When x=0x=0, the graph has an extreme point, (0,0)(0,0). Since the cosine function has an extreme point for x=0x=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.5y=0.5. This value, which is the midline, is DD in the equation, so D=0.5D=0.5.

The greatest distance above and below the midline is the amplitude. The maxima are 0.50.5 units above the midline and the minima are 0.50.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 11, so A=12=0.5|A|=\tfrac12=0.5. Also, the graph is reflected about the xx-axis so that A=0.5A=-0.5.

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

Putting this all together,

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

Determine the formula for the sine function shown above.

Example. Determine the equation for the sinusoidal function in the figure below.

Solution. With the highest value at 11 and the lowest value at 5-5, the midline will be halfway between at 2-2. So D=2D=-2.

The distance from the midline to the highest or lowest value gives an amplitude of A=3|A|=3.

The period of the graph is 66, which can be measured from the peak at x=1x=1 to the next peak at x=7x=7, or from the distance between the lowest points. Therefore, P=2πB=6P=\tfrac{2\pi}{|B|}=6. Using the positive value for BB, we find that

B=2πP=2π6=π3B=\tfrac{2\pi}{P}=\tfrac{2\pi}{6}=\tfrac{\pi}{3}

So far, our equation is either y=3sin(π3xC)2y=3\sin\left(\tfrac{\pi}{3}x-C\right)-2 or y=3cos(π3xC)2y=3\cos\left(\tfrac{\pi}{3}x-C\right)-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=0x=0, is at x=1x=1, and given the horizontal compression factor of π3\tfrac{\pi}{3}, we get C=1π3=π3C=1\cdot\tfrac{\pi}{3}=\tfrac{\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(π3xπ3)2ory=3cos(π3x+2π3)2y=3\cos\left(\tfrac{\pi}{3}x-\tfrac{\pi}{3}\right)-2\qquad\text{or}\qquad y=-3\cos\left(\tfrac{\pi}{3}x+\tfrac{2\pi}{3}\right)-2

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

Write a formula for the function graphed above.

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(BxC)+Dandy=Acos(BxC)+D,y=A\sin(Bx-C)+D\qquad\text{and}\qquad y=A\cos(Bx-C)+D,

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

How to: given the function y=Asin(Bx)y=A\sin(Bx), sketch its graph.

  1. Identify the amplitude, A|A|.
  2. Identify the period, P=2πBP=\tfrac{2\pi}{|B|}.
  3. Start at the origin, with the function increasing to the right if AA is positive or decreasing if AA is negative.
  4. At x=π2Bx=\tfrac{\pi}{2|B|} there is a local maximum for A>0A>0 or a minimum for A<0A<0, with y=Ay=A.
  5. The curve returns to the xx-axis at x=πBx=\tfrac{\pi}{|B|}.
  6. There is a local minimum for A>0A>0 (maximum for A<0A<0) at x=3π2Bx=\tfrac{3\pi}{2|B|} with y=Ay=-A.
  7. The curve returns again to the xx-axis at x=2πBx=\tfrac{2\pi}{|B|}.

Example. Sketch a graph of f(x)=2sin(πx2)f(x)=-2\sin\left(\tfrac{\pi x}{2}\right).

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

Step 1. We can see from the equation that A=2A=-2, so the amplitude is 22.

A=2|A|=2

Step 2. The equation shows that B=π2B=\tfrac{\pi}{2}, so the period is

P=2ππ2=2π2π=4 \begin{array}{lrcl} & P &=& \tfrac{2\pi}{\tfrac{\pi}{2}} \\[4pt] & &=& 2\pi\cdot\tfrac{2}{\pi} \\[4pt] & &=& 4 \end{array}

Step 3. Because AA is negative, the graph descends as we move to the right of the origin.

Steps 4–7. The xx-intercepts are at the beginning of one period, x=0x=0, the horizontal midpoints are at x=2x=2 and at the end of one period at x=4x=4.

The quarter points include the minimum at x=1x=1 and the maximum at x=3x=3. A local minimum will occur 22 units below the midline, at x=1x=1, and a local maximum will occur at 22 units above the midline, at x=3x=3. The figure below shows the graph of the function.

For the graph of g(x)=0.8cos(2x)g(x)=-0.8\cos(2x), whose midline is y=0y=0 and phase shift is 00:

What is the amplitude ofg(x)=0.8cos(2x)g(x)=-0.8\cos(2x), entered as a decimal?

What is the period ofg(x)=0.8cos(2x)g(x)=-0.8\cos(2x)?

How to: given a sinusoidal function with a phase shift and a vertical shift, sketch its graph.

  1. Express the function in the general form y=Asin(BxC)+Dy=A\sin(Bx-C)+D or y=Acos(BxC)+Dy=A\cos(Bx-C)+D.
  2. Identify the amplitude, A|A|.
  3. Identify the period, P=2πBP=\tfrac{2\pi}{|B|}.
  4. Identify the phase shift, CB\tfrac{C}{B}.
  5. Draw the graph of f(x)=Asin(Bx)f(x)=A\sin(Bx) shifted to the right or left by CB\tfrac{C}{B} and up or down by DD.

Example. Sketch a graph of f(x)=3sin(π4xπ4)f(x)=3\sin\left(\tfrac{\pi}{4}x-\tfrac{\pi}{4}\right).

Solution. Step 1. The function is already written in general form: f(x)=3sin(π4xπ4)f(x)=3\sin\left(\tfrac{\pi}{4}x-\tfrac{\pi}{4}\right). This graph will have the shape of a sine function, starting at the midline and increasing to the right.

Step 2. A=3=3|A|=|3|=3. The amplitude is 33.

Step 3. Since B=π4=π4|B|=\left|\tfrac{\pi}{4}\right|=\tfrac{\pi}{4}, we determine the period as follows.

P=2πB=2ππ4=2π4π=8P=\tfrac{2\pi}{|B|}=\tfrac{2\pi}{\tfrac{\pi}{4}}=2\pi\cdot\tfrac{4}{\pi}=8

The period is 88.

Step 4. Since C=π4C=\tfrac{\pi}{4}, the phase shift is

CB=π4π4=1.\tfrac{C}{B}=\tfrac{\tfrac{\pi}{4}}{\tfrac{\pi}{4}}=1.

The phase shift is 11 unit.

Step 5. The figure below shows the graph of the function.

For g(x)=2cos(π3x+π6)g(x)=-2\cos\left(\tfrac{\pi}{3}x+\tfrac{\pi}{6}\right), whose midline is y=0y=0:

What is the amplitude ofg(x)=2cos(π3x+π6)g(x)=-2\cos\left(\tfrac{\pi}{3}x+\tfrac{\pi}{6}\right)?

What is the period ofg(x)=2cos(π3x+π6)g(x)=-2\cos\left(\tfrac{\pi}{3}x+\tfrac{\pi}{6}\right)?

Determine the phase shift forg(x)=2cos(π3x+π6)g(x)=-2\cos\left(\tfrac{\pi}{3}x+\tfrac{\pi}{6}\right)as a signed value (positive = right, negative = left).

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

Solution. Begin by comparing the equation to the general form and use the steps outlined above.

y=Acos(BxC)+Dy=A\cos(Bx-C)+D

Step 1. The function is already written in general form.

Step 2. Since A=2A=-2, the amplitude is A=2|A|=2.

Step 3. B=π2|B|=\tfrac{\pi}{2}, so the period is P=2πB=2ππ2=2π2π=4P=\tfrac{2\pi}{|B|}=\tfrac{2\pi}{\tfrac{\pi}{2}}=2\pi\cdot\tfrac{2}{\pi}=4. The period is 44.

Step 4. C=πC=-\pi, so we calculate the phase shift as CB=ππ2=π2π=2\tfrac{C}{B}=\tfrac{-\pi}{\tfrac{\pi}{2}}=-\pi\cdot\tfrac{2}{\pi}=-2. The phase shift is 2-2.

Step 5. D=3D=3, so the midline is y=3y=3, and the vertical shift is up 33.

Since AA is negative, the graph of the cosine function has been reflected about the xx-axis.

The figure below shows one cycle of the graph of the function.

Using Transformations of Sine and Cosine Functions

We can use the transformations of sine and cosine functions in numerous applications. As mentioned at the beginning of the chapter, circular motion can be modeled using either the sine or cosine function.

Example. A point rotates around a circle of radius 33 centered at the origin. Sketch a graph of the yy-coordinate of the point as a function of the angle of rotation.

Solution. Recall that, for a point on a circle of radius rr, the yy-coordinate of the point is y=rsin(x)y=r\sin(x), so in this case, we get the equation y(x)=3sin(x)y(x)=3\sin(x). The constant 33 causes a vertical stretch of the yy-values of the function by a factor of 33, which we can see in the graph below.

Analysis. Notice that the period of the function is still 2π2\pi; as we travel around the circle, we return to the point (3,0)(3,0) for x=2π,4π,6π,x=2\pi,4\pi,6\pi,\dots Because the outputs of the graph will now oscillate between 3-3 and 33, the amplitude of the sine wave is 33.

What is the range off(x)=7cos(x)f(x)=7\cos(x)? Write your answer in interval notation.

Example. A circle with radius 33 ft is mounted with its center 44 ft off the ground. The point closest to the ground is labeled PP, as shown below. Sketch a graph of the height above the ground of the point PP as the circle is rotated; then find a function that gives the height in terms of the angle of rotation.

Solution. Sketching the height, we note that it will start 11 ft above the ground, then increase up to 77 ft above the ground, and continue to oscillate 33 ft above and below the center value of 44 ft, as shown below.

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 33 above and below the center, while a basic cosine has an amplitude of 11, so this graph has been vertically stretched by 33, as in the last example.

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

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

A weight is attached to a spring that is then hung from a board, as shown below. As the spring oscillates up and down, the positionyyof the weight relative to the board ranges from1-1in. (at timex=0x=0) to7-7in. (at timex=πx=\pi) below the board. Assumingyyis given as a sinusoidal function ofxx, find a cosine function that gives the positionyyin terms ofxx.

Example. The London Eye is a huge Ferris wheel with a diameter of 135135 meters (443443 feet). It completes one rotation every 3030 minutes. Riders board from a platform 22 meters above the ground. Express a rider’s height above ground as a function of time in minutes.

Solution. With a diameter of 135135 m, the wheel has a radius of 67.567.5 m. The height will oscillate with amplitude 67.567.5 m above and below the center.

Passengers board 22 m above ground level, so the center of the wheel must be located 67.5+2=69.567.5+2=69.5 m above ground level. The midline of the oscillation will be at 69.569.5 m.

The wheel takes 3030 minutes to complete 11 revolution, so the height will oscillate with a period of 3030 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.567.5, so A=67.5A=67.5
  • Midline: 69.569.5, so D=69.5D=69.5
  • Period: 3030, so B=2π30=π15B=\tfrac{2\pi}{30}=\tfrac{\pi}{15}
  • Shape: cos(t)-\cos(t)

An equation for the rider’s height would be

y=67.5cos(π15t)+69.5y=-67.5\cos\left(\tfrac{\pi}{15}t\right)+69.5

where tt is in minutes and yy is measured in meters.

Key equations

Sinusoidal functionsf(x)=Asin(BxC)+Df(x)=A\sin(Bx-C)+D
f(x)=Acos(BxC)+Df(x)=A\cos(Bx-C)+D

Key concepts

  • Periodic functions repeat after a given value. The smallest such value is the period. The basic sine and cosine functions have a period of 2π2\pi.
  • The function sinx\sin x is odd, so its graph is symmetric about the origin. The function cosx\cos x is even, so its graph is symmetric about the yy-axis.
  • The graph of a sinusoidal function has the same general shape as a sine or cosine function.
  • In the general formula for a sinusoidal function, the period is P=2πBP=\tfrac{2\pi}{|B|}.
  • In the general formula for a sinusoidal function, A|A| represents amplitude. If A>1|A|>1, the function is stretched, whereas if A<1|A|<1, the function is compressed.
  • The value CB\tfrac{C}{B} in the general formula for a sinusoidal function indicates the phase shift.
  • The value DD in the general formula for a sinusoidal function indicates the vertical shift from the midline.
  • Combinations of variations of sinusoidal functions can be detected from an equation.
  • The equation for a sinusoidal function can be determined from a graph.
  • A function can be graphed by identifying its amplitude and period.
  • A function can also be graphed by identifying its amplitude, period, phase shift, and horizontal shift.
  • Sinusoidal functions can be used to solve real-world problems.

Practice

Graph variations of y=sin(x)y=\sin(x) and y=cos(x)y=\cos(x)

A sinusoidal curve is shown above. What is its amplitude?

What is the period of the same curve?

What is the midline of the same curve?

Write an equation involving the sine function for the same curve.

What is the range off(x)=23cosxf(x)=\tfrac23\cos x? Write your answer in interval notation.

What is the period off(x)=23cosxf(x)=\tfrac23\cos x?

Which graph shows two periods off(x)=cos(2x)f(x)=\cos(2x)?

Use phase shifts of sine and cosine curves

Determine the phase shift fory=3sin(8(x+4))+5y=3\sin(8(x+4))+5as a signed value (positive = right, negative = left).

What is the midline ofy=3sin(8(x+4))+5y=3\sin(8(x+4))+5?

Determine the phase shift forf(t)=cos(t+π3)+1f(t)=-\cos\left(t+\tfrac{\pi}{3}\right)+1as a signed value (positive = right, negative = left).

What is the midline off(t)=cos(t+π3)+1f(t)=-\cos\left(t+\tfrac{\pi}{3}\right)+1?


This section is adapted from Precalculus 2e, Section 6.1: Graphs of the Sine and Cosine Functions by Jay Abramson and OpenStax, © OpenStax, licensed under CC BY-NC-SA 4.0. Access the original for free at openstax.org. Changes: omitted the opening rainbow-prism credit photograph (Figure 1), which carries no mathematics. Recreated every instructional graph as an accessible spec-first SVG built from its exact equation, using the new sine/cosine curve kinds: the plotted sin(x)\sin(x) and cos(x)\cos(x) parent curves with their table points; the compound unit-circle/sine-curve correspondence figure, redrawn as radius segments and dashed guide lines within one shared coordinate system rather than the source’s two-panel raster image; the period comparison of sin(x)\sin(x) and cos(x)\cos(x) with a bracketed “1 period” span; the odd- and even-symmetry sine and cosine graphs; the sin(2x)/sin(x/2)/sin(x)\sin(2x)/\sin(x/2)/\sin(x) period-compression comparison; the four-curve amplitude comparison sinx,2sinx,3sinx,4sinx\sin x,2\sin x,3\sin x,4\sin x; the reflected 4sin(x)-4\sin(x); the three-curve phase-shift comparison; the generic y=Asin(x)+Dy=A\sin(x)+D midline diagram; the vertical-shift comparison sin(x)\sin(x) vs. sin(x)+2\sin(x)+2; the annotated 3sin(2x)+13\sin(2x)+1 (amplitude/midline/period marked); the two “determine the equation from the graph” figures (the reflected-cosine and the shifted-cosine); the annotated grid-plotted 2sin(πx/2)-2\sin(\pi x/2); the annotated 3sin(πx/4π/4)3\sin(\pi x/4-\pi/4); the annotated 2cos(πx/2+π)+3-2\cos(\pi x/2+\pi)+3 (amplitude/midline/period marked); the 3sin(x)3\sin(x) circular-motion curve; and the 3cos(x)+4-3\cos(x)+4 Ferris-wheel-style height curve. The circle-mounted-on-a-stand illustration (radius 33 ft, center 44 ft up, point PP) and the weight-on-a-spring illustration were recreated as simplified kind="figure" schematics (a labeled circle over a ground line; a labeled board, measurement segment, and weight) rather than literal photographic-style renderings, since the engine has no spring-coil primitive and none of the illustration’s geometry is graded. The Practice block’s “determine the amplitude, period, midline, and an equation” graph-reading exercise, and both “determine the formula” in-page figures, kept their own bare, unlabeled curves (no amplitude/midline arrows and no printed equation, since those are exactly what each item asks the learner to find); every such figure’s accessible description states only the same raw coordinates and axis marks a sighted reader would read off the image, never the derived amplitude/period/midline/equation vocabulary that would answer the accompanying question. Converted every “Try It” into interactive components with instant feedback. Two amplitude Try Its whose printed coefficient (12\tfrac12, 77) is literally the requested value were restated to avoid a pure retype: the first asks for the amplitude as a decimal (0.50.5, distinct from the printed 12\tfrac12 span) alongside a separate stretched-or-compressed multiple choice, and the second asks for the range [7,7][-7,7] instead of the amplitude directly. Every phase-shift answer is requested “as a signed value (positive = right, negative = left),” combining the source’s separate direction-and-magnitude answer into one graded quantity, and every midline answer is requested as the equation y=Dy=D. Two Try Its that ask for all four of the midline, amplitude, period, and phase shift (Try It 5, Try It 9) keep only the three non-trivial values interactive, since each has a midline of y=0y=0; Try It 8 keeps only its amplitude and period interactive, since its midline and phase shift are both 00 — each dropped value is stated in the surrounding prose instead, to keep the in-page practice set at the 2–3 question cap. “Sketch a graph” instructions are not graded as drawn curves in this chapter (their key points fall on multiples of π\pi, off the graphplot snap lattice); each retained sketch Try It instead asks for the derived numeric or symbolic features shown in its worked How-To, per the corpus’s established response-mode adaptation for trigonometric graphing. Added one graph-mode recognition multiple choice (which graph shows two periods of f(x)=cos(2x)f(x)=\cos(2x)?), the section’s one graphing-recognition item per corpus convention, with distractors varying the period, the sine/cosine phase, and the reflection. Adapted seven selected end-of-section exercises — one two-full-periods period/range item (the printed amplitude 23\tfrac23 is asked for as a range instead, the same retype-avoidance adaptation used on Try It 10), one graph-reading amplitude/period/midline/equation item, one graph-recognition source item, and two phase-shift/vertical-translation items — into eleven interactive components across a closing Practice block, one group per objective.