total energy = kinetic energy + potential energy