Use your program for the viscously damped spring to solve this problem. Make sure you change the parameters as specified below.
A mass m=5 kg is attached to the end of a spring with a spring constant of k=15.7 N/m. The mass moves through a viscous damping medium with a damping constant b=1.8 kg/s giving a velocity dependent damping force Fdamp= -bv.
The motion occurs in zero gravity so set the force of gravity to ZERO in your program. Also set the equilibrium position L0=0. The mass is initially motionless and displaced from equilibrium by a distance yinitial=0.2 m.
What is the energy of the spring-mass system at the initial position of the mass?
What is the energy of the spring-mass system when the mass first passes through the equilibrium position?