Skip to main content

MTH 111–112 Supplement

Section 2.3 Graphing Sinusoidal Functions: Phase Shift vs. Horizontal Shift

Let’s consider the function g(x)=sin(2x2π3). Using what we study in MTH 111 about graph transformations, it should be apparent that the graph of g(x)=sin(2x2π3) can be obtained by transforming the graph of g(x)=sin(x). (To confirm this, notice that g(x) can be expressed in terms of f(x)=sin(x), as g(x)=f(2x2π3).) Since the constants “2” and “2π3” are multiplied by and subtracted from the input variable, x, 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(2x2π3) as g(x)=sin(2(xπ3)).
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):
  1. Compress horizontally by a factor of 12.
  2. Shift π3 units to the right.
The advantage of this method is that the y-intercept of f(x)=sin(x), (0,0), ends-up exactly where the horizontal shift suggests: when we compress the graph by a factor of 12, the the y-interceot of the graph doesn’t move since 120=0; then, when we shift the graph π3 units to the right, the point (0,0) ends up at (π3,0); so the y-intercept ends up moving π3 units to the right, exactly how far we shifted.
Compare this with the alternative method: we can leave g(x)=sin(2x2π3) 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:
  1. Shift 2π3 units to the right.
  2. Compress horizontally by a factor of 12.
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 2π3 units, the y-intercept moves from (0,0) to (2π3,0); then, when we compress the graph by a factor of 12, it moves to (π3,0), so the y-intercept doesn’t end up shifted 2π3 units to the right.
Figure 2.3.1 shows the graphs of y=f(x) and y=g(x). Notice that the behavior of y=g(x) at x=π3 is like the behavior of y=f(x) at x=0, i.e., y=g(x) appears to have been shifted π3 units to the right. For this reason, π3 is called the horzontal shift of g(x)=sin(2x2π3)=sin(2(xπ3)).
This is a graph showing both f(x) and g(x) where the function g(x) is a horizontal shift of f(x).
Figure 2.3.1. y=g(x) with f(x)=sin(x)
The constant 2π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). To determine how far out-of-phase a sinusoidal function is, we can determine the ratio of the phase shift and 2π. (We use 2π because it’s the period of y=sin(x) and y=cos(x).) Since 2π3 is the phase shift for g(x)=sin(2x2π3), the graph of y=g(x) is out-of-phase 2π/32π=13 of a period. (Since this number is positive, it represents a horizontal shift to the right 13 of a period.)

Definition 2.3.2.

Given a sinusoidal function of the form y=Asin(wxC)+k or y=Acos(wxC)+k, the phase shift is C and |C|2π 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.3.3.

If we re-write the function as y=Asin(w(xCw))+k or y=Acos(w(xCw))+k, we can see that the horizontal shift is Cw units (shift to the right if Cw is positive or to the left if Cw is negative).

Example 2.3.4.

Identify the phase shift and horizontal shift of g(x)=cos(3xπ4).
Solution.
The phase shift of g(x)=cos(3xπ4) is π4. This tells us that the graph of y=g(x) is out of phase |π/4|2π=18 of a period, i.e., compared with y=cos(x), the graph of g(x)=cos(3xπ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π4.
g(x)=cos(3xπ4)=cos(3(xπ34))=cos(3(xπ12))
So the horizontal shift is π12. This tells us, that compared with y=cos(x), the graph of g(x)=cos(3xπ4) has been shifted π12 to the right.
Notice that the period of g(x)=cos(3xπ4) is 2π13=2π3, and one-eighth of 2π3 is 2π318=π12, so a shift of one-eighth of a period is the same as a shift of π12 units!

Example 2.3.5.

Draw a graph q(t)=2sin(4t+π)+1. First, find it’s amplitude, period, midline, phase shift, and horiontal shift.
Solution.
Amplitude: |A|=|2|=2
Period: P=2π1|w|=2π4=π2
Midline: y=1
Phase shift: π (this tells is that the graph is out-of-phase |π|2π=12 of a period)
Horizontal shift: π4 units to the left since:
q(t)=2sin(4t+π)+1=2sin(4(t+π4))+1=2sin(4(t(π4)))+1
Now we can draw a graph of q(t)=2sin(4t+π)+1 by drawing a sinusoidal function with the necessary features; see Figure 2.3.6.
Graph of q(t) = 2sin(4t+pi)+1.
Figure 2.3.6. y=q(t)

Exercises Exercises

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.

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.