Equation For Calculating Energy