Hey, everyone. So in recent videos, we've been talking about graphs of the sine and cosine functions, and we've been discussing how these graphs can be transformed. Maybe they'll be shifted up or down or stretched in some kind of way. Well, what we're now going to be taking a look at is another kind of transformation known as a phase shift. Now this might sound really complicated and technical, but don't sweat it, because we're going to learn in this video that a phase shift is really just a horizontal shift, which can occur for your sine or cosine. And just like how a vertical shift took your graph and shifted it up or down, a phase shift can take your graph and shift it to the left or right. So without further ado, let's take a look at some situations that you'll see in this course associated with a phase shift.

Now, we should be familiar with this graph, which is the graph for the cosine of \( x \). It starts here at a high value of 1, and then kind of makes this wave-like pattern that extends on both sides of the graph. Now a way that you could see a phase shift is if you had some kind of number inside the parentheses that was being added or subtracted to the \( x \) within your cosine. An example of this would be, say, the cosine of \( x - \frac{\pi}{2} \). Now to see how this phase shift affects the graph, we can go ahead and plot some points. And the way that I'm going to plot these points is I'm going to take all of these values, and I'm going to subtract \( \frac{\pi}{2} \) from them, and then I'll evaluate the cosine. So the cosine of \( 0 - \frac{\pi}{2} \) is going to be the cosine of \( -\frac{\pi}{2} \). And we can see that our cosine graph is 0 at that point, so that means we're going to start at a value of 0.

Next we're going to have the cosine of \( \frac{\pi}{2} - \frac{\pi}{2} \). That's going to be the cosine of 0, which is just going to be 1. Next we'll have the cosine of \( \pi - \frac{\pi}{2} \). That's going to be the cosine of \( \frac{\pi}{2} \), which is back at 0. Now for \( \frac{3\pi}{2} - \frac{\pi}{2} \), this cosine is going to evaluate to negative one, meaning you'll be down there on your graph. And then we'll take a look at the cosine of \( 2\pi - \frac{\pi}{2} \), which turned out to just be 0. So you're going to be back up here. Now if you go ahead and connect these points with a smooth curve, you're going to notice something kind of interesting about this graph. We can go ahead and extend this back here as well. Notice how we have a very similar wave that we started with, except it appears that this wave is kind of out of phase with the original wave. And that's exactly what happens with the phase shift. In fact, you'll notice we actually have very similar values, except all of these have been shifted over to the right.

Whenever you have some kind of number subtracted inside the sine or cosine, we'll call that number \( h \), this number is going to cause a phase shift in your graph. Now I will mention here that not every textbook you see is going to use the letter \( h \). Some textbooks will use other variables or letters, but as long as you see it added or subtracted from the inside of the sine or cosine function, it means the same thing. Now all of this really begs some interesting questions, like how do we know how much our graph has shifted, or how do we know what direction our graph has shifted? Well, it turns out all of that can be discovered by looking at the inside of the trig function. Because if you have a situation where you have a sine or cosine of \( b\cdot x - \text{some number} \), then that means that your \( h \) value is positive, and your graph is going to shift to the right by \( \frac{h}{b} \) units.

Now if you instead had a situation where the inside of your trig function was \( b\cdot x + \text{some number} \), that means your \( h \) value is negative, and the graph is going to shift left by \( \frac{h}{b} \) units. Now in the situation we had right here, we had the cosine of \( 1\cdot x - \frac{\pi}{2} \). And because the inside of this function is in the form \( b\cdot x - \text{a number} \), that means that our \( h \) value was positive and our graph shifted to the right. Now finding \( \frac{h}{b} \) for this graph would be our \( h \) value, which is \( \frac{\pi}{2} \), divided by our \( b \) value, which is 1, and \( \frac{\pi}{2} \) divided by 1 is the same thing as just \( \frac{\pi}{2} \). So this shows us how much our graph shifted by.

Now another thing that you might notice is we have actually kind of a familiar looking wave. Notice we start at a value of 0, and then we go up and down and complete a period at \( 2\pi \). This is actually very similar to the sine graph. In fact, it's the same thing. And this is the interesting thing about phase shifts, it can actually make your cosine graph look like a sine graph or the other way around. Now to really make sure that this concept makes sense, let's try an example where we have to deal with a sine or cosine function, which has gone through a phase shift. So in this example, we are asked to graph the function \( y \) is equal to the sine of \( 2x + \frac{\pi}{1} \) over one full period.

Now to solve this problem, what I'm first going to do is draw a graph which we're more familiar with. So I'm going to ignore this \( \pi \) for now, and I'm just going to draw the graph for \( y \) is equal to the sine of \( 2x \). Now recall that this graph is going to have a bit of a different period than we're used to because we have this 2 in front. And the period for a sine or cosine function is equal to \( \frac{2\pi}{b} \). Well the \( b \) value we can see in front of the \( x \) is 2, and then these twos will cancel giving us just \( \pi \). So this sine graph is going to start here at the origin, and then we're going to reach a peak between 0 and \( \frac{\pi}{2} \). We're going to dip here through \( \pi \), and then we're going to reach a full period at \( \pi \). Now from here what I'm going to do is I'm going to use this graph to draw the graph of this function, which is \( y \) is equal to the sine of \( 2x + \pi \). And to figure this out, well, I can see that there's some kind of phase shift that happened. And recall that when you have a situation where the inside of your function is \( b\cdot x + \text{some number} \), that means the \( h \) value is negative and will shift to the left by \( \frac{h}{b} \) units. Now what is \( \frac{h}{b} \)? Well, \( \frac{h}{b} \) is going to be this \( h \) value which is \( \pi \) divided by this \( b \) value which is 2. So this graph is going to shift to the left by \( \frac{\pi}{2} \) units. So that means this point is actually going to start over here, meaning our graph is going to actually dip down first, and then we're going to cross through \( \frac{\pi}{2} \), then we're going to go up and then back down when we get to \( \pi \). So this is what the graph is going to look like over one full period, and that would be the solution to this problem.

If this seems kind of confusing to you, there's actually another way that you can look at this function that we have. \( Y \) equals the sine of \( 2x + \pi \), could also be written as \( y \) is equal to \( 2 \cdot (x + \frac{\pi}{2}) \). So notice how this 2 took our graph and changed the period of it, and then this portion of the function shifted our graph to the left by \( \frac{\pi}{2} \) units. So this is another way that you could write the function if this helps you to visualize things better. So this is the main idea of phase shifts and what they look like in the equation and how they affect the graph. So hope you found this video helpful. Thanks for watching.