Section2.3Graphing Sinusoidal Functions: Phase Shift vs. Horizontal Shift
Let’s consider the function \(g(x)=\sin \mathopen{}\left( 2x-\frac{2\pi}{3} \right)\mathclose{} \text{.}\) Using what we study in MTH 111 about graph transformations, it should be apparent that the graph of \(g(x)=\sin \mathopen{}\left( 2x-\frac{2\pi}{3} \right)\mathclose{} \) 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 \mathopen{}\left( 2x-\frac{2\pi}{3} \right)\mathclose{} \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 \mathopen{}\left( 2x-\frac{2\pi}{3} \right)\mathclose{} \) as \(g(x)=\sin \mathopen{}\left( 2 \mathopen{}\left( x-\frac{\pi}{3} \right)\mathclose{}\right)\mathclose{} \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 \mathopen{} \left( 2x-\frac{2\pi}{3} \right)\mathclose{} \) 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.3.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 \mathopen{} \left( 2x-\frac{2\pi}{3}\right)\mathclose{}=\sin \mathopen{}\left( 2\mathopen{}\left( x-\frac{\pi}{3}\right)\mathclose{}\right)\mathclose{}\text{.}\)
Figure2.3.1.\(y=g(x)\) with \(f(x)=\sin(x)\)
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 \mathopen{}\left( 2x-\frac{2\pi}{3} \right)\mathclose{}\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.)
Definition2.3.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).
Definition2.3.3.
If we re-write the function as \(y=A\sin \mathopen{}\left( w \mathopen{}\left( x-\frac{C}{w}\right)\mathclose{} \right)\mathclose{}+k\) or \(y=A\cos \mathopen{} \left( w \mathopen{}\left( x-\frac{C}{w}\right)\mathclose{} \right)\mathclose{}+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).
Example2.3.4.
Identify the phase shift and horizontal shift of \(g(x)=\cos \mathopen{}\left( 3x-\frac{\pi}{4} \right)\mathclose{} \text{.}\)
Solution.
The phase shift of \(g(x)=\cos \mathopen{}\left( 3x-\frac{\pi}{4} \right)\mathclose{}\) 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!
Example2.3.5.
Draw a graph \(q(t)=2\sin(4t+\pi)+1\text{.}\) First, find it’s amplitude, period, midline, phase shift, and horiontal shift.