determine the potential energy of the rod.