If no heat enters the gas, the energy in the gas molecules is decreasing by the same amount. By definition, a gas is ideal when its temperature is only a function of the internal energy per particle, not the volume. So d T = 1 N C v d E , where C v is the specific heat at constant volume. When the change in energy is entirely due to work done on the wall, the change in temperature is given by N C v d T = − − d W = − − N k B T V d V .