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

Introduction to harmonic motion

Harmonic motion refers to the motion an oscillating mass experiences when the restoring force is proportional to the ​displacement, but in opposite directions. Harmonic motion is periodic and can be represented by a sine wave with constant frequency and amplitude. An example of this is a weight bouncing on a spring. Created by Sal Khan.

Want to join the conversation?

  • spunky sam blue style avatar for user Murtuza Abbas
    Why is Sal so emphasizing on the toughness of Calculus?
    Is it really important to learn Calculus to understand Physics?
    I just managed to pass my Math exams in 10th grade and now having left Maths(opted for Biotechnology instead) in 11th, am now unable to understand what is this Calculus all about?:/:/:/
    How can a student who has not understood basic concepts of Algebra study this stuff?:'(
    Pls. help with any suggestions:(
    Thanking in advance:)
    (5 votes)
    Default Khan Academy avatar avatar for user
    • old spice man green style avatar for user John Nolen
      Sal is not emphasizing that calculus is tough so much as he is avoiding the use of calculus for the sake of not confusing people who don't understand it. Physics is the study of the way the world actually works. As such it is important for anyone to have a good intuitive understanding of physics whether or not they are good at math. That is why Sal avoids discussing the calculus whenever it is not necessary to the discussion. That said, solving physics problems of this sort is what motivated Issac Newton to invent calculus in the first place. Newton made all kinds of experimental observations of motion, but he didn't have the mathematical tools to describe what he was seeing. (At that point, a rudimentary understanding of algebra was all that Newton had and that was self-taught.) Newton took a break from his physics experiments, and scrutinized his results. This led him to develop tables of what we now know as derivatives. (Keep in mind that Newton was inventing this math on the fly so the notation that we have today didn't exist yet.) Newton also noticed that for each derivative there was a corresponding sum from which the derivative could be obtained. This led to the concept of what we now know as an integral. The physics that we're trying to learn in these videos was the motivation for the invention of calculus. Calculus is all about motion. The final answer to your question is that you don't have to know calculus to learn physics but it helps ... it helps a lot.
      (19 votes)
  • male robot hal style avatar for user Naman Barman
    How come the spring has the highest velocity, or most kinetic energy, at the point 0? Do all springs always have their highest velocity at the halfway point?
    (6 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user Hannah Brown
      Point 0 is called the equilibrium point. So if you imagine a spring just sitting there, that's point 0. If you attach that mass and let gravity pull it down, that's A, and A has a lot of potential energy because the spring is going to want to bounce back. The spring will bounce back past 0 (where it's moving the fastest and has maximum kinetic energy) because of its restorative force (how "springy" the spring is). It will then compress to -A, where it's got high potential energy (because if you compress a spring, it's going to bounce back.)
      Basically, the spring wants to be at 0 because that's equilibrium, and the restorative force is always trying to get to equilibrium, but it can't.
      The answer to your second question is yes. That's a fundamental property of simple harmonic motion (pendulums, too) and it will come up all the time.
      (13 votes)
  • blobby green style avatar for user Prasham Shah
    what is damped oscillation and resonance?
    (5 votes)
    Default Khan Academy avatar avatar for user
    • male robot hal style avatar for user Andrew M
      A spring and mass together make an oscillator. Add friction, and you have a damped oscillator, where the oscillations decrease over time.

      Every oscillator has some natural frequency at which it wants to oscillate. If you give it an extra push at that frequency, you will get much bigger oscillations. That's resonance.
      (4 votes)
  • mr pink red style avatar for user Alexander Cramm
    in what does the formula next to the diagram mean?
    F=Kx,and X(t)=?
    also does Cos stand for the cosine
    (2 votes)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user Bobby1791
      The force applied by a spring on a mass is given by the model F_spring = –kx. "k" is called the spring constant and it is a measure of the stiffness of the spring. "x" is the displacement of the spring from its equilibrium position. The negative sign indicate that the spring applies a force in the opposite direction of the displacement. "x(t)" is the displacement from equilibrium as a function of time. And "cos" is the cosine function.
      (5 votes)
  • aqualine ultimate style avatar for user Aparna A.V
    shouldn't the independant component be on the X axis?
    so,time should be on the X axis,right?
    i'm confused...am i missing something here?
    (4 votes)
    Default Khan Academy avatar avatar for user
  • leafers seedling style avatar for user Dias Lim
    The spring does not rotate, so why does the formula use angular velocity(omega) in the cosine?
    (4 votes)
    Default Khan Academy avatar avatar for user
  • spunky sam blue style avatar for user saiprasadrm
    Can someone explain how we know it's a cos function?
    It could be some other function, where x(t)=1 at t=0, and x(t)=0, at x=1 and so on periodically, right?
    (4 votes)
    Default Khan Academy avatar avatar for user
  • leaf green style avatar for user NONDUDUZO INNOCENTIA
    What is the difference btwn mechanical and non mechanical oscillators?
    (4 votes)
    Default Khan Academy avatar avatar for user
  • leafers seed style avatar for user Hassaanghazali
    Why is there a minus sign in F=kx? Why is it F="-"kx?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • leaf green style avatar for user suraj dubey
    how did u choose directly F=-kX without any specification of this force?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • leafers ultimate style avatar for user Caitlin Fischer
      This is the expression that governs a spring! It's called Hooke's law. It tells us that if you stretch out or compress a spring, a force will act trying to oppose that stretching or compression (which is the interpretation of the negative sign on the right of the equation). We'd thus expect force to act in the opposite direction of any displacement 'x'. The 'k' is just proportionality constant.
      (3 votes)

Video transcript

Let's see if we can use what we know about springs now to get a little intuition about how the spring moves over time. And hopefully we'll learn a little bit about harmonic motion. We'll actually even step into the world of differential equations a little bit. And don't get daunted when we get there. Or just close your eyes when it happens. Anyway, so I've drawn a spring, like I've done in the last couple of videos. And 0, this point in the x-axis, that's where the spring's natural resting state is. And in this example I have a mass, mass m, attached to the spring. And I've stretched the string. I've essentially pulled it. So the mass is now sitting at point A. So what's going to happen to this? Well, as we know, the force, the restorative force of the spring, is equal to minus some constant, times the x position. The x position starting at A. So initially the spring is going to pull back this way, right? The spring is going to pull back this way. It's going to get faster and faster and faster and faster. And we learned that at this point, it has a lot of potential energy. At this point, when it kind of gets back to its resting state, it'll have a lot of velocity and a lot of kinetic energy, but very little potential energy. But then its momentum is going to keep it going, and it's going to compress the spring all the way, until all of that kinetic energy is turned back into potential energy. Then the process will start over again. So let's see if we can just get an intuition for what x will look like as a function of time. So our goal is to figure out x of t, x as a function of time. That's going to be our goal on this video and probably the next few. So let's just get an intuition for what's happening here. So let me try to graph x as a function of time. So time is the independent variable. And I'll start at time is equal to 0. So this is the time axis. Let me draw the x-axis. This might be a little unusual for you, for me to draw the x-axis in the vertical, but that's because x is the dependent variable in this situation. So that's the x-axis, very unusually. Or we could say x of t, just so you know x is a function of time, x of t. And this state, that I've drawn here, this is at time equals 0, right? So this is at 0. Let me switch colors. So at time equals 0, what is the x position of the mass? Well the x position is A, right? So if I draw this, this is A. Actually, let me draw a line there. That might come in useful. This is A. And then this is going to be-- let me try to make it relatively-- that is negative A. That's minus A. So at time t equals 0, where is it? Well it's at A. So this is where the graph is, right? Actually, let's do something interesting. Let's define the period. So the period I'll do with a capital T. Let's say the period is how long it takes for this mass to go from this position. It's going to accelerate, accelerate, accelerate, accelerate. Be going really fast at this point, all kinetic energy. And then start slowing down, slowing down, slowing down, slowing down. And then do that whole process all the way back. Let's say T is the amount of time it takes to do that whole process, right? So at time 0 today, and then we also know that at time T-- this is time T-- it'll also be at A, right? I'm just trying to graph some points that I know of this function and just see if I can get some intuition of what this function might be analytically. So if it takes T seconds to go there and back, it takes T over 2 seconds to get here, right? The same amount of time it takes to get here was also the same amount of time it takes to get back. So at T over 2 what's going to be the x position? Well at T over 2, the block is going to be here. It will have compressed all the way over here. So at T over 2, it'll have been here. And then at the points in between, it will be at x equals 0, right? It'll be there and there. Hopefully that makes sense. So now we know these points. But let's think about what the actual function looks like. Will it just be a straight line down, then a straight line up, and then the straight line down, and then a straight line up. That would imply-- think about it-- if you have a straight line down that whole time, that means that you would have a constant rate of change of your x value. Or another way of thinking about that is that you would have a constant velocity, right? Well do we have a constant velocity this entire time? Well, no. We know that at this point right here you have a very high velocity, right? You have a very high velocity. We know at this point you have a very low velocity. So you're accelerating this entire time. And you actually, the more you think about it, you're actually accelerating at a decreasing rate. But you're accelerating the entire time. And then you're accelerating and then you're decelerating this entire time. So your actual rate of change of x is not constant, so you wouldn't have a zigzag pattern, right? And it'll keep going here and then you'll have a point here. So what's happening? When you start off, you're going very slow. Your change of x is very slow. And then you start accelerating. And then, once you get to this point, right here, you start decelerating. Until at this point, your velocity is exactly 0. So your rate of change, or your slope, is going to be 0. And then you're going to start accelerating back. Your velocity is going to get faster, faster, faster. It's going to be really fast at this point. And then you'll start decelerating at that point. So at this point, what does this point correspond to? You're back at A. So at this point your velocity is now 0 again. So the rate of change of x is 0. And now you're going to start accelerating. Your slope increases, increases, increases. This is the point of highest kinetic energy right here. Then your velocity starts slowing down. And notice here, your slope at these points is 0. So that means you have no kinetic energy at those points. And it just keeps on going. On and on and on and on and on. So what does this look like? Well, I haven't proven it to you, but out of all the functions that I have in my repertoire, this looks an awful lot like a trigonometric function. And if I had to pick one, I would pick cosine. Well why? Because when cosine is 0-- I'll write it down here-- cosine of 0 is equal to 1, right? So when t equals 0, this function is equal to A. So this function probably looks something like A cosine of-- and I'll just use the variable omega t-- it probably looks something like that, this function. And we'll learn in a second that it looks exactly like that. But I want to prove it to you, so don't just take my word for it. So let's just figure out how we can figure out what w is. And it's probably a function of the mass of this object and also probably a function of the spring constant, but I'm not sure. So let's see what we can figure out. Well now I'm about to embark into a little bit of calculus. Actually, a decent bit of calculus. And we'll actually even touch on differential equations. This might be the first differential equation you see in your life, so it's a momentous occasion. But let's just move forward. Close your eyes if you don't want to be confused, or go watch the calculus videos at least so you know what a derivative is. So let's write this seemingly simple equation, or let's rewrite it in ways that we know. So what's the definition of force? Force is mass times acceleration, right? So we can rewrite Hooke's law as-- let me switch colors-- mass times acceleration is equal to minus the spring constant, times the position, right? And I'll actually write the position as a function of t, just so you remember. We're so used to x being the independent variable, that if I didn't write that function of t, it might get confusing. You're like, oh I thought x is the independent variable. No. Because in this function that we want to figure out, we want to know what happens as a function of time? So actually this is also maybe a good review of parametric equations. This is where we get into calculus. What is acceleration? If I call my position x, my position is equal to x as a function of t, right? I put in some time, and it tells me what my x value is. That's my position. What's my velocity? Well my velocity is the derivative of this, right? My velocity, at any given point, is going to be the derivative of this function. The rate of change of this function with respect to t. So I would take the rate of change with respect to t, x of t. And I could write that as dx, dt. And then what's acceleration? Well acceleration is just the rate of change of velocity, right? So it would be taking the derivative of this. Or another way of doing it, it's like taking the second derivative of the position function, right? So in this situation, acceleration is equal to, we could write it as-- I'm just showing you all different notations-- x prime prime of t, second derivative of x with respect to t. Or-- these are just notational-- d squared x over dt squared. So that's the second derivative. Oh it looks like I'm running out of time. So I'll see you in the next video. Remember what I just wrote. just wrote