Spring energy and potential energy