Calculation of Elastic Potential Energy