Section 2.2 Sinusoidal Functions
Watermark text: DRAFT
Subsection 2.2.1 Graphing Sinusoidal Functions: Phase Shift vs. Horizontal Shift
Let's consider the function \(g(x)=\sin \left( 2x-\frac{2\pi}{3} \right) \text{.}\) Using what we study in MTH 111 about graph transformations, it should be apparent that the graph of \(g(x)=\sin \left( 2x-\frac{2\pi}{3} \right) \) can be obtained by transforming the graph of \(g(x)=\sin(x)\text{.}\) (To confirm this, notice that \(g(x)\) can be expressed in terms of \(f(x)=\sin(x),\) as \(g(x)=f \left( 2x-\frac{2\pi}{3} \right) \text{.}\)) Since the constants “\(2\)” and “\(\frac{2\pi}{3}\)” are multiplied by and subtracted from the input variable, \(x\text{,}\) what we study in MTH 111 tells us that these constants represent a horizontal stretch/compression and a horizontal shift, respectively.
It is often recommended in MTH 111 that we factor-out the horizontal stretching/compressing factor before transforming the graph, i.e., it's often recommended that we first re-write \(g(x)=\sin \left( 2x-\frac{2\pi}{3} \right) \) as \(g(x)=\sin \left( 2 \left( x-\frac{\pi}{3} \right) \right) \text{.}\)
After writing \(g\) in this format, we can draw its graph by performing the following sequence of transformations of the “base function” \(f(x)=\sin(x)\text{:}\)
Compress horizontally by a factor of \(\frac{1}{2}\text{.}\)
Shift \(\frac{\pi}{3}\) units to the right.
The advantage of this method is that the \(y\)-intercept of \(f(x)=\sin(x)\text{,}\) \(\left( 0,0 \right) \text{,}\) ends-up exactly where the horizontal shift suggests: when we compress the graph by a factor of \(\frac{1}{2}\text{,}\) the the \(y\)-interceot of the graph doesn't move since \(\frac{1}{2} \cdot 0 = 0\text{;}\) then, when we shift the graph \(\frac{\pi}{3}\) units to the right, the point \(\left( 0,0\right) \) ends up at \(\left( \frac{\pi}{3},0\right) \text{;}\) so the \(y\)-intercept ends up moving \(\frac{\pi}{3}\) units to the right, exactly how far we shifted.
Compare this with the alternative method: we can leave \(g(x)=\sin \left( 2x-\frac{2\pi}{3} \right) \) as-is and skip factoring-out the horizontal stretching/compressing factor, but then we need the following sequence to transform \(f(x)=\sin(x)\) into the graph of \(g\text{:}\)
Shift \(\frac{2\pi}{3}\) units to the right.
Compress horizontally by a factor of \(\frac{1}{2}\text{.}\)
The disadvantage of this method is that the \(y\)-intercept of \(f(x)=\sin(x)\) doesn't end-up where the horizontal shift suggests: when we shift the graph of \(f(x)=\sin(x)\) to the right by \(\frac{2\pi}{3}\) units, the \(y\)-intercept moves from \(\left( 0,0 \right) \) to \(\left( \frac{2\pi}{3},0\right) \text{;}\) then, when we compress the graph by a factor of \(\frac{1}{2}\text{,}\) it moves to \(\left( \frac{\pi}{3},0\right) \text{,}\) so the \(y\)-intercept doesn't end up shifted \(\frac{2\pi}{3}\) units to the right.
Figure 2.2.1 shows the graphs of \(y=f(x)\) and \(y=g(x)\text{.}\) Notice that the behavior of \(y=g(x)\) at \(x=\frac{\pi}{3}\) is like the behavior of \(y=f(x)\) at \(x=0\text{,}\) i.e., \(y=g(x)\) appears to have been shifted \(\frac{\pi}{3}\) units to the right. For this reason, \(\frac{\pi}{3}\) is called the horzontal shift of \(g(x)=\sin ( \, 2x-\frac{2\pi}{3} ) \,=\sin ( \, 2( \,x-\frac{\pi}{3} ) \, ) \,\text{.}\)
The constant \(\frac{2\pi}{3}\) is given a different name, phase shift, since it can be used to determine how far “out-of-phase” a sinusoidal function is in comparison with \(y=\sin(x)\) or \(y=\cos(x)\text{.}\) To determine how far out-of-phase a sinusoidal function is, we can determine the ratio of the phase shift and \(2\pi\text{.}\) (We use \(2\pi\) because it's the period of \(y=\sin(x)\) and \(y=\cos(x)\text{.}\)) Since \(\frac{2\pi}{3}\) is the phase shift for \(g(x)=\sin \left( 2x-\frac{2\pi}{3} \right)\text{,}\) the graph of \(y=g(x)\) is out-of-phase \(\frac{2\pi/3}{2\pi}=\frac{1}{3}\) of a period. (Since this number is positive, it represents a horizontal shift to the right \(\frac{1}{3}\) of a period.)
Definition 2.2.2.
Given a sinusoidal function of the form \(y=A\sin(wx-C)+k\) or \(y=A\cos(wx-C)+k\text{,}\) the phase shift is \(C\) and \(\frac{|C|}{2\pi}\) represents the fraction of a period that the graph has been shifted (shift to the right if \(C\) is positive or to the left if \(C\) is negative).
Definition 2.2.3.
If we re-write the function as \(y=A\sin \left( w \left( x-\frac{C}{w}\right) \right)+k\) or \(y=A\cos \left( w \left( x-\frac{C}{w}\right) \right)+k\text{,}\) we can see that the horizontal shift is \(\frac{C}{w}\) units (shift to the right if \(\frac{C}{w}\) is positive or to the left if \(\frac{C}{w}\) is negative).
Example 2.2.4.
Identify the phase shift and horizontal shift of \(g(x)=\cos \left( 3x-\frac{\pi}{4} \right) \text{.}\)
The phase shift of \(g(x)=\cos \left( 3x-\frac{\pi}{4} \right)\) is \(\frac{\pi}{4}\text{.}\) This tells us that the graph of \(y=g(x)\) is out of phase \(\frac{|\pi/4|}{2\pi}=\frac{1}{8}\) of a period, i.e., compared with \(y=\cos(x)\text{,}\) the graph of \(g(x)=\cos(3x-\frac{\pi}{4})\) has been shifted one-eighth of a period to the right.
To find the horizontal shift, we need to factor-out \(3\) from \(3x-\frac{\pi}{4}\text{.}\)
So the horizontal shift is \(\frac{\pi}{12}\text{.}\) This tells us, that compared with \(y=\cos(x)\text{,}\) the graph of \(g(x)=\cos(3x-\frac{\pi}{4})\) has been shifted \(\frac{\pi}{12}\) to the right.
Notice that the period of \(g(x)=\cos(3x-\frac{\pi}{4})\) is \(2\pi \cdot \frac{1}{3}=\frac{2\pi}{3}\text{,}\) and one-eighth of \(\frac{2\pi}{3}\) is \(\frac{2\pi}{3} \cdot \frac{1}{8}=\frac{\pi}{12}\text{,}\) so a shift of one-eighth of a period is the same as a shift of \(\frac{\pi}{12}\) units!
Example 2.2.5.
Draw a graph \(q(t)=2\sin(4t+\pi)+1\text{.}\) First, find it's amplitude, period, midline, phase shift, and horiontal shift.
Amplitude: \(|A|=|2|=2\)
Period: \(P=2\pi \cdot \frac{1}{|w|}=\frac{2\pi}{4}=\frac{\pi}{2}\)
Midline: \(y=1\)
Phase shift: \(-\pi\) (this tells is that the graph is out-of-phase \(\frac{|-\pi|}{2\pi}=\frac{1}{2}\) of a period)
Horizontal shift: \(\frac{\pi}{4}\) units to the left since:
Now we can draw a graph of \(q(t)=2\sin(4t+\pi)+1\) by drawing a sinusoidal function with the necessary features; see Figure 2.2.6.
Exercises 2.2.2 Exercises
Draw a graph of each of the following functions. List the amplitude, midline, period, phase shift, and horizontal shift.
1.
\(f(x)=3\sin \left( 3x-\frac{\pi}{2} \right)\)
2.
\(g(t)=\cos(4t+\pi)+3\)
3.
\(m(\theta)=2 \cos \left( 2\pi \theta - \pi \right)+4\)
4.
\(n(x)=-4\sin \left( \pi x+\frac{\pi}{4} \right)-2\)
Find two algebraic rules (one involving sine and one involving cosine) for each of the functions graphed below.
5.
\(y=p(t)\)
6.
\(y=q(x)\)