Maybe you know I like numerical calculations, well I do. I think they are swell. [VPython](http://vpython.org) is my tool of choice. In the post [Basics: Numerical Calculations](http://blog.dotphys.net/2008/10/basics-numerical-calculations/) I used vpython and excel to do something simple. I will do that again today (in that this problem could also be solved analytically). However, there is one big difference. This problem has a non-constant forces. Suppose I have a mass that is connected by a spring to a wall. This mass-spring is sitting on a table with no friction.

There is a very interesting property of springs. The more you stretch them, the greater the force they exert (in the usual model of springs). This model works very well.

This is known as Hooke’s law. I have written it as a scalar for simplicity. The “k” is called the spring constant. It is a measure of how “stiff” the spring is. The value “s” is the amount the spring is stretched. Typically, there is a minus sign in front of the ks to indicate that the force is in the opposite direction that the spring is stretched. Really, in a scalar equation this is rather silly to include (but everyone does anyway).
**Question: What will the motion of the mass be like if I pull it back and then let go?**
Although this can be determined analytically, I am going to first calculate this with vpython. I will try to show all the details so that you can reproduce this also. If you have not already installed [vpython](http://vpython.org), do that now (don’t cost nothing).