Horizontal spring stiffness coefficient k = 500N / m, use an external force to push the object block, make the spring compress 10cm and stand still, suddenly remove the external force F, the object block is sprung, then how much work does the spring do to the object block? Can there be a specific process?

Horizontal spring stiffness coefficient k = 500N / m, use an external force to push the object block, make the spring compress 10cm and stand still, suddenly remove the external force F, the object block is sprung, then how much work does the spring do to the object block? Can there be a specific process?

Spring elastic potential energy EK = 1 / 2kx ^ 2 = 1 / 2 * 500 * 0.1 ^ 2 = 2.5j
When the external force F is suddenly removed, the block is ejected. At this time, the reduction of elastic potential energy is equal to the work done by the spring on the block, so it is also 2.5j