Motion of a spring
This is the simulation of the motion of a mass m situated at the end of a spring of length l and negligible mass. The motion is restricted to one dimension, the horizontal. (We choose a coordinate system in the plane with origin at the fixed end of the spring and with the X axis along the direction of the spring).
We assume that the reaction of the spring to a displacement dx from the equilibrium point follows Hooke's Law, F(dx) = -k dx , where k is a constant which depends on the physical characteristics of the spring. This, applying Newton's Second Law, leads us to the second order differential equation
d[sup]2[/sup]x / dt[sup]2[/sup] = -k/m (x-l),
where x is the horizontal position of the free end of the spring.
In the simulation we solve numerically this equation and visualize the results.