Spring-Mass Motion Equations
Transcript
In this video we are going to look at how to model the motion of a spring mass system using a second order differential equation. The context here could be a horizontal spring mass system, where a wall is on the left and the mass is on the right. Let's call the position coordinate x, and the position of our spring might be changing over time, so we are ultimately looking for x as a function of time. To give our coordinate system here a sense of orientation when the mass is at its natural resting state, let's call that x = zero. When we move our mass to the right, that will be +x, and when we move it to the left, in the direction of the wall, that will be -x. If our mass were say oscillating back and forth, what we would expect is our position function to be positive, and then zero every time it crosses equilibrium, and then negative and then zero again, and positive and negative. So we might see some kind of oscillating function over time.
That's one possibility for the spring mass system. Although can we get to that function x of t. We get it by solving a second order differential equation. Our equation's going to come straight from Newton's Second Law, which is force. The force acting on the spring is equal to its mass times its acceleration. If x of t is the position function, then x prime is the velocity, and x double prime is the acceleration. So I can write that the total force acting on this spring is equal to its mass times the second derivative of the function x of t. There are two forces that we want to consider acting on this spring. Let me write them down and then I'll explain what they are. Every spring has the first one, and we are going to write that as -k, where that's a positive constant times the position x. So that's just -k times x. Some springs including four of this video's five examples will have another force which we will write as -c times the velocity x prime.
Okay, so let's talk through what these are. The first one always happens, and this is what we call the restoring force. This is like Hooke's law, slightly different perspective. Let me explain what I mean by that. Typically when we talk about Hooke's law, we say it from the point of view of the amount of force required to displace a spring is proportional to the amount of displacement. That's often stated as force equals k times x, where x is the amount of displacement, and k is the constant of proportionality. Here I've got a negative sign because what we're going to say here is that the spring when it's being displaced experiences an equal amount of force in the opposite direction, which is the restoring force trying to pull the spring back to equilibrium.
The other term we have here is really the focus of this video. This is called Damping. I like to think of it as a force that slows the spring down. So x prime is the velocity. C is going to be a constant of proportionality. So the effect from damping is proportional to the velocity, and it's working against the motion. So again, we have another negative sign here. So damping is something that impedes your motion in the context of a horizontal spring mass system sitting on some tabletop.
I like to think of it as the friction. So if you have no friction, then there would be like no damping. If you have a lot, something is, you know, the friction with the table is working against the motion of the spring. So that's something that you could characterize in this way. Damping is characterized a little bit differently in other systems, but we won't go into that. Let's now move everything to the left-hand side. We have the mass times, the acceleration plus this damping term, plus kx,
equals zero in the absence of external forcing. So if we're just looking at the spring's natural motion, this would be the second order linear differential equation with constant coefficient though characterize the spring's motion. Here m and k are positive. And then damping is greater than or equal to zero because it's possible that your spring experience has no damping. We'll also have one example where there's actually an external forcing function that we would put on the right-hand side. So this equation doesn't have to be homogeneous, but the way I've written it for now it is. On the next slide, what we're going to do is summarize these examples, and then since this is a second order linear differential equation with constant coefficients, we know how to start solving this type of equation. It's going to amount to looking for say, the roots of the characteristic equation. What we're going to do is work through several examples looking really at the effect of this damping term.
For each one, we will jump pretty fast to the solution. Okay, the first one is going to be like a whole big word problem and I'm going to work out a lot of details, but then for examples two, three, four and five, we will jump pretty quickly to the form of the solution because ultimately we want to say what does the damping indicate about the long-term behavior of our spring? So what would we observe the spring do? For each example, I have a movie so that you can animate the spring and see, you know, what you would actually expect the spring's behavior to look like. All right, to summarize what we just discussed, the second order differential equation for the motion of a spring mass system is the mass times the acceleration plus the damping coefficient times the velocity plus k, where that's like the Hooke's law constant times the position equals the right-hand side, where that could be zero. I'll say often zero, or it could be some forcing function.
This is a second order differential equation with constant coefficients on the left-hand side. We've studied these before. We know how to solve them. If the right-hand side is zero, we're just looking to write down the homogeneous solution. If the right-hand side is non-zero, if we do have a forcing function over there, we would be looking for the homogeneous solution, as well as a particular solution. That means in either situation that the first thing we want to do is find the roots for the left-hand side so that we can write down the homogeneous solution. So what's the characteristic equation here? It's going to be mr squared plus cr plus k equals zero. That's like the associated characteristic equation for the left-hand side. This gives us the roots that we need in order to write down the homogeneous solution. The roots are going to look like r equals -c plus or minus the square root of c squared minus 4mk, divided by twice the mass.
Again, while we have a physical situation here that we're trying to model, the mathematics is something that we've already studied. So the idea now is once you've found these roots, you know what the form of the homogeneous solution is going to look like. It depends on whether or not these roots are real and distinct, real and repeated, pure imaginary or complex. Each one is going to translate into a different type of motion for the spring. So that's what we're going to focus on today. It's not really solving these equations. For each one I'm going to give you a really quick outline of what the solution is for each example that we have. We're going to focus on what it tells us about the motion of the spring over time. The types of roots that we find from the characteristic equation matches up with one of four possible types of spring behavior. So these are the four ways to classify the motion of the spring. The first one is no damping whatsoever,
so there's no force acting to impede the motion left and right. You can imagine already what that spring is going to look like. It's just going to oscillate back and forth forever. All right, let's say what that would match up with, if there's no damping, like no frictional-type force acting against our motion, that's like having that coefficient c equal to zero. So c is zero. That means that our roots are now going to be plus or minus the square root of -4mk divided by twice the mass.
We can write this a little bit differently. So -4 can be 2i, so I'll write plus or minus 2i square root of m, square root of k. Just bear with me for a second. Why did I do that? Over 2m. Okay, the twos cancel out. And then I'm also going to say that square root of m over m is like one over the square root of m. So this is plus or minus I times the square root of k over m. And then why am I doing this? This number here is often called omega. It's the square root of k divided by m,
so that these roots are pure imaginary, and they're often described as plus or minus i omega. So this is the kind of roots that you would find if your spring has no damping against the motion, and we already know what that's going to look like. It's going to look like sines and cosines because this spring is going to just oscillate back and forth forever. Okay, let's turn on the damping. Underdamping, critical damping, and overdamping go with increasing levels of that coefficient c. So this first one is like c is very small, in which case the discriminant, that leading term c squared, is maybe not very large, so that overall c squared minus 4mk is negative. So this is what we will associate with complex roots. Alpha plus or minus i beta, I'll just write it like that, increase the coefficient c a little bit more. So we'll be in the complex roots regime for a while. If we increase it, increase it, increase it all the way to the moment when c squared -4mk equals zero,
then we would have a real repeated root. In fact, we can say what it is. It would be -c divided by twice the mass, because the discriminant would be zero, so that whole square root term goes away. Increase it a little bit more. Right so there's like this moment when the discriminant is zero, and then if we kept increasing c, that discriminant turns positive. That brings us to what we call overdamping, and this is real and distinct roots.
We are going to have an example of each of these. So our first example, we will imagine a spring mass system which only experiences a restoring force and that's it. We'll identify the coefficients in the problems. I'm going to give you kind of like a big word problem and we'll figure out how to set up the mass and the coefficient k in order to write down the equation for x of t over time. So where as x is a function of t. It's going to look like sines and cosines, because our roots here are going to be pure imaginary. Then again, we'll essentially turn on the damping, but with a low damping number that will bring us to complex roots. We will increase that just to this moment where we have critical damping. That's the moment when you get real repeated root. This is the real repeated root. Then we'll increase c a little bit more to have real and distinct roots. For each spring that we look at, we're going to have the same mass and the same constant k.
It's just going to be c that changes. We will finish with an example where we have the same mass and k, and I'll give you a different coefficient c, and we'll put a right-hand side that has a forcing function on it, just for fun. This first example is going to be our only kind of lengthy description of what's going on with the spring here. After this we will just start with the equation, but let's read through this description of the spring and kind of extract out of it the information
that we need in order to write down the second order differential equation for this particular spring. We are told that this spring is on a frictionless horizontal surface, and it has a massive one kilogram attached to it. So just from that I know that we are in a situation of having no damping force. So our coefficient c is zero and then the mast is one kilogram. All right, so that's two out of the three coefficients that we need. We are also told that when you apply a force of six newtons,
you stretch the spring by 1.5 meters. So that's here. This is going to help us solve for the missing coefficient k using Hooke's law. So from Hooke's law, we know that the force needed to move the spring is equal to that constant of proportionality k times the amount of displacement. So that's six equals k times 1.5. This tells us that k is six divided by 1.5. That's like 60 divided by 15, so that's four. All right, so we have m, c, and k. We can now say that the spring has
a second order equation that looks like 1 times the acceleration plus, let me write it all down. So 1 times the acceleration plus zero times the velocity plus 4 times the position equals zero because there's no external motor acting on this spring. All right, so a little bit more concisely. We are looking at x double prime plus 4x equals zero. Let me pause here and just let you catch up, if you're still working out those numbers. See if you agree with the second order equation
based on the information that we have in that first paragraph. All right, let's keep going. We know that x double prime plus 4x equals zero. This gives us roots that look like, let's see, the characteristic equation is r squared plus 4 equals zero. R squared is -4 tells us that the roots are pure imaginary as expected because we're in a situation where there's no damping, and the roots are plus or minus 2 times i. Okay, we're also given initial conditions, so we are told that the spring is released from rest from a position one meter to the right of equilibrium. From rest means that X prime of zero is zero. It wasn't given like an initial push or anything like that, it was just released from rest. And then one meter to the right means that the initial position is one. So initial position is 1
and initial velocity is zero. With that, we can actually write down the equation of the spring over time. So let's see if we can set it up down here. We know that in general the position function x of t, based on the quality of the roots that we have, going to be c1 times cosine of 2t plus c2 sine of 2t to go ahead and differentiate the velocity is then -2c1 sine of 2t plus 2c2 cosine of 2t. All right, we have the two initial conditions that we need here to find c1 and c2.
When the time is zero, the position is 1. So X of zero is 1. Plugin zero over here though, cosine of zero is 1, sine of zero is zero. So actually immediately we know that c1 is 1. X prime of zero, the initial velocity is zero. C zero, so that's going to be 2c2. Okay, so that tells us that c2 is zero. Overall the position of the spring, it's actually just a cosine function. It's going to be cosine 2t. All right, now we have our position function x of t for this particular spring.
What I'm going to do for this spring and all of the future springs in this video is I'm going to step away and put up a video made in MATLAB where the top graphic, it'll be pretty clear, it's a video of the spring itself. So I will simulate what the spring looks like for each one released from a position of one unit to the right from rest. You'll see how the spring behaves over time, in that top maybe. The graphic on the bottom is going to trace out the position function over time. So the horizontal axis will be the independent variable t, and then the vertical axis will be for this dependent variable x, x of t. So you'll see this cosine wave get traced out as the spring oscillates back and forth. In our first example was undamped motion. Let's take a look at under damped motion. So here I have the same mass and Hooke's law constant, 1 and 4 respectively, but I have this damping coefficient now, c equals 1. We know how to solve this kind of second order equation,
so let's write down the roots and then the general form. So our roots just from the quadratic equation, they're going to look like r equals -1 plus or minus the square root of 1 squared minus 4 times 1 times 4, so minus 16, all over twice the mass. That discriminate is negative. We're going to have complex roots. We break this into real and imaginary parts. We have -1/2, that's the real part, plus or minus i times a square root of 15 over two. Okay, so this is like alpha
plus or minus i beta, okay? We know immediately what the general solution to this looks like. Our general solution is going to be x of t equals e to the alpha t, so that's e to the -1/2t. I'll write -t over two times c1 cosine of square to 15 over 2t plus c2 sine, square to 15 over 2t. Not going to put initial conditions on this. I don't think it's a good use of our time to start solving for c1 and c2. I'd rather look at this general form. What is this telling us about the motion
of this spring over time? Well over time what happens as t goes to infinity? Okay, this is sine and cosine, so this expression is bounded, it's just going to oscillate, but this is going to zero. (marker cap snaps) So this leading term drives the whole right-hand side to zero, as time goes to infinity. What that means is that long term, if we were watching this spring, we would expect it over time to return to equilibrium. Its natural resting state. That's something that we didn't see
with the first example when we looked at that undamped motion of the spring just going back and forth. However, this spring does have something in common with that first example. It has sines and cosines in it. This is going to cause oscillation. Okay, that's all I want to say about this example. So let me step aside and put up those same MATLAB movies, but for this spring. I don't have initial conditions on this slide, but for all of the future examples it's going to be the same as what we just looked at. So I'm going to have the initial position of 1 released from rest just so you can compare it to the first movie that we watched.
All right, we've seen undamped motion and underdamped motion. Now what we're going to do is keep m and k the same, but I've bumped c up from 1 to 4. I claim this is going to call something different. So let's look at the characteristic equation for this differential equation. The characteristic equation is r squared plus 4r plus 4 equals zero. This actually factors into r plus 2 squared equals zero. So our root is -2, and that's repeated. Again right from the roots, we can go to the general form of the solution. x of t is going to be c1e to the -2t, but since this is a repeated root situation, the other component looks like c2te to the -2t. And that's fine in that form. I think I'll write it one more time, factoring this exponential in front, e to the -2t c1 plus c2t. Where c1 and c2 would be determined by initial conditions
that I don't want to specify in this moment. All right, what's going to happen to this spring over time? Well, as t goes to infinity, you know this term grows but this is really going to be dominated by this exponential term. So as t goes to infinity, this leading exponential is going to drive everything to zero. So that dominates. The rest of this spring's behavior for me is really characterized by what's not present in this expression. Notice there's no sign of cosine here.
This is an expression that's an exponential times a linear looking component. Nothing here causes oscillation. So there's no oscillations. This is not a spring that you would watch kind of move back and forth, like we saw in the first two examples. There's really just two possibilities for what its motion would look like, and it depends on the values of c1 and c2. So if I solve for when this expression would be zero. It's zero if t can take the value -c1 over c2, which may or may not happen depending on c1 and c2.
So it's possible that this expression is always 1 sine. It could be positive and stay positive forever, multiplied by this positive exponential, which is decaying to zero. That would be like watching the spring just decay towards a equilibrium from the right. It can be zero exactly once. So there if it's ever zero, it's zero exactly once. So we can imagine moving from the right crossing zero, and then never getting to zero again. That would be like going from the right side to the left,
and then decaying towards equilibrium from the left. That's called overshoot. So this may overshoot exactly once. So with critical damping we do not oscillate and either we just decay to equilibrium like from one side the whole time, or we overshoot exactly once. That's it, you don't see that kind of back and forth motion that you might think of when you kind imagine watching a spring. So let me step aside so that you can see a movie of what critical damping looks like.
All right, for this fourth spring, keeping everything else the same, I increase the damping coefficient from 4 to 5. This is going to bring us into the overdamped situation. Here, the characteristic equation is r squared plus 5r plus 4 equals zero. This factors, we can write this as r plus 1 times r plus 4. So the roots for the characteristic equation are -1 and -4. With that information we can immediately write down the form of the solution. So the position over time is going to be c1e to the -1t. I'll just write e to the -t plus c2e to the -4t. Okay, take a look at that and decide what will happen to the spring over time.
All right, if t goes to infinity, both of these exponential expressions will go to zero. So just like with underdamping and critical damping, we know that the position is going to go to zero, as time goes to infinity. We expect to see this spring return to its equilibrium state. These are exponentials, there's no sine or cosine. So just like with critical damping, there's not going to be any oscillation back and forth, like we had with underdamping and also no damping. So no oscillation.
And then once again, depending on the values for c1 and c2, it's possible for this right-hand side here to be zero exactly once. So it might always be 1 sine or it could be zero once. In other words it may overshoot equilibrium exactly one time. It's not going to oscillate, so you won't see it overshoot equilibrium more than once, at most one time. All right, so once again, I'm going to show you now a MATLAB movie of this spring with its position function over time with the same initial conditions that we already had, so starting one unit to the right released from rest. You might feel like you've already seen this movie before. So I'm going to come back and talk through the difference, if there is any,
between critical damping and overdamping. Okay, so watching that movie, you may have had a sense of déjà vu because it looked a lot like the critical damping example. And that's not too surprising because these three observations are the same as the observations that we made for critical damping. So if you sat down a real spring in front of me and it behaved in that way, and you asked me, "Is this critical damping or overdamping?" I wouldn't be able to know just watching one particular spring.
But there is something special about critical damping. Critical damping is the version of this behavior that returns you to equilibrium the fastest. So it's like the springs might behave qualitatively the same way, but critical damping is going to appear to get to equilibrium faster than overdamping. In order to illustrate that, I'm going to put up a movie, kind of like what we've been watching, but I'm going to have three springs, kind of side by side for comparison. The one on the bottom has been critically damped. The one over it, in fact, it's the one that we already saw, and then we have this spring in the middle. And then the top spring I'm going to take the damping coefficient and make it eight, just to exaggerate the overdamping a little bit more. I will release those springs from a few different initial conditions just so you see a few different scenarios including not overshooting, overshooting.
And what you'll observe is that the critically damped spring should return to equilibrium the fastest. It might be a little hard to distinguish in a couple of the examples, but I think if you look at all of them altogether, it's pretty clear that the critical damped scenario is the one that seems to settle back towards the natural spring length faster than the overdamping.
Let's wrap up this lesson with one example of a spring, which is experiencing an external forcing, kind of like a motor or something like that, which is also going to affect its motion over time. This is a second order differential equation with constant coefficients, which is non homogeneous. We solve it just like we've always solved these, meaning I'm going to find the homogeneous solution and then the particular solution. Again, the focus here is really on spring behavior, so I did all of this on paper. I'm just going to kind of write it down, if you'll permit me, but it's going to come down to roots and particular solution. What are the roots? It's going to be -1/2 plus or minus the square root of 1/4 minus 16 over two. So same mass and spring constant that we've seen before. Here I decrease the damping down to 1/2. So it's not too surprising that the roots here are going to be complex. We're looking at an underdamped spring. Okay, so this is like -1/4
plus or minus i over 2, square root of 15.75. 1,575 is actually divisible by 25, and I think other perfect squares. So as I worked this out, it had a nice final presentation that looked like -1/4 plus or minus i times 3 square to 7 over 4. Okay, so you can see if you can do the algebra that gets you to that. We have these complex, so the homogeneous solution is going to be e to the -t over 4, times c1 cosine of 3 squared to 7, over 4t, plus c2 sine of that. So 3 squared to 7 over 4t.
Okay, the values here aren't too interesting. What is interesting is that this is an underdamped spring. So we expect it to decay to equilibrium with oscillation in the absence of this forcing on the right-hand side. So you could think of this like the natural spring motion without forcing. However, this is not a homogeneous equation because we do have this external forcing of cosine of t. If you apply the method of undetermined coefficients, I think I have the solution here,
not really going to go through the method in this video. Okay, so if you apply the method of undetermined coefficient, you get that the particular solution is 12 over 37 cosine of t, plus 2 over 37, sine of t. Oops, sorry, I said y by habit. This should be x. And it should be the particular solution with respect to t. Okay, there, that looks better. The motion of this spring over time is the sum of the two. So I'm not going to write the whole thing out,
but our solution is the sum of the homogeneous solution that's like the natural spring motion. Sorry, I'm getting a little turned around here with my variables, so this is time plus the particular solution. Okay, so what happens to this spring over time? Well, in the beginning, both of these solutions are present. So when t is not too large, this is not like close to zero yet. So we have this acting on our spring, or displaying how our spring moves. But then we also have this.
As t goes to infinity however. This is going to drive the homogeneous part to zero, but there's nothing about the particular solution that decays to zero. So as t goes to infinity, eventually the homogeneous motion drops out, and all we would see is the behavior of our spring driven by that external forcing cosine of t. So I'm going to put up the movie now to go along with all of the other movies. And I'm not going to come back, so I'll leave you just with this movie of the spring. It's going to look really weird, not like a spring that you've probably ever seen, you know, in your life before. Because when have you ever seen a spring that has this kind of cosine of t motor acting on it? In the beginning, the behavior, again, it just looks weird because it's a combination of the natural spring motion and this. So like when these two get added together, it doesn't look like normal oscillation, but you'll see that after a few seconds have gone by, this essentially is decayed
and you're left with something that looks much more like regular oscillation because the springs motion is going to follow the motion given to us by this particular solution. Okay? So I'll leave you with that video. I hope you enjoyed this look at springs, and thanks for your attention.

Ask anything
We've read this whole study set, so questions about it get the best answers.