then energy stored by the spring is (if T is the tension in spring and k is the spring constant).