This is a translated excerpt from a highschool project (SRO) on this very topic.
In this post, I’ll account for a method for modelling the motion of a weight hanging freely in a spring. In this post, we’ll only consider the case, where the damping factor of the spring is 0, because that’s easier to model (in a future post, we’ll consider the case where damping factor is >0).
Looking at a weight hanging in a spring, we get the following diagram:
Since the weight is in equilibrium, the upward force from the spring must be equal to the force from the gravity. The force of gravity acting on the weight is just . According to Hooke’s Law, the force of a spring is given as , where is some constant and is the distance the spring has been stretched. Using this knowledge we get the identity , which can also be expressed as .
We observe that at given time , the upward force of the spring is , where is the distance to the equilibrium point, and is the extra distance the weight has moved relative to . This means the net force at any given time of the weight is , which is also the same as , and using our previous identity we simply get .
We know the force of any given time on an object is given as . This can also be expressed as . This allows us to derive that . Simplifying this expression, we get .
This is just a linear second-order differential equation, which we solve and allows us to get the equation describing the motion of the spring. We get .
Great, we now have a method for describing the weight’s motion, but what about those nasty constants? We observe that , since the weight has been stretched a distance of from its equilibrium, when released. This means that . Because , and because the , we get .
Excellent, now we’ve found , but what about ? To do this, we look at the derivate of this function. We get . Let’s look at the initial acceleration of the weight. We get . Simplifying this expression we get .
We now have a complete equation describing the motion of the weight:
This is part of a high school project, which can be read here (in Danish): https://dl.dropboxusercontent.com/u/19633784/sro.pdf
Now, time for the fun part. We model this in Flash, and get the following simulation: https://dl.dropboxusercontent.com/u/19633784/simulation.html
Here is a screenshot from the simulation: