# Internal energy and difference in volume at constant temperature

If the volume of a cylinder of a gas is decreased so that the work done on the gas is $W$ and the temperature is kept constant by taking away heat energy $H$.
$\Delta U = -H + W$. Someone told me that if the temperature of the gas is constant does $\Delta U=0$ Which means $W=H$.
But I don't agree to this because

• $U$ is sum of all kinetic AND potential energies of the gas. When volume of the gas decrease the average separation of the molecules decrease which means that average potential energy of the molecules will decrease.
• As temperature, $T \propto E_{k}$ so $E_{k}$ is constant.
• $E_{k}$ is constant but potential energy decrease which means $U$ change.

So is my conjecture wrong?
Note: i am talking about real gases with significant attractive forces.

The internal energy of an ideal gas, which is a model that neglects interactions between particles, can be written only in terms of the number of particles $N$ in the gas sample and the absolute temperature $T$ of the gas: \begin{align} E = \alpha NkT, \end{align} where $\alpha$ is a dimensionless constant. So in the case of an ideal gas, a sample with a constant particle number and temperature will indeed have $\Delta U = 0$. Since in introductory courses one usually only considers ideal gases, confusion often results because particularly astute students such as yourself bring up the precise objections you have.
If one models the gas by including inter-particle interactions, then the above argument fails. Consider, for example, the Van der Waals gas. Its internal energy depends not only on $N$ and $T$, but also on $V$, the volume of the gas, precisely for the reason you outlined.
• The equation $\Delta U = -H+W$ is simply conservation of energy in the context of thermodynamics, and it holds for every thermodynamic system, no matter how it is modeled. On the other hand, the assertion that $\Delta T = 0$ implies $\Delta U = 0$ holds only in cases where the expression for the internal energy of the system depends on more than just temperature. – joshphysics Dec 3 '14 at 17:53