Energy absorbed and held in the spring can be derived using Hooke's Law to compute the restoring force as a measure of the applied force. This requires the assumption, sufficiently correct in most circumstances, that at a given moment, the magnitude of applied force.