Spring-Mass Motion Equations


Spring-Mass Motion Equations

Hope
Today we’re modeling a spring and attached mass with a second-order differential equation. Picture a mass on a horizontal surface, attached to a wall by a spring. We’ll call its position x, and we’ll track how that position changes over time.

Maria
First we need a coordinate system. Let x equal zero when the mass is at its natural equilibrium position. Moving to the right is positive x, and moving toward the wall, to the left, is negative x.

Hope
So if the mass moves back and forth, x will alternate between positive and negative values, crossing zero whenever it passes equilibrium. That suggests an oscillating position function, but to find that function we need a differential equation.

Maria
And the starting point is Newton’s Second Law: total force equals mass times acceleration. If x is position as a function of time, then x prime is velocity and x double prime is acceleration. So the equation will connect the forces on the mass to m times x double prime.

Hope
There are two main forces in this model. The spring’s restoring force is negative k times x, where k is a positive constant. It points opposite the displacement, pulling the mass back toward equilibrium.

Maria
That’s Hooke’s law from the spring’s point of view. The force needed to displace a spring is proportional to the displacement, often written as kx. But the spring’s restoring force acts in the opposite direction, so it’s written as negative kx.

Hope
The second force is damping, written as negative c times x prime. Since x prime is velocity, the damping force is proportional to the speed and opposes the motion. On a tabletop, you can think of it as friction: more friction means more damping.

Maria
The damping coefficient c can be zero if there’s no damping, or positive if the motion is being impeded. Put the forces into Newton’s law, move everything to the left, and—when there’s no outside force—we get m x double prime plus c x prime plus kx equals zero.

Hope
Here m and k are positive, and c is nonnegative. If something external, like a motor, applies a force, we put that forcing function on the right-hand side instead. Then the equation is nonhomogeneous rather than homogeneous.

Maria
This is a second-order linear differential equation with constant coefficients, so we can use the methods we already know. The characteristic equation for the left side is mr squared plus cr plus k equals zero.

Hope
Its roots are r equals negative c, plus or minus the square root of c squared minus 4mk, all divided by 2m. The discriminant, c squared minus 4mk, tells us what kind of roots we have—and that root type tells us what sort of motion to expect.

Maria
If there’s a forcing function, we still start with the homogeneous solution from those roots, then add a particular solution. But our main focus is how changing the damping changes the spring’s behavior.

Hope
Let’s begin with no damping: c equals zero. The roots simplify to plus or minus i times the square root of k over m. If we call the square root of k over m omega, those roots are plus or minus i omega.

Maria
Pure imaginary roots give sine and cosine terms, so the mass oscillates back and forth. With no damping to drain away the motion, that oscillation continues rather than settling toward equilibrium.

Hope
Here’s a concrete example. Suppose the surface is frictionless, the mass is one kilogram, and a six-newton force stretches the spring 1.5 meters. Hooke’s law gives six equals k times 1.5, so k equals four.

Maria
That means m is one, c is zero, and k is four. With no external force, the equation becomes x double prime plus 4x equals zero. Its characteristic equation is r squared plus 4 equals zero, so the roots are plus or minus 2i.

Hope
The mass is released from rest one meter to the right of equilibrium. So x of zero is one and x prime of zero is zero. The general solution is c one cosine 2t plus c two sine 2t, and applying those initial conditions gives c one equals one and c two equals zero.

Maria
So in this example x of t is cosine 2t. That’s a clear picture of undamped motion: the position keeps oscillating around equilibrium.

Hope
Now turn on a small amount of damping while keeping m equal to one and k equal to four. Take c equal to one. The discriminant is 1 minus 16, which is negative, so the roots are complex: negative one-half plus or minus i times the square root of 15 over 2.

Maria
For complex roots, the solution has an exponential factor multiplied by sine and cosine terms. Here it looks like e to the negative t over 2 times a combination of cosine and sine with frequency square root of 15 over 2.

Hope
The sine and cosine terms mean the mass still oscillates. But the exponential factor shrinks toward zero as time increases, so the oscillations get smaller and the mass eventually returns to equilibrium. That’s underdamping: oscillation that gradually dies away.

Maria
As we increase c, we reach a special boundary where the discriminant equals zero. That is c squared equals 4mk. The characteristic equation then has a repeated real root, negative c over 2m.

Hope
For our mass of one and spring constant of four, that boundary happens when c equals four. The characteristic equation becomes r squared plus 4r plus 4 equals zero, or r plus 2 squared equals zero.

Maria
A repeated root gives a solution of the form e to the negative 2t times the quantity c one plus c two t. There’s no sine or cosine here, so the motion doesn’t oscillate.

Hope
That’s critical damping. The exponential factor makes the motion die away toward equilibrium, and the remaining factor is linear in time. Depending on the constants set by the initial conditions, the mass can approach equilibrium from one side, or cross it once and then approach from the other.

Maria
That one crossing is called overshoot. But unlike the back-and-forth movement in underdamping, critical damping doesn’t produce repeated oscillations.

Hope
Increase the damping a little more, to c equals five, and we’re overdamped. The characteristic equation is r squared plus 5r plus 4 equals zero, which factors into r plus 1 times r plus 4. The roots are negative one and negative four.

Maria
The solution is c one e to the negative t plus c two e to the negative 4t. Both exponential terms decay, so the mass returns to equilibrium. And because there are no sine or cosine terms, it doesn’t oscillate.

Hope
Depending on the constants, it may approach from one side or overshoot equilibrium once. So critical and overdamped motion can look similar: both settle without repeated oscillation, and both can cross equilibrium at most once.

Maria
There is an important difference, though. Critical damping is the version that returns to equilibrium fastest. With more damping than that, the system is overdamped and settles more slowly.

Hope
So the four behaviors line up with the roots: no damping gives pure imaginary roots and continuing oscillation; underdamping gives complex roots and decaying oscillation; critical damping gives a repeated real root; and overdamping gives two distinct real roots.

Maria
And for both critical and overdamped motion, the position tends toward zero without ongoing oscillation. Critical damping is the fastest return to equilibrium among those non-oscillating cases.

Hope
Let’s finish by adding an external force. Keep m equal to one and k equal to four, set c to one-half, and apply a forcing function cosine t. The equation is x double prime plus one-half x prime plus 4x equals cosine t.

Maria
The characteristic roots are negative one-quarter plus or minus i times 3 square root of 7 over 4. So the homogeneous part has a decaying oscillation, just like an underdamped spring without forcing.

Hope
To account for the external force, we add a particular solution. Using undetermined coefficients gives 12 over 37 cosine t plus 2 over 37 sine t. The full motion is the homogeneous solution plus that particular solution.

Maria
At first, both parts contribute: the spring’s natural, damped motion and the response to the external cosine force. As time goes on, the homogeneous part decays away, but the particular solution does not.

Hope
So in the long term, the motion follows the behavior described by the particular solution—the spring’s response to the external forcing. That completes the picture: the differential equation models the forces, its roots classify the natural motion, and a forcing function adds a lasting driven response.

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