Q:

Why does the specific heat of a real gas depends on temperature but not for the ideal gas?

The specific heat of a real gas, unlike an ideal gas, depends on temperature. How can we physically understand this? Thanks.

A:

The heat capacity (specific heat times the mass of the gas) is defined to be how much the internal energy of the gas changes due to changes in temperature, which can be done either at constant pressure
$$
C_P=\left.\frac{\partial U}{\partial T}\right)_P
$$
or at constant volume
$$
C_V = \left.\frac{\partial U}{\partial T}\right)_V.
$$
Notice that both $C_P$ and $C_V$ will be constant if the internal energy $U$ is a linear function of the temperature. This is of course the case for the ideal case, for which
$$
U_{\mathrm{ideal}} = \frac{3}{2}N k_B T,
$$ 
where $N$ is the number of particles (I've assumed monatomic here, but the linear dependence in $T$ is true of diatomic and polyatomic ideal gases as well). Microscopically, this form of the internal energy results from the fact that all of an ideal gas's energy is kinetic. Real gases, however, also have internal energy due to the potential energy of the interactions between particles. So, the total internal energy of a real gas is
$$
U_{\mathrm{real}} = U_{\mathrm{ideal}} + U_{\mathrm{pot}}.
$$
In textbooks, the potential part is often called the "excess" internal energy. The way it depends on temperature is different for every gas, since it depends on the details of their interactions. In general, though, it will not depend linearly on $T$. Then, the heat capacity (either $C_V$ or $C_P$) also has two parts:
$$
C = \frac{\partial U}{\partial T} = \frac{3}{2}Nk_B + \frac{\partial U_{\mathrm{pot}}}{\partial T}
$$
for a montaomic gas.

