If the spring extended by x on loading, then the energy stored by the spring is (If T is the tension in the spring):