With a spring, the force exerted is proportional to the distance the spring is compressed. Therefor a fixed mass would accelerate from a compressed spring proportional to distance rather than time. So, how would you calculate the time for a spring to push a mass a certain distance?
For example, let's say I have a spring that is 20cm long, and it is compressed to 10cm. At that compression it holds enough force to accelerate a constant mass at $10m/s^2$. How would you calculate the time for the spring to fully decompress?
For $a=$ acceleration, $s=$ position, $t=$ time, with subscripts $i=$ initial, $f=$ final, and considering that the offset of the mass at time $0$ is $0$, what I would have is: $a_i = 10 m/s^2$, $a_f = 0$, $s_i = 0m$, $s_f = 0.1m$, $t_i=0$. I also know that for a given offset $s$, I would have: $a_s = a_i * (0.1m-s)/0.1m $ for $s < 0.1m$
But I have no clue how to get $t_f$ or $v_f$ (for $v=$ velocity)
A spring has force given by F= kx where k is a constant and x is the compression. It is also true that F= ma so ma= m(dv/dt)= kx.
But we want the left side depending on x rather than t. The "chain rule" says that dy/du= (dy/dx)(dx/du) so dv/dt= (dv/dx)(dx/dt). But dx/dt IS v so dv/dt= v(dv/dx).
m(dv/dt)= mv(dv/dx)= kx.
That is "separable". It can be separated as mv dv= kxdx. Integrating both sides, $mv^2/2= kx^2/2+ C$ or $mv^2/2- kx^2/2= C$. (You might recognize $mv^2/2$ as "kinetic energy". -kx^2/2 is the "potential energy" for a spring and $mv^2/2- kx^2/2= C$ is the statement of "conservation of energy".