2.4: Translating Sine and Cosine Functions
Learning Objectives
- Translate sine and cosine functions vertically and horizontally.
- Identify the vertical and horizontal translations of sine and cosine from a graph and an equation.
Vertical Translations
When you first learned about vertical translations in a coordinate grid, you started with simple shapes. Here is a rectangle:
To translate this rectangle vertically, move all points and lines up by a specified number of units. We do this by adjusting the \begin{align*}y-\end{align*}coordinate of the points. So to translate this rectangle 5 units up, add 5 to every \begin{align*}y-\end{align*}coordinate.
This process worked the same way for functions. Since the value of a function corresponds to the \begin{align*}y-\end{align*}value on its graph, to move a function up 5 units, we would increase the value of the function by 5. Therefore, to translate \begin{align*}y=x^2\end{align*} up five units, you would increase the \begin{align*}y-\end{align*}value by 5. Because \begin{align*}y\end{align*} is equal to \begin{align*}x^2\end{align*}, then the equation \begin{align*}y = x^2 + 5\end{align*}, will show this translation.
Hence, for any graph, adding a constant to the equation will move it up, and subtracting a constant will move it down. From this, we can conclude that the graphs of \begin{align*}y = \sin x\end{align*} and \begin{align*}y = \cos x\end{align*} will follow the same rules. That is, the graph of \begin{align*}y = \sin(x) + 2\end{align*} will be the same as \begin{align*}y = \sin x\end{align*}, only it will be translated, or shifted, 2 units up.
To avoid confusion, this translation is usually written in front of the function: \begin{align*}y = 2 + \sin x\end{align*}.
Various texts use different notation, but we will use \begin{align*}D\end{align*} as the constant for vertical translations. This would lead to the following equations: \begin{align*}y=D \pm \sin x\end{align*} and \begin{align*}y=D \pm \cos x\end{align*} where \begin{align*}D\end{align*} is the vertical translation. \begin{align*}D\end{align*} can be positive or negative.
Another way to think of this is to view sine or cosine curves “wrapped” around a horizontal line. For \begin{align*}y = \sin x\end{align*} and \begin{align*}y = \cos x\end{align*}, the graphs are wrapped around the \begin{align*}x-\end{align*}axis, or the horizontal line, \begin{align*}y = 0\end{align*}.
For \begin{align*}y = 3 + \sin x\end{align*}, we know the curve is translated up 3 units. In this context, think of the sine curve as being “wrapped” around the line, \begin{align*}y = 3\end{align*}.
Either method works for the translation of a sine or cosine curve. Pick the thought process that works best for you.
Example 1: Find the minimum and maximum of \begin{align*}y = -6 + \cos x\end{align*}
Solution: This is a cosine wave that has been shifted down 6 units, or is now wrapped around the line \begin{align*}y = -6\end{align*}. Because the graph still rises and falls one unit in either direction, the cosine curve will extend one unit above the “wrapping line” and one unit below it. The minimum is -7 and the maximum is -5.
Example 2: Graph \begin{align*}y=4+\cos x\end{align*}.
Solution: This will be the basic cosine curve, shifted up 4 units.
Horizontal Translations or Phase Shifts
Horizontal translations are a little more complicated. If we return to the example of the parabola, \begin{align*}y = x^2\end{align*}, 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 \begin{align*}y-\end{align*}value, then we should add to the \begin{align*}x-\end{align*}value in order to translate horizontally. This is correct, but the graph behaves in the opposite way than what you may think.
Here is the graph of \begin{align*}y = (x + 2)^2\end{align*}.
Notice that adding 2 to the \begin{align*}x-\end{align*}value shifted the graph 2 units to the left, or in the negative direction.
To compare, the graph \begin{align*}y = (x - 2)^2\end{align*} moves the graph 2 units to the right or in the positive direction.
We will use the letter \begin{align*}C\end{align*} to represent the horizontal shift value. Therefore, subtracting \begin{align*}C\end{align*} from the \begin{align*}x-\end{align*}value will shift the graph to the right and adding \begin{align*}C\end{align*} will shift the graph \begin{align*}C\end{align*} units to the left.
Adding to our previous equations, we now have \begin{align*}y=D \pm \sin (x \pm C)\end{align*} and \begin{align*}y=D \pm \cos (x \pm C)\end{align*} where \begin{align*}D\end{align*} is the vertical translation and \begin{align*}C\end{align*} is the opposite sign of the horizontal shift.
Example 3: Sketch \begin{align*}y=\sin \left( x - \frac{\pi}{2} \right)\end{align*}
Solution: This is a sine wave that has been translated \begin{align*}\frac{\pi}{2}\end{align*} 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.
\begin{align*}y = \sin x\end{align*} can be thought of as a cosine wave shifted horizontally to the right by \begin{align*}\frac{\pi}{2}\end{align*} radians.
Alternatively, we could also think of cosine as a sine wave that has been shifted \begin{align*}\frac{\pi}{2}\end{align*} radians to the left.
Example 4: Draw a sketch of \begin{align*}y = 1 + \cos (x - \pi)\end{align*}
Solution: This is a cosine curve that has been translated up 1 unit and \begin{align*}\pi\end{align*} units to the right. It may help you to use the quadrant angles to draw these sketches. Plot the points of \begin{align*}y = \cos x\end{align*} at \begin{align*}0, \frac{\pi}{2}, \pi, \frac{3\pi}{2}, 2\pi\end{align*} (as well as the negatives), and then translate those points before drawing the translated curve. The blue curve below is the final answer.
Example 5: Graph \begin{align*}y=-2+\sin \left(x+\frac{3\pi}{2}\right)\end{align*}
Solution: This is a sine curve that has been translated 2 units down and moved \begin{align*}\frac{3\pi}{2}\end{align*} radians to the left. Again, start with the quadrant angles on \begin{align*}y = \sin x\end{align*} and translate them down 2 units.
Then, take that result and shift it \begin{align*}\frac{3\pi}{2}\end{align*} to the left. The blue graph is the final answer.
Example 6: Write the equation of the following sinusoid
Solution: Notice that you have been given some points to help identify the curve properly. Remember that sine and cosine are essentially the same wave so you can choose to model the sinusoid with either one. Think of the function as a cosine curve because the maximum value of a cosine function is on the \begin{align*}y-\end{align*}axis, which makes cosine easier to visualize. From the points on the curve, the first maximum point to the right of the \begin{align*}y-\end{align*}axis occurs at halfway between \begin{align*}\pi\end{align*} and \begin{align*}2\pi\end{align*}, or \begin{align*}\frac{3\pi}{2}\end{align*}. Because the next maximum occurs \begin{align*}2\pi\end{align*} units to the right of that, or at \begin{align*}\frac{7\pi}{2}\end{align*}, there is no change in the period of this function. This means that the cosine curve has been translated \begin{align*}\frac{3\pi}{2}\end{align*} units to the right, or \begin{align*}y=\cos \left(x- \frac{3\pi}{2} \right)\end{align*}. The vertical translation value can be found by locating the center of the wave. If it is not obvious from the graph, you can find the center by averaging the minimum and maximum values.
This center is the wrapping line of the translated function and is therefore the same as \begin{align*}D\end{align*}. In this example, the maximum value is 1.5 and the minimum is -0.5. So,
\begin{align*}\frac{1.5+(-0.5)}{2}=\frac{1}{2}\end{align*}
Placing these two values into our equation, \begin{align*}y=D \pm \cos (x \pm C)\end{align*}, gives:
\begin{align*}y=\frac{1}{2}+\cos \left(x-\frac{3\pi}{2} \right)\end{align*}
Because the cosine graph is periodic, there are an infinite number of possible answers for the horizontal translation. If we keep going in either direction to the next maximum and translate the wave back that far, we will obtain the same graph. Some other possible answers are:
\begin{align*}y=\frac{1}{2}+\cos \left(x+\frac{\pi}{2} \right), y=\frac{1}{2} + \cos \left(x-\frac{5\pi}{2} \right), \text{and} \ y=\frac{1}{2}+\cos \left(x-\frac{7\pi}{2}\right).\end{align*}
Because sine and cosine are essentially the same function, we could also have modeled the curve with a sine function. Instead of looking for a maximum peak though, for sine we need to find the middle of an increasing part of the wave to consider as a starting point because sine starts at zero.
The coordinates of this point may not always be obvious from the graph. It this case, the drawing shows that the point just to the right of the \begin{align*}y-\end{align*}axis is \begin{align*}\left(\pi, \frac{1}{2}\right)\end{align*}. So the horizontal, or \begin{align*}C\end{align*} value would be \begin{align*}\pi\end{align*}. The vertical shift, amplitude, and frequency are all the same as the were for the cosine wave because it is the same graph. So the equation would become \begin{align*}y=\frac{1}{2}+\sin (x-\pi)\end{align*}.
Once again, there are an infinite number of other possible answers if you extend away from the \begin{align*}C\end{align*} value multiples of \begin{align*}2\pi\end{align*} in either direction, such as \begin{align*}y=\frac{1}{2}+\sin (x-3\pi)\end{align*} or \begin{align*}y=\frac{1}{2}+\sin (x-\pi)\end{align*}.
Points to Consider
- Amplitude is the “stretching” of a sine or cosine curve. Where do you think that would go in the equation?
- Do you think the other four trig functions are translated, vertically and horizontally, in the same way as sine and cosine?
- Why is there an infinitely many number of equations that can represent a sine or cosine curve?
Review Questions
For problems 1-5, find the equation that matches each description.
- ____the minimum value is 0 – A. \begin{align*}y=\sin \left(x-\frac{\pi}{2} \right)\end{align*}
- ____the maximum value is 3 – B. \begin{align*}y=1+\sin x\end{align*}
- ____the \begin{align*}y-\end{align*}intercept is -2 – C. \begin{align*}y=\cos (x-\pi)\end{align*}
- ____the \begin{align*}y-\end{align*}intercept is -1 – D. \begin{align*}y=-1+\sin \left(x-\frac{3\pi}{2}\right)\end{align*}
- ____the same graph as \begin{align*}y = \cos (x)\end{align*} – E. \begin{align*}y=2+\cos x\end{align*}
- Express the equation of the following graph as both a sine and a cosine function. Several points have been plotted at the quadrant angles to help.
For problems 7-10, match the graph with the correct equation.
- ____ \begin{align*}y=1+\sin \left(x-\frac{\pi}{2}\right)\end{align*}
- ____ \begin{align*}y=-1+\cos \left(x+\frac{3\pi}{2}\right)\end{align*}
- ____ \begin{align*}y=1 +\cos \left(x-\frac{\pi}{2}\right)\end{align*}
- ____ \begin{align*}y=-1+\sin (x-\pi)\end{align*} A. B. C. D.
- Sketch the graph of \begin{align*}y=1+\sin \left(x-\frac{\pi}{4}\right)\end{align*} on the axes below.
Review Answers
- B
- E
- D
- C
- A
- \begin{align*}y&=-2+\sin (x-\pi) \ \text{or} \ y=-2+\sin (x+\pi)\\ y&=-2+\cos \left(x+\frac{\pi}{2}\right) \ \text{or} \ y=-2+\cos \left(x-\frac{3\pi}{2}\right)\end{align*} Note: this list is not exhaustive, there are other possible answers.
- C
- D
- A
- B