The equation of a wave
- [Narrator] I want to show you the equation of a wave and explain to you how to use it, but before I do that, I should explain what do we even mean to have a wave equation? What does it mean that a wave can have an equation? And here's what it means. So imagine you've got a water wave and it looks like this. And we graph the vertical height of the water wave as a function of the position. So for instance, say you go walk out on the pier and you go look at a water wave heading towards the shore, so the wave might move like this. You'll see this wave moving towards the shore. Now, realistic water waves on an ocean don't really look like this, but this is the mathematically simplest wave you could describe, so we're gonna start with this simple one as a starting point. So let's say this is your wave, you go walk out on the pier, and you go stand at this point and the point right in front of you, you see that the water height is high and then one meter to the right of you, the water level is zero, and then two meters to the right of you, the water height, the water level is negative three. What does that mean? It means that if it was a nice day out, right, there was no waves whatsoever, there'd just be a flat ocean or lake or wherever you're standing. But if there's waves, that water level can be higher than that position or lower than that water level position. We'll just call this water level position zero where the water would normally be if there were no waves. So you graph this thing and you get this graph like this, which is really just a snapshot. Because this is vertical height versus horizontal position, it's really just a picture. So in other words, I could just fill this in with water, and I'd be like, "Oh yeah, that's what the wave looks like "at that moment in time." And if I were to show what the wave does, it travels toward the shore like this and you'd see it move, so that's what this graph really is. If you've got a height versus position, you've really got a picture or a snapshot of what the wave looks like at all horizontal positions at one particular moment in time. And so what should our equation be? It should be an equation for the vertical height of the wave that's at least a function of the positions, so this is function of. This isn't multiplied by, but this y should at least be a function of the position so that I get a function where I can plug in any position I want. Let's say x equals zero. And it should tell me, oh yeah, that's at three. So this wave equation should spit out three when I plug in x equals zero. When I plug in x equals one, it should spit out, oh, that's at zero height, so it should give me a y value of zero, and if I were to plug in an x value of 6 meters, it should tell me, oh yeah, that y value is negative three. So no matter what x I plug in here, say seven, it should tell me what the value of the height of the wave is at that horizontal position. So what would this equation look like? Well, let's just try to figure it out. Y should equal as a function of x, it should be no greater than three or negative three and this is called the amplitude. So if we call this here the amplitude A, it's gonna be no bigger than that amplitude, so in this case the amplitude would be three, but I'm just gonna write amplitude, so this is a general equation that you could apply to any wave. And then look at the shape of this. This is like a sine or a cosine graph. Which one is this? Well, because at x equals zero, it starts at a maximum, I'm gonna say this is most like a cosine graph because cosine of zero starts at a maximum value, so I'm gonna say that this is like cosine of some stuff in here. Now you might be tempted to just write x. But that's not gonna work. If I just wrote x in here, this wouldn't be general enough to describe any wave. Because think about it, if I've just got x, cosine of x will reset every time x gets to two pi. So every time the total inside here gets to two pi, cosine resets. But look at this cosine. It resets after four meters. And some other wave might reset after eight meters, and some other wave might reset after a different distance. I need a way to specify in here how far you have to travel in the x direction for the wave to reset. So x alone isn't gonna do it, because if you've just got x, it always resets after two pi. So what do I do? I play the same game that we played for simple harmonic oscillators. And I say that this is two pi, and I divide by not the period this time. This is not a function of time, at least not yet. It's not a function of time. This is just of x. So this wouldn't be the period. This would not be the time it takes for this function to reset. It would actually be the distance that it takes for this function to reset. In other words, what we call the wavelength. So the distance between two peaks is called the wavelength. And we represent it with this Greek letter lambda. So the distance it takes a wave to reset in space is the wavelength. That's what we would divide by, because that has units of meters. And then finally, we would multiply by x in here. That way, if I start at x equals zero, cosine starts at a maximum, I would get three. If I say that my x has gone all the way to one wavelength, and in this case it's four meters. If I go all the way at four meters or one wavelength, once I plug in wavelength for x, that wavelength would cancel this wavelength. We'd get two pi and this cosine would reset, because once the total inside becomes two pi, the cosine will reset. And that's what happens for this wave. It should reset after every wavelength. You go another wavelength, it resets. Another wavelength, it resets. And that's what would happen in here. So how would we apply this wave equation to this particular wave? Well, let's take this. It's already got cosine, so that's cool because I've got this here. You could use sine if your wave started at this point and went up from there, but ours start at a maximum, so we'll use cosine. So we'll say that our amplitude, not just A, our amplitude happens to be three meters because our water gets as high as three meters above the equilibrium level. And we'll leave cosine in here. The two pi stays, but the lambda does not. Our wavelength is not just lambda. That's just too general. We gotta write what it is, and it's the distance from peak to peak, which is four meters, or you could measure it from trough to trough, or you could call these valleys. Valley to valley, that'd also be four meters. Regardless of how you measure it, the wavelength is four meters. And then what do I plug in for x? I don't, because I want a function. This is a function of x. I mean, I can plug in values of x. Actually, let's do it. Let's see if this function works. If I leave it as just x, it's a function that tells me the height of the wave at any point in x. But we should be able to test it. Let's test if it actually works. So let's take x and let's just plug in zero. So if I plug in zero for x, what does this function tell me? It tells me that the cosine of all of this would be zero. And I know cosine of zero is just one. So tell me that this whole function's gonna equal three meters, and that's true. The height of this wave at x equals zero, so at x equals zero, the height of the wave is three meters. So that one worked. Let's try another one. Let's say we plug in a horizontal position of two meters. If I plug in two meters over here, and then I plug in two meters over here, what do I get? This is gonna be three meters times cosine of, well, two times two is four, over four is one, times pi, it's gonna be cosine of just pi. And the cosine of pi is negative one. So I'm gonna get negative three out of this. Negative three meters, and that's true. The height of this wave at two meters is negative three meters. So this function's telling us the height of the wave at any horizontal position x, which is pretty cool. However, you might've spotted a problem. You might be like, "Wait a minute, that's fine and all, "but this is for one moment in time. "This wave's moving, remember?" This whole wave moves toward the shore. So at a particular moment in time, yeah, this equation might give you what the wave shape is for all values of x, but if I wait just a moment, boop, now everything's messed up. Now, at x equals two, the height is not negative three. And at x equals zero, the height is no longer three meters. It only goes up to here now. So what do we do? How do we describe a wave that's actually moving to the right in a single equation? Well, it's not as bad as you might think. Let me get rid of this Let's clean this up. We're really just gonna build off of this function over here. What I really need is a wave equation that's not only a function of x, but that's also a function of time. So this function up here has to not just be a function of x, it's got to also be a function of time so that I could plug in any time at any position, and it would tell me what the value of the height of the wave is. So how do I get the time dependence in here? Well, I'm gonna ask you to remember, if you add a phase constant in here. Remember, if you add a number inside the argument cosine, it shifts the wave. In fact, if you add a little bit of a constant, it's gonna take your wave, it actually shifts it to the left. So we're not gonna want to add. If we've got a wave going to the right, we're gonna want to subtract a certain amount of shift in here. But subtracting a certain amount, so that's cool, because subtracting a certain amount shifts the wave to the right. But if I just had a constant shift in here, that wouldn't do it. Like, the wave at the beach does not just move to the right and then boop it just stops. It just keeps moving. We need a wave that keeps on shifting. So you might realize if you're clever, you could be like, "Wait, why don't I just "make this phase shift depend on time? "That way, as time keeps increasing, the wave's gonna keep on shifting more and more." So if this wave shift term kept getting bigger as time got bigger, your wave would keep shifting to the right. You'd have an equation that describes a wave that's actually moving, so what would you put in here? It might seem daunting. You might be like, "Man, that's gonna be complicated. "How do we figure that out?" But it's not too bad, because just like the wavelength is the distance it takes for the wave to reset, there's also something called the period, and we represent that with a capital T. And the period is the time it takes for the wave to reset. So if I wait one whole period, this wave will have moved in such a way that it gets right back to where you couldn't really tell. It looks like the exact same wave, in other words. So we've showed that over here. Let's say you had your water wave up here. And I take this wave. If you wait one whole period, the wave will have shifted right back and it'll look like it did just before. So the whole wave is moving toward the beach. If you close your eyes, and then open them one period later, the wave looks exactly the same. So I'm gonna use that fact up here. We need this function to reset not just after a wavelength. We need it to reset after a period as well. So how do we represent that? We play the exact same game. We say that, all right, I can't just put time in here. What I'm gonna do is I'm gonna put two pi over the period, capital T, and then I multiply by the time. That way, just like every time x went through a wavelength, every time we walk one wavelength along the pier, we see the same height, because this becomes two pi. Every time we wait one whole period, this becomes two pi, and this whole thing is gonna reset again. So this is the wave equation, and I guess we could make it a little more general. This cosine could've been sine. So if you end up with a wave that's better described with a sine, maybe it starts here and goes up, you might want to use sine. And the negative, remember the negative caused this wave to shift to the right, you could use negative or positive because it could shift right with the negative, or if you use the positive, adding a phase shift term shifts it left. So a positive term up here would describe a wave moving to the left and technically speaking, you could make it just slightly more general by having one more constant phase shift term over here to the right. If we add this, then we could take into account cases that are weird where maybe the graph starts like here and neither starts as a sine or a cosine. You'd have to draw it shifted by just a little bit. But in our case right here, you don't have to worry about it because it started at a maximum, so you wouldn't have to have that phase shift. And this is it. This is the wave equation. This is what we wanted: a function of position in time that tells you the height of the wave at any position x, horizontal position x, and any time T. So let's try to apply this formula to this particular wave we've got right here. So I'm gonna get rid of this. This was just the expression for the wave at one moment in time. So maybe this picture that we took of the wave at the pier was at the moment, let's call it T equals zero seconds. So at T equals zero seconds, we took this picture. That's what the wave looks like, and this is the function that describes what the wave looks like at that moment in time, but we're gonna do better now. Now we're gonna describe what the wave looks like for any position x and any time T. So let's do this. What would the amplitude be? That's easy, it's still three. The wave never gets any higher than three, never gets any lower than negative three, so our amplitude is still three meters. And since at x equals zero and T equals zero, our graph starts at a maximum, we're still gonna want to use cosine. So we come in here, two pi x over lambda. Well, the lambda is still a lambda, so a lambda here is still four meters, because it took four meters for this graph to reset. You had to walk four meters along the pier to see this graph reset. That's a little misleading. I mean, you'd have to run really fast. The wave's gonna be moving as you're walking. So I should say, if you're standing at zero and a friend of yours is standing at four, you would both see the same height because the wave resets after four meters. Would we want positive or negative? Since this wave is moving to the right, we would want the negative. I wouldn't need a phase shift term because this starts as a perfect cosine. It doesn't start as some weird in-between function. The only question is what do I plug in for the period? So I would need one more piece of information. If I'm told the period, that'd be fine. But sometimes questions are trickier than that. Maybe they tell you this wave is traveling to the right at 0.5 meters per second. Let's say that's the wave speed, and you were asked, "Create an equation "that describes the wave as a function of space and time." So you'd do all of this, but then you'd be like, how do I find the period? We'd have to use the fact that, remember, the speed of a wave is either written as wavelength times frequency, or you can write it as wavelength over period. So I can solve for the period, and I can say that the period of this wave if I'm given the speed and the wavelength, I can find the wavelength on this graph. I'd say that the period of the wave would be the wavelength divided by the speed. So our wavelength was four meters, and our speed, let's say we were just told that it was 0.5 meters per second, would give us a period of eight seconds. So we'd have to plug in eight seconds over here for the period. And there it is. That's my equation for this wave. This describes, this little equation is amazing. It describes the height of this wave at any position x and any time T. So in other words, I could plug in three meters for x and 5.2 seconds for the time, and it would tell me, "What's the height of this wave "at three meters at the time 5.2 seconds?" Which is pretty amazing. So recapping, this is the wave equation that describes the height of the wave for any position x and time T. You would use the negative sign if the wave is moving to the right and the positive sign if the wave was moving to the left.