A block of mass m is attached to a spring of spring constant k. It lies on a floor with coefficient of friction μ. The spring is stretched by a length a and released. Find how many oscillations it takes for the block to come to rest.
d2x/dt2 + k/m x = +_ μg
Also the block will stop when the spring is unstretched and the velocity is 0
The Attempt at a Solution
I tried to write equations for each part of the motion (ie when the frition acts along and opposite to the spring force) but its too messy. Is there another than solving the differential equation for each part of the motion.