euler algorithm does not conserve total energy