You are working on a graphing project in your math class, where you are supposed to graph several functions. Things seem to be going well, until you realize that there is a bold, vertical line three units to the left of where you placed your "y" axis! As it turns out, you've accidentally shifted your entire graph. You didn't notice that your instructor had placed a bold line where the "y" axis was supposed to be. And now, all of the points for your graph of the cosine function are three points farther to the right than they are supposed to be along the "x" axis.
You might be able to keep all of your work, if you can find a way to rewrite the equation so that it takes into account the change in your graph.
Can you think of a way to rewrite the function so that the graph is correct the way you plotted it?
Keep reading, and at the end of this Concept, you'll know how to do exactly that using a "horizontal shift".
In the first part of this video you'll learn how to perform horizontal translations of sine and cosine graphs.
James Sousa: Horizontal and Vertical Translations of Sine and Cosine
Horizontal translations involve placing a constant inside the argument of the trig function being plotted. If we return to the example of the parabola, y=x2, what change would you make to the equation to have it move to the right or left? Many students guess that if you move the graph vertically by adding to the y−value, then we should add to the x−value in order to translate horizontally. This is correct, but the graph itself behaves in the opposite way than what you may think.
Here is the graph of y=(x+2)2.
Notice that adding 2 to the x−value shifted the graph 2 units to the left, or in the negative direction.
To compare, the graph y=(x−2)2 moves the graph 2 units to the right or in the positive direction.
We will use the letter C to represent the horizontal shift value. Therefore, subtracting C from the x−value will shift the graph to the right and adding C will shift the graph C units to the left.
Adding to our previous equations, we now have y=D±sin(x±C) and y=D±cos(x±C) where D is the vertical translation and C is the opposite sign of the horizontal shift.
Solution: This is a sine wave that has been translated π2 units to the right.
Horizontal translations are also referred to as phase shifts. Two waves that are identical, but have been moved horizontally are said to be “out of phase” with each other. Remember that cosine and sine are really the same waves with this phase variation.
y=sinx can be thought of as a cosine wave shifted horizontally to the right by π2 radians.
Alternatively, we could also think of cosine as a sine wave that has been shifted π2 radians to the left.
Draw a sketch of y=1+cos(x−π)
Solution: This is a cosine curve that has been translated up 1 unit and π units to the right. It may help you to use the quadrant angles to draw these sketches. Plot the points of y=cosx at 0,π2,π,3π2,2π (as well as the negatives), and then translate those points before drawing the translated curve. The blue curve below is the final answer.
Solution: This is a sine curve that has been translated 2 units down and moved 3π2 radians to the left. Again, start with the quadrant angles on y=sinx and translate them down 2 units.
Then, take that result and shift it 3π2 to the left. The blue graph is the final answer.
Phase Shift: A phase shift is a horizontal translation.
1. Draw a sketch of y=3+cos(x−π2)
2. Draw a sketch of y=sin(x+π4)
3. Draw a sketch of y=2+cos(x+2π)
As we've seen, the 3 shifts the graph vertically 3 units, while the −π2 shifts the graph to the right by π2 units.
The π4 shifts the graph to the left by π4.
The 2 added to the function shifts the graph up by 2 units, and the 2π added in the argument of the function brings the function back to where it started, so the cosine graph isn't shifted horizontally at all.
Concept Problem Solution
As you've now seen by reading this Concept, it is possible to shift an entire graph to the left or the right by changing the argument of the graph.
So in this case, you can keep your graph by changing the function to y=cos(x−3)
Graph each of the following functions.