# Change in internal energy of a gas at constant volume

According to the first law of thermodynamics, $u=q+w$, where $u$ is changing in internal energy, $q$ is heat liberated and $w$ is the work done in the process.

Now at constant volume, $w=0$, hence $u=q$. Since $q$ is $n\cdot C_v\cdot T$, where $n$ is the amount of substance in mole, $C_v$ is the molar heat capacity at constant volume and $T$ is the temperature change. $u$ comes out to be $n\cdot C_v\cdot T$. However, this expression is valid for all other cases too whether volume is constant or not.

Same is the case with $H=n\cdot C_p\cdot T$. Why so?

The change in internal energy should be written as $\Delta U=nC_v\Delta T$, not $nC_vT$. This equation is valid for any temperature change (irrespective of whether the volume or pressure changes) only for an ideal gas. The equation for the change in enthalpy should be $$\Delta H=\Delta U+\Delta (PV)$$ For an ideal gas, this equation reduces to $$\Delta H=nC_v\Delta T+nR\Delta T=nC_p\Delta T$$ This equation is valid for any temperature change only for an ideal gas.