If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

# The equation of a wave

## Video transcript

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 so 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 going to 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 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 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 position so this is function of this isn't x 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 3 so this e wave equation should spit out 3 when I plug in x equals zero I want to plug in x equals 1 it should spit out oh that's at zero height so it should give me a y-value of 0 and if I were to plug in an x value of 6 meters it should tell me oh yeah that y value is negative 3 so no matter what X I plug in here say 7 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 why should equal as a function of X it should be no greater than 3 or negative 3 and this is called the amplitude so if we call this here the amplitude a it's going to be no bigger than that amplitude so in this case the amplitude would be 3 but I'm just going to 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 0 it starts at a maximum I'm going to say this is most like a cosine graph because cosine of 0 starts at a maximum value so I'm going to say that this is like cosine of some stuff in here now you might be tempted to just write X but that's not going to 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 2 pi so every time the total inside here gets to 2 pi cosine resets but look at this cosine it resets after 4 meters and some other wave might reset after 8 meters and some other way we 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 going to do it because if you've just got X it always resets after 2 pi so roll I do I play the same game that we played for simple harmonic oscillators and I say that this is 2 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 would actually be the distance that it takes for this function to reset in other words what we call the wave length so the distance between two peaks it's called the wave length and we represent it 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 0 cosine starts at a maximum I would get 3 if I say that my ex has gone all the way to one wavelength and in this case it's 4 meters if I go all the way to 4 meters or one wavelength once I plug in wavelength for X that wavelength would cancel this wavelength we get to PI and this cosine would reset because once the total inside becomes 2 pi the cosine will reset and that's what happens for this way 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 R starts at a maximum so we'll use cosine so we'll say that our amplitude not just a our amplitude happens to be 3 meters because our water gets as high as 3 meters above the equilibrium level and will leap cosine in here the 2 pi stays but the lambda does not our wavelength is not just lambda that's just to general we got to write what it is and it's the distance from peak to peak which is 4 meters or we could measure it from trough to trough or you could call these valleys Valley to Valley that also be 4 meters regardless of how you measure it the wavelength is 4 meters and then what do I plug in for x I don't because I want to function this is a function of X I mean I can plug in values of X let's just 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 work so let's take X and let's just plug in 0 so if I plug in 0 for X what does this function tell me it tells me that the cosine of all of this would be 0 and I know cosine of 0 is just 1 so tell me that this whole function is going to equal 3 meters and that's true the height of this wave at x equals 0 so at x equals 0 the height of the wave is 3 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 there's going to be three meters times cosine of well 2 times 2 is 4 over 4 is 1 times pi so can be cosine of just pi and the cosine of PI is negative 1 so I'm going to get negative 3 out of this negative 3 meters and that's true the height of this wave at 2 meters is negative 3 meters so this functions telling us the height of the wave at any horizontal position X which is pretty cool however you might have spotted a problem you might be like wait a minute let's find it all but this is for one moment in time this waves moving remember this whole wave moves towards 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 boob now everything's messed up now at x equals 2 the height is not negative 3 and at x equals 0 the height is no longer 3 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 going to build off of this function over here what I really need is the 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 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 going to ask you to remember if you add a phase constant in here remember if you add a number inside the argument to cosine it shifts the wave in fact if you add a little bit of a constant it's going to take your wave it actually shifts it to the left so we're not going to want to add if we've got a wave going to the right we're going to 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 if I just had a constant shift in here that wouldn't do it like the wave of the beach does not just move to the right and then boom it just stops that just keeps moving we need waived the 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 waves going to keep on shifting more and more so if this if this wave shift term kept getting bigger as time got bigger your wave would keep shifting to the right you have an equation that describes a wave that's actually moving so what would you put in here might seem daunting 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 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 I show that over here so you had your water wave up here I take this wave if you weigh one whole period the wave will have shifted right back and it'll look like it did just before so the whole waves moving toward the beach if you close your eyes and then open them one period later the wave looks exactly the same so we're going to use that fact up here we need this function to reset not just after a wavelength we needed 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 going to do is I'm going to put 2pi 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 2 pi every time we wait one whole period this becomes 2 pi and this whole thing is going to reset again so this is the wave equation and I guess we can make it a little more general this cosine could have 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 can 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 worry about it because it started out 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 time that tells you the height of the wave at any position X horizontal position X at any time T so let's try to apply this formula to this particular wave we've got right here so I'm going get rid of this right this was 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 going to do better now now we're going to 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 3 the wave never gets any higher than 3 never gets any lower than negative 3 so our amplitude is still 3 meters and since at x equals zero and T equals zero our graph starts at a maximum we're still going to want to use cosine so we come in here 2 pi X over lambda with a lambda is still lambda so lambda here is still 4 meters because it took 4 meters for this graph to reset you had to walk 4 meters along the pier to see this graph reset that's a little misleading I mean you'd have to run really fast the waves going to be moving as you're walking so I should say if you're standing at 0 and a friend of yours is standing at 4 you would both see the same height because the wave resets after 4 meters would we want positive or negative since this waves moving to the right we would want the negative I wouldn't need a phase shift term because this is 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're asked create an equation that describes the wave as a function of space and time so you do all 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 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 4 meters and our speed let's say we were just told it was 0.5 meters per second would give us a period of 8 seconds so we'd have to plug in 8 seconds over here for the period and there it is that's my equation for this wave this describes this 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 3 meters for X and 5.2 seconds for the time and it would tell me what's the height of this wave at 3 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