Potential energy stored in a spring