6.1: Graphs of the Sine and Cosine Functions
 Page ID
 31123
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{\!\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\ #1 \}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\ #1 \}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{\!\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{\!\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
Skills to Develop
 Graph variations of \(y=\sin( x )\) and \(y=\cos( x )\).
 Use phase shifts of sine and cosine curves.
White light, such as the light from the sun, is not actually white at all. Instead, it is a composition of all the colors of the rainbow in the form of waves. The individual colors can be seen only when white light passes through an optical prism that separates the waves according to their wavelengths to form a rainbow.
Figure \(\PageIndex{1}\): Light can be separated into colors because of its wavelike properties. (credit: "wonderferret"/ Flickr)
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. To graph \(y=\sin (x)\), note that we are making a change in the meaning of the variables \(x\) and \(y\) from the meaning in Chapter 5. The variable \(x\) becomes the symbol representing the input value of the sine function, so \(x\) now represents an angle in standard position; while \(y\) represents the output, which is the vertical coordinate of a point on the unit circle. We can create a table of values and use them to sketch a graph. Table \(\PageIndex{1}\) lists some of the values for the sine function on a unit circle.
\(x\)  \(0\)  \(\frac{\pi}{6}\)  \(\frac{\pi}{4}\)  \(\frac{\pi}{3}\)  \(\frac{\pi}{2}\)  \(\dfrac{2\pi}{3}\)  \(\dfrac{3\pi}{4}\)  \(\dfrac{5\pi}{6}\)  \(\pi\) 

\(\sin(x)\) 
\(0\) 
\(\frac{1}{2}\) 
\(\frac{\sqrt{2}}{2}\) 
\(\frac{\sqrt{3}}{2}\) 
\(1\) 
\(\dfrac{\sqrt{3}}{2}\) 
\(\dfrac{\sqrt{2}}{2}\) 
\(\dfrac{1}{2}\) 
\(0\) 
Plotting the points from the table and continuing along the xaxis gives the shape of the sine function. See Figure \(\PageIndex{2}\).
Figure \(\PageIndex{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 \(\PageIndex{3}\).
Figure \(\PageIndex{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. This time, \(x\) again represents an angle, and \(y\) represents the horizontal coordinate of a point on the unit circle. Table \(\PageIndex{2}\) lists some of the values for the cosine function on a unit circle.
\(x\)  \(0\)  \(\frac{\pi}{6}\)  \(\frac{\pi}{4}\)  \(\frac{\pi}{3}\)  \(\frac{\pi}{2}\)  \(\frac{2\pi}{3}\)  \(\dfrac{3\pi}{4}\)  \(\dfrac{5\pi}{6}\)  \(\pi\) 

\(\cos(x)\) 
\(1\) 
\(\frac{\sqrt{3}}{2}\) 
\(\frac{\sqrt{2}}{2}\) 
\(\dfrac{1}{2}\) 
\(0\) 
\(\dfrac{1}{2}\) 
\(\dfrac{\sqrt{2}}{2}\) 
\(\dfrac{\sqrt{3}}{2}\) 
\(1\) 
As with the sine function, we can plot points to create a graph of the cosine function as in Figure \(\PageIndex{4}\).
Figure \(\PageIndex{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 \(P\) (with \(P>0\)) the period of the function. Figure \(\PageIndex{5}\) shows several periods of the sine and cosine functions. Any portion of the graph shown on one period \([x, x+P]\) is called a cycle. The graph of a periodic function should always include at least one full cycle.
Figure \(\PageIndex{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 \(\PageIndex{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\space x\). Now we can clearly see this property from the graph.
Figure \(\PageIndex{6}\): Odd symmetry of the sine function
Figure \(\PageIndex{7}\) shows that the cosine function is symmetric across 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\space x\).
Figure \(\PageIndex{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\space x\) is symmetric about the origin, because it is an odd function.
 The graph of \(y=\cos\space x\) is symmetric across 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
\[y=A\sin(Bx−C)+D \nonumber\]
and
\[y=A\cos(Bx−C)+D \nonumber\]
Using the identities \(\sin(x) = \sin(x)\) and \(\cos(x) = \cos(x)\), we can always rewrite a sinusoidal function in an equivalent form where the coefficient of \(x\) is a positive number (for example, \(\sin(3x) = \sin(3x)\)); thus, we will only consider the case where \(B > 0\).
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=\dfrac{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\left(\dfrac{x}{2}\right)\), then \(B=\dfrac{1}{2}\), so the period is \(4\pi\) and the graph is stretched. Notice in Figure \(\PageIndex{8}\) how the period is indirectly related to \(B\).
Figure \(\PageIndex{8}\)
PERIOD OF SINUSOIDAL FUNCTIONS
Letting \(C=0\) and \(D=0\) in the general form equations of the sine and cosine functions, we obtain the forms
 \(y=A\sin(Bx)\)
 \(y=A\cos(Bx)\)
The period is \(\dfrac{2\pi}{B}\).
Example \(\PageIndex{1}\): Identifying the Period of a Sine or Cosine Function
Determine the period of the function \(f(x)=\sin\left(\dfrac{\pi}{6}x\right)\).
Solution
Let’s begin by comparing the equation to the general form \(y=A\sin(Bx)\).
In the given equation, \(B=\dfrac{\pi}{6}\), so the period will be
\[ \begin{align*} P&=\dfrac{2\pi}{B} \\[5pt] &=\dfrac{2\pi}{\dfrac{\pi}{6}} \\ &=2\pi ⋅ \dfrac{6}{\pi} \\[5pt] &=12 \end{align*}\]
\(\PageIndex{1}\)
Determine the period of the function \(g(x)=\cos(\frac{x}{3})\).
 Answer

\(6\pi\)
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. \(\vert A\vert\) 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 xaxis. 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 \(\PageIndex{9}\) compares several sine functions with different amplitudes.
Figure \(\PageIndex{9}\)
AMPLITUDE OF SINUSOIDAL FUNCTIONS
Letting \(C=0\) and \(D=0\) in the general form equations of the sine and cosine functions, we obtain the forms
 \(y=A\sin(Bx)\)
 \(y=A\cos(Bx) \)
The amplitude is \(\vert A\vert\), and the vertical height from the midline is \(A\). In addition, notice in the example that
\[A = amplitude = \dfrac{1}{2}\vert \mbox{maximum − minimum} \vert \nonumber\]
Example \(\PageIndex{2}\): Identifying the Amplitude of a Sine or Cosine Function
What is the amplitude of the sinusoidal function \(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=A\sin(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 \(\PageIndex{10}\).
Figure \(\PageIndex{10}\)
\(\PageIndex{2}\)
What is the amplitude of the sinusoidal function \(f(x)=\frac{1}{2}\sin(x)\)? Is the function stretched or compressed vertically?
 Answer

\(\frac{1}{2}\); compressed
Analyzing Graphs of Variations of \(y = \sin\space x\) and \(y = \cos\space 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:
\[y=A\sin(BxC)+D\qquad \text{ and } \qquad y=A\cos(BxC)+D \nonumber\]
which can be written equivalently as
\[y=A\sin\left (B\left (x\dfrac{C}{B} \right ) \right )+D \qquad \text{ and } \qquad y=A\cos\left (B\left (x\dfrac{C}{B} \right ) \right )+D \nonumber\]
The value \(\frac{C}{B}\) for a sinusoidal function is the horizontal displacement of the basic sine or cosine function, which is called the phase shift. If \(C>0\), the graph shifts to the right. If \(C<0\), the graph shifts to the left. The greater the value of \(\frac{ C }{B}\), the more the graph is shifted. Figure \(\PageIndex{11}\) shows that the graph of \(f(x)=\sin(x−\pi)\) shifts to the right by \(\pi\) units, which is a larger shift than we see in the graph of \(f(x)=\sin\left(x−\frac{\pi}{4}\right)\), which shifts to the right by \(\frac{\pi}{4}\) units. Extra credit: A phase shift of \(\dfrac{C(1+2\pi n)}{B}\), where \(n \in \mathbb{Z}\), results in the same graph as a phase shift of \(\dfrac{C}{B}\). If you can show that this is true, take it to your professor; she will give you extra credit.
Figure \(\PageIndex{11}\)
While \(C\) relates to the horizontal shift, \(D\) indicates the vertical shift from the graph of the Toolkit Functions \(y=\sin x\) and \( y=\cos x\). See Figure \(\PageIndex{12}\). The function \(y=\sin(x)+D\) has its midline at \(y=D\).
Figure \(\PageIndex{12}\)
Any value of \(D\) other than zero shifts the graph up or down. Figure \(\PageIndex{13}\) compares \(f(x)=\sin x\) with \(f(x)=\sin x+2\), which is shifted \(2\) units up on a graph.
Figure \(\PageIndex{13}\)
VARIATIONS OF SINE AND COSINE FUNCTIONS
Given an equation in the form \(f(x)=A \sin (Bx−C)+D\) or \(f(x)=A \cos (Bx−C)+D\), \(\frac{C}{B}\) is the phase shift and \(D\) is the vertical shift.
Example \(\PageIndex{3}\): Identifying the Phase Shift of a Function
Determine the direction and magnitude of the phase shift for \(f(x)=\sin\left(x+\frac{\pi}{6}\right)−2\).
Solution
Let’s begin by comparing the equation to the general form \(y=A\sin(Bx−C)+D\).
In the given equation, notice that \(B=1\) and \(C=−\frac{\pi}{6}\). So the phase shift is
\[\begin{align*} \dfrac{C}{B}&= \frac{\frac{\pi}{6}}{1}\\[2mm] &= \frac{\pi}{6} \end{align*}\]
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\left(x−\left(−\frac{\pi}{6}\right)\right)−2\). If the value of \(C\) is negative, the shift is to the left.
\(\PageIndex{3}\)
Determine the direction and magnitude of the phase shift for \(f(x)=3\cos\left(x−\frac{\pi}{2}\right)\).
 Answer

Phase shift: \(\frac{\pi}{2}\); direction: right
Example \(\PageIndex{4}\): Identifying the Vertical Shift of a Function
Determine the direction and magnitude of the vertical shift for \(f(x)=\cos(x)−3\).
Solution
Let’s begin by comparing the equation to the general form \(y=A\cos(Bx−C)+D\).
In the given equation, \(D=−3\) so the shift is \(3\) units downward.
\(\PageIndex{4}\)
Determine the direction and magnitude of the vertical shift for \(f(x)=3\sin(x)+2\).
 Answer

\(2\) units up
Given a sinusoidal function in the form \(f(x)=A\sin(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 \(\PageIndex{5}\): Identifying the Variations of a Sinusoidal Function from its Equation
Determine the midline, amplitude, period, and phase shift of the function \(y=3\sin (2x)+1\).
Solution
Let’s begin by comparing the equation to the general form \(y=A\sin (Bx−C)+D\).
\(A=3\), so the amplitude is \( A =3\).
Next, \(B=2\), so the period is \(P=\dfrac{2\pi}{B}=\dfrac{2\pi}{2}=\pi\).
There is no added constant inside the parentheses, so \(C=0\) and the phase shift is \(\dfrac{C}{B}=\dfrac{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 \(\PageIndex{14}\).
Figure \(\PageIndex{14}\)
\(\PageIndex{5}\)
Determine the midline, amplitude, period, and phase shift of the function \(y=\frac{1}{2}\cos \left(\frac{x}{3}−\frac{\pi}{3}\right)\).
 Answer

midline: \(y=0\); amplitude: \( A =\frac{1}{2}\); period: \(P=\frac{2\pi}{B}=6π\); phase shift: \(\frac{C}{B}=\pi\)  see Figure \(\PageIndex{15}\)
Figure \(\PageIndex{15}\)
Example \(\PageIndex{6}\): Identifying the Equation for a Sinusoidal Function from a Graph
Determine a formula for the cosine function in Figure \(\PageIndex{16}\).
Figure \(\PageIndex{16}\)
Solution
To determine the equation, we need to identify each value in the general form of a sinusoidal function.
\(y=A\sin (Bx−C)+D\)
\(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=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, so that we can take \(C=0\). Since the extreme point is a minimum, unlike the Toolkit function \(\cos x\) which has a maximum value at \(x=0\), we can deduce that \(A<0\), so that the graph has been vertically reflected.
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} \mbox{ or } 0.5\). Also, before the vertical shift, the graph is reflected across 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.5\cos (x)+0.5\)
\(\PageIndex{6}\)
Determine a formula for the sine function in Figure \(\PageIndex{17}\).
Figure \(\PageIndex{17}\)
 Answer

\(f(x)=\sin(x)+2\)
Example \(\PageIndex{7}\): Identifying the Equation for a Sinusoidal Function from a Graph
Determine an equation for the sinusoidal function in Figure \(\PageIndex{18}\).
Figure \(\PageIndex{18}\)
Solution
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=\dfrac{2\pi}{B}=6\). Using the positive value for \(B\), we find that
\[\begin{align*} B&=\dfrac{2\pi}{P}\\ &=\dfrac{2\pi}{6}\\ &=\dfrac{\pi}{3} \end{align*}\]
So far, our equation is either \(y=\pm 3\sin\left(\dfrac{\pi}{3}x−C\right)−2\) or \(y=\pm 3\cos\left(\dfrac{\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 positive or negative cosine shifted to the left or right
 a positive or negative sine shifted to the left or right
While any of these would be correct, we will choose to use a positive cosine function. The shift is an integer value of 1 unit to the right. So \(\dfrac{C}{B}=1\), or \(\dfrac{C}{\frac{\pi}{3}}=1\), or \(C=\dfrac{\pi}{3}\). Our function becomes
\[ y=3\cos \left (\frac{\pi}{3}x\dfrac{\pi}{3} \right )2 . \nonumber\]
\(\PageIndex{7}\)
Write a formula for the function graphed in Figure \(\PageIndex{19}\).
Figure \(\PageIndex{19}\)
 Answer

two possibilities: \(y=4\sin\left(\dfrac{\pi}{5}x+\dfrac{3\pi}{10}\right)+4\) or \(y=4\cos\left(\dfrac{\pi}{5}x\dfrac{7\pi}{10}\right)+4\)
Graphing Variations of \(y = \sin\space x\) and \(y = \cos\space x\)
We have learned about types of variations of sine and cosine functions and used that information to write equations from graphs. Now we will use the same information to create graphs from equations.
To start, instead of focusing on the general form equations
\(y=A\sin(BxC)+D \text{ and } y=A\cos(BxC)+D\)
we will let \(C=0\) and \(D=0\) and work with a simplified form of the equations. Since we know that \(\sin(x) = \sin(x)\) and \(\cos(x)=\cos(x)\), we can always write \(B\) as a positive number, with \(A\) either positive or negative, as required.
Given the function \(y=A\sin(Bx)\), sketch one cycle of its graph.
 Identify the amplitude, \( A \).
 Identify the period, \(P=\dfrac{2\pi}{ B}\).
 Start at the origin, with the function increasing to the right if \(A\) is positive, or decreasing to the right if \(A\) is negative.
 At \(x=\dfrac{\pi}{2 B}\) there is a local maximum for \(A>0\) with \(y=A\) or a minimum for \(A<0\), with \(y=A\).
 The curve returns to the \(x\)axis at \(x=\dfrac{\pi}{B}\).
 There is a local minimum for \(A>0\) (or a maximum for \(A<0\)) at \(x=\dfrac{3\pi}{2 B}\) with \(y=A\) (or \(y=A\)).
 The curve returns again to the \(x\)axis at \(x=\dfrac{2\pi}{B}\).
Given the function \(y=A\cos(Bx)\), sketch one cycle of its graph.
 Identify the amplitude, \( A \).
 Identify the period, \(P=\dfrac{2\pi}{ B}\).
 Start at \(x=0\), with \(y=A\) and the function decreasing to the right if \(A\) is positive, or \(y=A\) and the function increasing to the right if \(A\) is negative. There is a local maximum for \(A>0\) or a minimum for \(A<0\).
 The curve returns to the \(x\)axis at \(x=\dfrac{\pi}{2 B}\).
 There is a local minimum for \(A>0\) (or a maximum for \(A<0\)) at \(x=\dfrac{\pi}{ B}\) with \(y=A\) (or \(y=A\)).
 The curve returns again to the \(x\)axis at \(x=\dfrac{3\pi}{2 B}\).
 There is a local maximum for \(A>0\) or a minimum for \(A<0\) at \(x=\dfrac{2\pi}{B}\).
Example \(\PageIndex{8}\): Graphing a Function and Identifying the Amplitude and Period
Sketch a graph of \(f(x)=−2\sin\left(\dfrac{\pi x}{2}\right)\).
Solution
Let’s begin by comparing the equation to the form \(y=A\sin(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=\dfrac{\pi}{2}\), so the period is
\[\begin{align*} P&=\dfrac{2\pi}{\dfrac{\pi}{2}}\\ &=2\pi \cdot \dfrac{2}{\pi}\\ &=4 \end{align*}\]
 Step 3. Because \(A\) is negative, the graph descends as we move to the right of the origin.
 Step 4. The \(x\)intercepts are at the beginning of one period, \(x=0\), at \(x=2\) (halfway through the cycle) and at the end of one cycle 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 \(\PageIndex{20}\) shows the graph of the function. Note that by letting \(B\) equal a multiple of \(\pi\), the scale of the \(x\)axis has changed to integer units.
Figure \(\PageIndex{20}\)
\(\PageIndex{8}\)
Sketch a graph of \( g(x)=−0.8\cos(2x)\). Determine the midline, amplitude, period, and phase shift.
 Answer

Figure \(\PageIndex{20}\)
midline: \(y=0\); amplitude: \( A =0.8\); period: \(P=\dfrac{2\pi}{B}=\pi\); phase shift: \(\dfrac{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=A\sin(Bx−C)+D\) or \(y=A\cos(Bx−C)+D\).
 Identify the amplitude, \( A \).
 Identify the period, \(P=\dfrac{2\pi}{B}\).
 Identify the phase shift, \(\dfrac{C}{B}\).
 Draw the graph of \(f(x)=A\sin(Bx)\) shifted to the right or left by \(\dfrac{C}{B}\) and up or down by \(D\).
Example \(\PageIndex{9}\): Graphing a Transformed Sinusoid
Sketch a graph of \(f(x)=3\sin\left(\dfrac{\pi x}{4}−\dfrac{\pi}{4}\right)\).
Solution
 Step 1. The function is already written in general form: \(f(x)=3\sin\left(\dfrac{\pi x}{4}−\dfrac{\pi}{4}\right)\). \(C=\dfrac{\pi}{4}\) and \(D=0\). This graph will have the shape of a sine function, starting somewhere along the midline (\(y=0\)) and increasing to the right, since \(A>0\).
 Step 2. \( A = 3 =3\). The amplitude is \(3\).
 Step 3. Since \(B =\dfrac{\pi}{4}\), we determine the period as follows.
\[\begin{align*} P&=\dfrac{2\pi}{B}\\ &=\dfrac{2\pi}{\dfrac{\pi}{4}}\\ &=2\pi \cdot \dfrac{4}{\pi}\\ &=8 \end{align*}\]
The period is \(8\).
 Step 4. Since \(C=\dfrac{\pi}{4}\), the phase shift is
\[\dfrac{C}{B}=\dfrac{\dfrac{\pi}{4}}{\dfrac{\pi}{4}}=1 \nonumber\].
The phase shift is \(1\) unit to the right.
 Step 5. Figure \(\PageIndex{22}\) shows the graph of the function.
Figure \(\PageIndex{22}\): A horizontally compressed, vertically stretched, and horizontally shifted sinusoid
\(\PageIndex{9}\)
Draw a graph of \(g(x)=−2\cos\left(\dfrac{\pi}{3}x+\dfrac{\pi}{6}\right)\). Determine the midline, amplitude, period, and phase shift.
 Answer

Figure \(\PageIndex{23}\)
midline: \(y=0\); amplitude: \( A =2\); period: \(P=\dfrac{2\pi}{B}=6\); phase shift: \(\dfrac{C}{B}=−\dfrac{1}{2}\)
Example \(\PageIndex{10}\): Identifying the Properties of a Sinusoidal Function
Given \(y=−2\cos\left(\dfrac{\pi}{2}x+\pi\right)+3\), determine the amplitude, period, phase shift, and horizontal shift. Then graph the function.
Solution
Begin by comparing the equation to the general form.
\(y=A\cos(Bx−C)+D\)
 Step 1. The function is already written in general form.
 Step 2. Since \(A=−2\), the amplitude is \( A =2\). The graph of the cosine function has been reflected about the \(x\)axis.
 Step 3. \(B =\dfrac{\pi}{2}\), so the period is \(P=\dfrac{2\pi}{B}=\dfrac{2\pi}{\dfrac{\pi}{2}}=2\pi⋅\dfrac{2}{\pi}=4\). The period is 4.
 Step 4. \(C=−\pi\), so we calculate the phase shift as \(\dfrac{C}{B}=−\dfrac{\pi}{\dfrac{\pi}{2}}=−\pi⋅\dfrac{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\).
Figure \(\PageIndex{24}\)
Using Transformations of Sine and Cosine Functions
We can use the transformations of sine and cosine functions in numerous applications. As mentioned in Section 5.2, circular motion can be modeled using either the sine or cosine function.
Example \(\PageIndex{11}\): Finding the Vertical Component of Circular Motion
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.
Solution
Recall from Section 5.4 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 \(\PageIndex{25}\).
Figure \(\PageIndex{25}\)
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\).
Example \(\PageIndex{12}\): Finding the Vertical Component of Circular Motion
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 \(\PageIndex{26}\). 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.
Figure \(\PageIndex{26}\)
Solution
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 \(\PageIndex{27}\).
Figure \(\PageIndex{27}\)
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\) units 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=−3\cos(x)+4\)
\(\PageIndex{10}\)
A weight is attached to a spring that is then hung from a board, as shown in Figure \(\PageIndex{28}\). 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\).
Figure \(\PageIndex{28}\)
 Answer

\(y=3\cos(x)−4\)
Figure \(\PageIndex{29}\)
Example \(\PageIndex{13}\): Determining a Rider’s Height on a Ferris Wheel
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 at the lowest point from a platform \(2\) meters above the ground. Express a rider’s height above ground as a function of time in minutes.
Solution
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=\dfrac{2\pi}{30}=\dfrac{\pi}{15}\)
 Shape: \(−\cos(t)\)
An equation for the rider’s height would be
\(y=−67.5\cos\left(\dfrac{\pi}{15}t\right)+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
Sinusoidal functions 
\(f(x)=A\sin(Bx−C)+D\) \(f(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\pi\).
 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 yaxis.
 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=\dfrac{2\pi}{ B }\). See Example \(\PageIndex{1}\).
 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 Example \(\PageIndex{2}\).
 The value \(\dfrac{C}{B}\) in the general formula for a sinusoidal function indicates the phase shift. See Example \(\PageIndex{3}\).
 The value \(D\) in the general formula for a sinusoidal function indicates the vertical shift from the midline. See Example \(\PageIndex{4}\).
 Combinations of variations of sinusoidal functions can be detected from an equation. See Example \(\PageIndex{5}\).
 The equation for a sinusoidal function can be determined from a graph. See Example \(\PageIndex{6}\) and Example \(\PageIndex{7}\).
 A sinusoidal function can be graphed by identifying its amplitude, period, phase shift, and horizontal shift. See Example \(\PageIndex{8}\), Example \(\PageIndex{9}\) and Example \(\PageIndex{10}\).
 Sinusoidal functions can be used to solve realworld problems. See Example \(\PageIndex{11}\), Example \(\PageIndex{12}\), and Example \(\PageIndex{13}\).
Contributors
Jay Abramson (Arizona State University) with contributing authors. Textbook content produced by OpenStax College is licensed under a Creative Commons Attribution License 4.0 license. Download for free at https://openstax.org/details/books/precalculus.