# Confusion about Joule expansion for ideal gases

We concern the Joule expansion for ideal gases, where the gas is initially kept in one side of the container and the other side is evacuated. Then the partition between the two side is released, letting the gas fill the whole container.

This Wikipedia article argues that the change in internal energy of the whole system is $$0$$, which I agree. Then, for ideal gases, it says that as the internal energy is a function of temperature alone, the temperature must be unchanged (1).

Here is my confusion. By saying (1), the article considers the internal energy of the whole system and that of the ideal gas the same. While this is true for the final state (where the gas has filled the whole container), I don't understand how it works for the initial state (where only one half contain the gas).

• The internal energy of the vacuum (absence of mass of gas) in the other half of the container is zero. Dec 11 '20 at 13:28

After the expansion the internal energy of the entire container is the same except it is now “spread out” over a larger volume for a reduction in the internal energy density, $$U/V$$, and an increase in entropy $$S$$ of the system.
I think of the Joule expansion as a "proof" that the internal energy of an ideal gas is a function of its temperature. Internal energy $$U$$ does not vary since there is no heat $$Q$$ coming out or into the system and there is no work $$W$$ done by the system since the external pressure is always $$0$$. Therefore, $$\Delta U = Q + W = 0$$. Because there isn't a change of the internal energy when there is a change of volume and pressure, $$U = U(T)$$.