4.2 How to Graph Sine and Cosine Functions with Horizontal and Vertical Shifts

In my last post, I dove into the graphs of sine and cosine and the basic ways that we can manipulate them. If you are unfamiliar with the basic graphs of sine and cosine, I highly recommend going back through my last post before diving into this one.

In this post, we are going to learn how to further manipulate these graphs with horizontal and vertical shifts and build upon what we did in my last post.

Horizontal Phase Shifts

Say we have an equation like this one:

f(x) = \text{sin}x \\ y= f(x+3) \\ x+3=0 \\ x=-3

Here, we are going to have a horizontal shift to the left 3 units.

This leads us to our next base equation:

y=a\text{sin}b(x-d)

We know that a is our amplitude, b relates to our period, and now d is going to relate to how many units left or right that we shift our graph.

Let’s graph this next equation:

y = \text{sin}(x-\frac{\pi}{3})

It’s important to note that this equation could continue on in both directions, but we would just need to carefully plot the points because we have a horizontal shift to the right.

This is a standard sine graph, which starts on midline at (0,0), however, we are going to shift the graph because we have a second part to our equation (x-π/3). Set x-π/3 equal to 0 and solve for x = π/3.

Because the unit x is equal to is positive, we are going to have a shift to the right. If the unit x was equal to was negative, we would instead shift our graph to the left.

Now, since we know that the graph has shifted to the right by π/3 units, we can plot our first point on the graph as π/3. Since we know that the period is 2π, we simply add 2π to π/3 to get 7π/3, and that can be our last point on the graph.

Let’s go ahead and figure out what the points are in the middle of π/3 and 7π/3.

Hopefully this work is rather easy to follow along. To find a point between two known points, we are simply going to add the two points together, then divide them by two to find the point in-between.

Let’s try another graph.

y=3\text{cos}1(x+\frac{\pi}{4})

Just by looking at this graph, we can see that the amplitude is going to be 3. We can also see that our period is going to be 2.

The next thing that we need to look at is the phase shift to either the left or right. When we set x + π/4 equal to zero, we see that the result for x is negative and that we are going to have a phase shift of π/4 units to the left.

Of course, we need to fill out the coordinates on the x-axis as well, so let’s go ahead and do that.

By following our process of adding the two points and then dividing them by 2, we can fill in the rest of our x-coordinates. I have color-coded my work to make it easier to follow along.

Vertical Shifts

Time for a new base equation!

y=c + a\text{cos}b(x-d)

Our new variable “c” is going to represent a vertical shift up or down on our graph.

a = \text{amplitude} \ \ \ \ \ \text{phase shift: } x-d = 0 \\ \text{period} = \frac{2\pi}{b} \ \ \ \ \ \text{vertical shift:} c \text{(changes the midline)}

It’s important to note that with a vertical shift on our graph, we are going to have our midline shift as well. So far, our midline has been at y=0.

Let’s see this in action.

Graph:

y = 3-2\text{cos}3x \\ y= -2\text{cos}3x + 3

This one is a little bit to unpack, but is nothing we can’t handle. Let’s start with what is obvious.

We know that this is a negative cosine graph, so we can visualize the shape that we are going to have here, this mountain-like shape that our graph is going to make over one period.

We know that we are going to have a vertical shift up of 3, so we can go ahead and draw our midline at 3.

We also know that we have an amplitude of 2, which when we recall what the amplitude actually means, it is the distance that the graph will move from it’s midline (which I have denoted on our graph with a dotted grey line). Therefore, we know that the graph will have a minimum of 1, and a maximum of 5.

Now when we take our “b” in the equation, we get that our period is going to be a period of 2π/3.

With all of this information, we can plot our points. We know that the graph is going to start at (0,1), and then it is going to increase. We go to our midline and plot our next point, go up to 5 and plot our next point, come back down to our midline and plot another point, then finish at 1 again and plot our final point. We know that our last point lies at 2π/3, which we can divide by two to get the value of our middle point, and so on and so forth.

Conclusion

And there we have it. We have successfully manipulated the graphs of sine and cosine with vertical and horizontal phase shifts, vertical and horizontal shrinks, and changed the period over which our function takes place.

If this post has been useful to you, or not, I encourage you to leave a comment and let me know! Thank you.

One response to “4.2 How to Graph Sine and Cosine Functions with Horizontal and Vertical Shifts”

  1. […] that we know how to graph the sine and cosine functions, we can learn how to graph the tangent and […]


Posted

in

,

by

Comments

One response to “4.2 How to Graph Sine and Cosine Functions with Horizontal and Vertical Shifts”

  1. […] that we know how to graph the sine and cosine functions, we can learn how to graph the tangent and […]