 In our previous video, we learned how vertical stretching and compression changes the amplitude of a sine or cosine wave and this is accomplished by putting a coefficient in front of the sine or cosine. But what if we put a coefficient inside the sine or cosine? What if we're curious with something like y equals sine of 2x? How does a coefficient inside of the function change things? Well, for general function, anything inside of the function, which we call the horizontal zone, the horizontal zone, anything inside of the function will affect the x-coordinate. Things outside of the horizontal zone, that is, things outside the function will affect the vertical. So we see that a coefficient inside of a function will actually cause a horizontal stretch or compression. But why do I make some connection to the twilight zone here? Well, because in the horizontal zone, things don't act the way you think they would. When it comes to outside the function, sticking a coefficient in front, like if you times by 2, that stretches it. If you times by 1 half, it shrinks it. It makes sense. Timesy by something big makes it get bigger. Timesy by something small makes it get smaller. But in the horizontal zone, things act backward. So if you take the function f and you take some number c, which is larger than 1, then y equals f of cx causes the graph to be horizontally compressed. So putting a number inside there, like 2x, actually causes it to be a horizontal compression. So things get squished horizontally when you have something like that. So if we were to just sketch a picture of something, let's just come up with some graph, something like this. This is our function f right here. If we were to horizontally compress it by a factor of 2, what you see happening, we do need to have the y-axis here. So we can see what's going on. We'll draw the y-axis. Let's assume it's right there. And so as we start compressing things, what you see is that this graph, its height never changes, but it's then horizontally squished now. So you get like y equals f of cx right here. It squishes it. And it feels like it's backwards, but this really has to do the fact that this multiple inside actually speeds up the variable x. So it's like if you were running, like this is a track you have to run across, well, if you give the variable extra speed, then it turns out it can cover the same distance in a shorter amount of time. So the horizontal compression is a result by basically stimulating the variable so it's faster. On the other hand, if you take a value that's less than one, smaller than one, then y equals f of cx will cause it to vertically stretch. You're going to elongate the function so that it does the same stuff, but in a slower manner. So putting a coefficient inside of the function causes it to retard its process, slowing it down over time. So that's how you really should be thinking about it. In the horizontal zone things are going to work backwards. So let's look at some examples of this. Let's sketch the graph y equals sine of 2x. I mean we were talking about it. Why not do it now? And let's just do one period from 0 to 2 pi. So you see illustrated in yellow the standard sine wave, so no modifications have happened whatsoever. So note that at x equals 0, the y-coordinate is 0. At x equals pi halves, the y-coordinate is 1. At x equals pi, the y-coordinate is 0. At x equals 3 pi halves, the y-coordinate is negative 1. And at x equals 2 pi, you get 0 again. These five points which coincide with the quadrantal angles of 0, pi halves, pi, 3 pi halves, and 2 pi are very important. If you know where these five points go when you transform, then you can draw any sine or cosine wave. So keeping track of these five points is very critical. So what happens when you put this 2 inside that? You're going to speed up the graph. It's going to accomplish the same amount of work in half of the time. So basically each of these x-coordinates is going to get cut in half. The x-coordinate of 0 will stay put, so it stays 0. If you take pi halves, that actually is going to get shrunk to pi force. We take half of it. If you take pi, that's going to get cut in half 2 pi halves. If you take 3 pi halves like this one right here, that's going to get cut in half to be 3 pi force. And then 2 pi is going to get cut in half to just be pi. And so you see that if you take those five points and you cut their x-coordinates in half, a horizontal compression, then it actually repeats a single period in pi units as opposed to 2 pi. But as we're trying to go from 0 to 2 pi, once you hit pi, it's just going to repeat itself and it's going to repeat the second period right there. So you'll notice that this horizontal compression right here changes the period of this sine wave. It's actually pi as opposed to the standard sine wave for which the period would be 2 pi. Let's look at another example. Let's consider y equals cosine of 1 half and graph this on the interval 0 to 4 pi. Well, again, if we just look at the standard cosine wave with no transformations, we get a complete cycle as we go from 0 to 2 pi. That's the standard period for this thing right here. You'll notice this one goes from 0 to 4 pi. We could just repeat this picture if we needed to draw us ourselves the other part of cosine, although that's really not necessary. This yellow function is just for a baseline. Do look at the five important points on your cosine wave right here. What happens at x equals 0, x equals pi halves, x equals pi, x equals 3 pi, x equals 2 pi. You're going to get 1, 0, negative 1, 0, and 1 for the y coordinates. Well, because you have this coefficient of 1 half inside of the function, what this does is it's going to cause a horizontal stretch to occur. Basically, we're slowing down the function by a factor of 2. So it takes twice as long for it to complete one cycle. And so let's look at these points. So if you take the point 0 comma 1, you're going to double the x coordinate because you're stretching it. Well, 0 times 2 is still 0. Then look at the next one, pi halves. If you double the x coordinate, that actually gives you pi. And so it takes twice as long to reach that x intercept. Then take the next point pi, which you're going to double it. That'll give you the corresponding point is at 2 pi. You get 2 pi comma negative 1. Then the next of those points, 3 pi halves, you're going to double that to get 3 pi. You get this point right here, and then you're going to double the last one 2 pi to become 4 pi. And so for this function right here, a single period is actually not 2 pi, it's 4 pi. It takes twice as long to finish one cycle. So where did this 4 pi come from? Well, the idea is that for the standard function, for your standard function, let's just do cosine for a moment. Cosine of x here, your period is just going to be 2 pi. But then when you switch the function to y equals cosine of some value in here, bx, like so, how does that affect things? It turns out that in this situation, your new period is going to be 2 pi divided by this number b, like so. So in our example, we get 2 pi over 1 half. That simplifies to be 4 pi. But in the previous example where we had y equals cosine, excuse me, it was sine of 2x. In that situation, your period, which is 2 pi over this coefficient b, you get 2 pi over 2. It simplifies just to be pi that we had before. So if horizontal stretch or compression affects the period of the function, it changes how frequently the sine or cosine wave will repeat itself.