# MTH 111–112 Supplement

## 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{:}$$
1. Compress horizontally by a factor of $$\frac{1}{2}\text{.}$$
2. 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{:}$$
1. Shift $$\frac{2\pi}{3}$$ units to the right.
2. 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{.}$$
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{.}$$
\begin{align*} g(x) \amp=\cos\mathopen{}\left( 3x-\frac{\pi}{4}\right)\mathclose{}\\ \amp=\cos\mathopen{}\left(3\mathopen{}\left(x-\frac{\pi}{3 \cdot 4}\right)\mathclose{} \right)\mathclose{}\\ \amp=\cos\mathopen{}\left(3\mathopen{}\left(x-\frac{\pi}{12}\right)\mathclose{}\right)\mathclose{} \end{align*}
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.
Solution.
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:
\begin{align*} q(t) \amp=2\sin\mathopen{}\left( 4t+\pi \right)\mathclose{}+1\\ \amp=2\sin \mathopen{}\left(4 \mathopen{}\left(t+\frac{\pi}{4} \right)\mathclose{} \right)\mathclose{}+1\\ \amp=2\sin\mathopen{}\left( 4 \mathopen{}\left(t- \mathopen{}\left( -\frac{\pi}{4}\right)\mathclose{}\right)\mathclose{}\right)\mathclose{} +1 \end{align*}
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.3.6.

### ExercisesExercises

#### Sketch Sinusoidal Graphs.

In Exercises 1–4, draw a graph of each of the following functions. List the amplitude, midline, period, phase shift, and horizontal shift.
##### 1.
$$f(x)=3\sin\mathopen{} \left( 3x-\frac{\pi}{2} \right)\mathclose{}$$
##### 2.
$$g(t)=\cos(4t+\pi)+3$$
##### 3.
$$m(\theta)=2 \cos \mathopen{}\left( 2\pi \theta - \pi \right)\mathclose{}+4$$
##### 4.
$$n(x)=-4\sin \mathopen{}\left( \pi x+\frac{\pi}{4} \right)\mathclose{}-2$$

#### Find the Formula.

In Exercises 5–6, 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)$$