Why don't we consider the displacement relative to the equilibrium point when calculating the maximum displacement of a mass dropped on spring? I'm doing a homework differential equation homework problem (but my question is regarding basic energy conservation). There is a tldr at the bottom.
A mass is dropped on a spring (spring constant k) from a height h. And I want to find equilibrium position y0 and the maximum displacement ymax measured from the top of the spring in relaxed position downwards.
Here is my approach that seems to be wrong:
To calculate the maximum displacement (if that's the right word?), I first calculated y0. Lets say the ball is just gently placed on the spring, then mgy0 = 0.5k(y0)^2 So y0= (2mg)/k.
Now to calculate ymax when we drop the ball:
mg(h+ymax)= 0.5 k (ymax-y0)
this gives us ymax= (mg(h+1))/(0.5k-mg) when we combine it with the result for y0 from above.
This is clearly false however since if h is zero ymax not equual to y0 (and also not zero).
Tldr: It seems the correct way to calculate ymax for a ball dropped on a spring is to just say mg(h+ymax)=0.5 k ymax. But why? The spring is oscillating around the equilibrium position so shouldnt we measure the displacement for the spring energy from there? (As in the right side of the equation should be 0.5 k (ymax-y0))
Thanks for reading!
 A: Equating gravitational potential energy to spring potential energy gives you maximum dispacement and not the equilibrium displacement. The initial gravitational potential energy of the ball goes into the potential energy of the spring and the ball's kinetic energy. At $y_0$ you will have:
$mgy_0 = \frac{1}{2}ky_0^{2}+\frac{1}{2}mv^2$
Thus the ball will osciallate about the new equilibrium position $y_0$ and when it is at $y_0$ it will have some velocity. Generally, we use forces to find equilibrium positions. Here, if you compress the spring by $y_0$ first and then gently put the ball on top of it in this positon, the spring force will balance the force of gravity and thus the sytem will remain in equilibrium.
$mg=ky_0$
$\therefore y_0=\frac{mg}{k}$
Now at $y_{max}$, all the initial potentential energy of the ball goes into potential energy of the spring. Thus,
$mg(h+y_{max})=\frac{1}{2}ky_{max}^{2}$
h=0 in above equation will correspond to maximum displacement and not equilibrium position.
