My textbook points out the following predicament, and I do not know the answer, despite a lot of thinking:
A spring is hanging of a ceiling and a mass is attached. As a result the spring descends to a lower equilibrium point, crossing (vertical) distance $x$ .
The potential gravitational energy of the mass was $mgx$ . Once at the new equilibrium point, this $mgx$ is now $0$ .
The spring's potential energy is $\frac{1}{2}kx^2$ . However, we know that in this scenario $kx=mg$ , as it was gravity that provided the force.
Thus the spring's potential energy, which is actually $\frac{1}{2}kx^2$ , can be rewritten as $\frac{1}{2}mgx$ .
How come that only half of the original potential gravitational energy was converted into the spring's potential energy? Where did the other half go? Was the law of conservation of energy broken?
(the above was translated to the best of my abilities: I hope it is as clear as in the original!)