Suppose there is a spring with a mass m attached to it, and it is released from rest. It will oscillate, starting from a certain point y0, going back to equilibrium and then down to let's say y2. Let's say in the first case, I call y1 my x = 0 point for the spring. When it passes equilibrium, is it not true that mg = kx since the acceleration is zero? However, let's repeat the case for which i will call the equilibrium point the x=0 for the spring. Now, from energy we have: mgx = kx^2/2. This means that 2mg = kx. How can this be possible?