Graphs of the Sine and Cosine Functions
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 ...
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.
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. [link] lists some of the values for the sine function on a unit circle.
x | 0 | π 6 | π 4 | π 3 | π 2 | 2π 3 | 3π 4 | 5π 6 | π |
sin( x ) | 0 | 1 2 | 2 2 | 3 2 | 1 | 3 2 | 2 2 | 1 2 | 0 |
Plotting the points from the table and continuing along the x-axis gives the shape of the sine function. See [link].
The sine functionNotice how the sine values are positive between 0 and π, which correspond to the values of the sine function in quadrants I and II on the unit circle, and the sine values are negative between π and 2π, which correspond to the values of the sine function in quadrants III and IV on the unit circle. See [link].
Plotting values of the sine functionNow 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. [link] lists some of the values for the cosine function on a unit circle.
x | 0 | π 6 | π 4 | π 3 | π 2 | 2π 3 | 3π 4 | 5π 6 | π |
cos( x ) | 1 | 3 2 | 2 2 | 1 2 | 0 | − 1 2 | − 2 2 | − 3 2 | −1 |
As with the sine function, we can plots points to create a graph of the cosine function as in [link].
The cosine functionBecause 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π, which means the functions are periodic with a period of 2π. A periodic function is a function for which a specific horizontal shift, P, results in a function equal to the original function: f( x+P )=f( x ) 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. [link] shows several periods of the sine and cosine functions.
Looking again at the sine and cosine functions on a domain centered at the y-axis helps reveal symmetries. As we can see in [link], 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.
Odd symmetry of the sine function[link] 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.
Even symmetry of the cosine functionThe sine and cosine functions have several distinct characteristics:
- They are periodic functions with a period of 2π.
- The domain of each function is ( −∞,∞ ) 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.
As we can see, sine and cosine functions have a regular period and range. If we watch ocean waves or ripples on a pond, we will see that they resemble the sine or cosine functions. However, they are not necessarily identical. Some are taller or longer than others. A function that has the same general shape as a sine or cosine function is known as a sinusoidal function. The general forms of sinusoidal functions are
Determining the Period of Sinusoidal Functions
Looking at the forms of sinusoidal functions, we can see that they are transformations of the sine and cosine functions. We can use what we know about transformations to determine the period.
In the general formula, B is related to the period by P= 2π | B | . If | B |>1, then the period is less than 2π and the function undergoes a horizontal compression, whereas if | B |<1, then the period is greater than 2π and the function undergoes a horizontal stretch. For example, f(x)=sin( x ), B=1, so the period is 2π, which we knew. If f(x)=sin( 2x ), then B=2, so the period is π and the graph is compressed. If f(x)=sin( x 2 ), then B= 1 2 , so the period is 4π and the graph is stretched. Notice in [link] how the period is indirectly related to | B |.
If we let C=0 and D=0 in the general form equations of the sine and cosine functions, we obtain the forms
The period is 2π | B | .
Determine the period of the function f( x )=sin( π 6 x ).
Let’s begin by comparing the equation to the general form y=Asin(Bx).
In the given equation, B= π 6 , so the period will be
Determine the period of the function g(x)=cos( x 3 ).
6π
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 vertical midline of the graph, which is the line x=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. [link] compares several sine functions with different amplitudes.
If we let C=0 and D=0 in the general form equations of the sine and cosine functions, we obtain the forms
The amplitude is A, and the vertical height from the midline is | A |. In addition, notice in the example that
What is the amplitude of the sinusoidal function f(x)=−4sin(x)? Is the function stretched or compressed vertically?
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.
What is the amplitude of the sinusoidal function f(x)= 1 2 sin(x)? Is the function stretched or compressed vertically?
1 2 compressed
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:
The value 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. [link] shows that the graph of f(x)=sin( x−π ) shifts to the right by π units, which is more than we see in the graph of f(x)=sin( x− π 4 ), which shifts to the right by π 4 units.
While C relates to the horizontal shift, D indicates the vertical shift from the midline in the general formula for a sinusoidal function. See [link]. 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. [link] compares f(x)=sin x with f(x)=sin x+2, which is shifted 2 units up on a graph.
Given an equation in the form f( x )=Asin( Bx−C )+D or f( x )=Acos( Bx−C )+D, C B is the phase shift and D is the vertical shift.
Determine the direction and magnitude of the phase shift for f(x)=sin( x+ π 6 )−2.
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=− π 6 . So the phase shift is
or π 6 units to the left.
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+ π 6 )−2 can be rewritten as f(x)=sin( x−( − π 6 ) )−2. If the value of C is negative, the shift is to the left.
Determine the direction and magnitude of the phase shift for f(x)=3cos( x− π 2 ).
π 2 ; right
Determine the direction and magnitude of the vertical shift for f(x)=cos( x )−3.
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.
Determine the direction and magnitude of the vertical shift for f(x)=3sin( x )+2.
2 units up
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= 2π | B | .
- Determine the phase shift as C B .
- Determine the midline as y=D.
Determine the midline, amplitude, period, and phase shift of the function y=3sin(2x)+1.
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= 2π | B | = 2π 2 =π.
There is no added constant inside the parentheses, so C=0 and the phase shift is C B = 0 2 =0.
Finally, D=1, so the midline is y=1.
Inspecting the graph, we can determine that the period is π, the midline is y=1, and the amplitude is 3. See [link].
Determine the midline, amplitude, period, and phase shift of the function y= 1 2 cos( x 3 − π 3 ).
midline: y=0; amplitude: | A |= 1 2 ; period: P= 2π | B | =6π; phase shift: C B =π
Determine the formula for the cosine function in [link].
To determine the equation, we need to identify each value in the general form of a sinusoidal function.
The graph could represent either a sine or a cosine function that is shifted and/or reflected. When 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 |= 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,
Determine the formula for the sine function in [link].
f( x )=sin(x)+2
Determine the equation for the sinusoidal function in [link].
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= 2π | B | =6. Using the positive value for B, we find that
So far, our equation is either y=3sin( π 3 x−C )−2 or y=3cos( π 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
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
Again, these functions are equivalent, so both yield the same graph.
Write a formula for the function graphed in [link].
two possibilities: y=4sin( π 5 x− π 5 )+4 or y=−4sin( π 5 x+ 4π 5 )+4
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
we will let C=0 and D=0 and work with a simplified form of the equations in the following examples.
Given the function y=Asin( Bx ), sketch its graph.
- Identify the amplitude, | A |.
- Identify the period, P= 2π | B | .
- Start at the origin, with the function increasing to the right if A is positive or decreasing if A is negative.
- At x= π 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= π | B | .
- There is a local minimum for A>0 (maximum for A<0 ) at x= 3π 2| B | with y=–A.
- The curve returns again to the x-axis at x= π 2| B | .
Sketch a graph of f( x )=−2sin( πx 2 ).
Let’s begin by comparing the equation to the form y=Asin(Bx).
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. [link] shows the graph of the function.
Sketch a graph of g( x )=−0.8cos( 2x ). Determine the midline, amplitude, period, and phase shift.
midline: y=0; amplitude: | A |=0.8; period: P= 2π | B | =π; phase shift: C B =0 or none
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 or y=Acos(Bx−C)+D.
- Identify the amplitude, | A |.
- Identify the period, P= 2π | B | .
- Identify the phase shift, C B .
- Draw the graph of f( x )=Asin( Bx ) shifted to the right or left by C B and up or down by D.
Sketch a graph of f( x )=3sin( π 4 x− π 4 ).
The period is 8.
The phase shift is 1 unit.
Draw a graph of g(x)=−2cos( π 3 x+ π 6 ). Determine the midline, amplitude, period, and phase shift.
midline: y=0; amplitude: | A |=2; period: P= 2π | B | =6; phase shift: C B =− 1 2
Given y=−2cos( π 2 x+π )+3, determine the amplitude, period, phase shift, and horizontal shift. Then graph the function.
Begin by comparing the equation to the general form and use the steps outlined in [link].
Since A is negative, the graph of the cosine function has been reflected about the x-axis.
[link] shows one cycle of the graph of the function.
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.
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.
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 [link].
Notice that the period of the function is still 2π; as we travel around the circle, we return to the point ( 3,0 ) for x=2π,4π,6π,.... Because the outputs of the graph will now oscillate between –3 and 3, the amplitude of the sine wave is 3.
What is the amplitude of the function f(x)=7cos(x)? Sketch a graph of this function.
7
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 [link]. 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.
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 [link].
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
A weight is attached to a spring that is then hung from a board, as shown in [link]. 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=π) 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.
y=3cos( x )−4
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.
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= 2π 30 = π 15
- Shape: −cos( t )
An equation for the rider’s height would be
where t is in minutes and y is measured in meters.
Access these online resources for additional instruction and practice with graphs of sine and cosine functions.
- Amplitude and Period of Sine and Cosine
- Translations of Sine and Cosine
- Graphing Sine and Cosine Transformations
- Graphing the Sine Function
Sinusoidal functions | f( x )=Asin( Bx−C )+D f( x )=Acos( Bx−C )+D |
- 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π.
- The function sin x is odd, so its graph is symmetric about the origin. The function cos x is even, so its graph is symmetric about the y-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π | B | . See [link].
- In the general formula for a sinusoidal function, | A | represents amplitude. If | A |>1, the function is stretched, whereas if | A |<1, the function is compressed. See [link].
- The value C B in the general formula for a sinusoidal function indicates the phase shift. See [link].
- The value D in the general formula for a sinusoidal function indicates the vertical shift from the midline. See [link].
- Combinations of variations of sinusoidal functions can be detected from an equation. See [link].
- The equation for a sinusoidal function can be determined from a graph. See [link] and [link].
- A function can be graphed by identifying its amplitude and period. See [link] and [link].
- A function can also be graphed by identifying its amplitude, period, phase shift, and horizontal shift. See [link].
- Sinusoidal functions can be used to solve real-world problems. See [link], [link], and [link].
Verbal
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.
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.
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.
How does the range of a translated sine function relate to the equation y=A sin(Bx+C)+D?
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.
f(x)=2sin x
f(x)= 2 3 cos x
amplitude: 2 3 ; period: 2π; midline: y=0; maximum: y= 2 3 occurs at x=0; minimum: y=− 2 3 occurs at x=π; for one period, the graph starts at 0 and ends at 2π
f(x)=−3sin x
f(x)=4sin x
amplitude: 4; period: 2π; midline: y=0; maximum y=4 occurs at x= π 2 ; minimum: y=−4 occurs at x= 3π 2 ; one full period occurs from x=0 to x=2π
f(x)=2cos x
f( x )=cos( 2x )
amplitude: 1; period: π; midline: y=0; maximum: y=1 occurs at x=π; minimum: y=−1 occurs at x= π 2 ; one full period is graphed from x=0 to x=π
f(x)=2 sin( 1 2 x )
f(x)=4 cos(πx)
amplitude: 4; period: 2; midline: y=0; maximum: y=4 occurs at x=0; minimum: y=−4 occurs at x=1
f(x)=3 cos( 6 5 x )
y=3 sin(8(x+4))+5
amplitude: 3; period: π 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= π 4
y=2 sin(3x−21)+4
y=5 sin(5x+20)−2
amplitude: 5; period: 2π 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= 2π 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.
f( t )=2sin( t− 5π 6 )
f(t)=−cos( t+ π 3 )+1
amplitude: 1 ; period: 2π; midline: y=1; maximum: y=2 occurs at x=2.09; maximum: y=2 occurs at t=2.09; minimum: y=0 occurs at t=5.24; phase shift: − π 3 ; vertical translation: 1; one full period is from t=0 to t=2π
f( t )=4cos( 2( t+ π 4 ) )−3
f( t )=−sin( 1 2 t+ 5π 3 )
amplitude: 1; period: 4π; midline: y=0; maximum: y=1 occurs at t=11.52; minimum: y=−1 occurs at t=5.24; phase shift: − 10π 3 ; vertical shift: 0
f( x )=4sin( π 2 ( x−3 ) )+7
Determine the amplitude, midline, period, and an equation involving the sine function for the graph shown in [link].
amplitude: 2; midline: y=−3; period: 4; equation: f(x)=2sin( π 2 x )−3
Determine the amplitude, period, midline, and an equation involving cosine for the graph shown in [link].
Determine the amplitude, period, midline, and an equation involving cosine for the graph shown in [link].
amplitude: 2; period: 5; midline: y=3; equation: f(x)=−2cos( 2π 5 x )+3
Determine the amplitude, period, midline, and an equation involving sine for the graph shown in [link].
Determine the amplitude, period, midline, and an equation involving cosine for the graph shown in [link].
amplitude: 4; period: 2; midline: y=0; equation: f(x)=−4cos( π( x− π 2 ) )
Determine the amplitude, period, midline, and an equation involving sine for the graph shown in [link].
Determine the amplitude, period, midline, and an equation involving cosine for the graph shown in [link].
amplitude: 2; period: 2; midline y=1; equation: f( x )=2cos( πx )+1
Determine the amplitude, period, midline, and an equation involving sine for the graph shown in [link].
Algebraic
For the following exercises, let f(x)=sin x.
On [ 0,2π ), solve f( x )=0.
On [ 0,2π ), solve f( x )= 1 2 .
π 6 , 5π 6
Evaluate f( π 2 ).
On [0,2π),f(x)= 2 2 . Find all values of x.
π 4 , 3π 4
On [ 0,2π ), the maximum value(s) of the function occur(s) at what x-value(s)?
On [ 0,2π ), the minimum value(s) of the function occur(s) at what x-value(s)?
3π 2
Show that f(−x)=−f(x). This means that f(x)=sin x is an odd function and possesses symmetry with respect to ________________.
For the following exercises, let f(x)=cos x.
On [ 0,2π ), solve the equation f(x)=cos x=0.
π 2 , 3π 2
On [ 0,2π ), solve f(x)= 1 2 .
On [ 0,2π ), find the x-intercepts of f(x)=cos x.
π 2 , 3π 2
On [ 0,2π ), find the x-values at which the function has a maximum or minimum value.
On [ 0,2π ), solve the equation f(x)= 3 2 .
π 6 , 11π 6
Technology
Graph h(x)=x+sin x on [ 0,2π ]. Explain why the graph appears as it does.
Graph h(x)=x+sin x on [ −100,100 ]. Did the graph appear as predicted in the previous exercise?
The graph appears linear. The linear functions dominate the shape of the graph for large values of x.
Graph f(x)=x sin x on [ 0,2π ] and verbalize how the graph varies from the graph of f(x)=sin x.
- 1 How Economists Use Theories and Models to Understand Economic Issues
- 2 Data Collection Experiment
- 3 The Structure of Costs in the Long Run
- 4 Demand and Supply at Work in Labor Markets
- 5 Introduction to Financial Markets
- 6 Introduction to Information, Risk, and Insurance
- 7 Introduction to Trigonometric Identities and Equations
- 8 nhập môn internet
- 9 Continuous Probability Functions
- 10 Absolute and Comparative Advantage
The negative value of A results in a reflection across the x-axis of the sine function, as shown in [link].