Consider an ideal spring that has an unstretched length l and a spring constant k. Suppose the spring is attached to a mass m that lies on a horizontal frictionless surface. The spring-mass system is compressed a distance of x_0 from equilibrium and then released with an initial speed v_0 toward the equilibrium position.
What is the maximum distance the spring will be stretched?