# Showing specififc internal energy $e$ is a perfect differential

I am reading a book on Gas dynamics and there is a small section on thermodynamics before the conservation laws of mass momentum and energy are introduced.

The book says

$$p = R \rho T$$ where $R$ is a constant. When that is the case we can write

$$TdS = de + p d (\frac{1}{\rho}) \\ dS = \frac{de}{T} - d(R \log \rho)$$ It follows that $de/T$ must be a perfect differential and therefore a function of $T$ alone. How does this last statement follow?

The first equation is the equation of state for an ideal gas. In case of an ideal gas, the internal energy $e$ is solely a function of temperature $T$. So you do not even need to write second and third equations to arrive at the conclusion of $de/T$ being a function of just $T$. However the general thermodynamic relation (the second equation) says that $e$ is a function of entropy $S$ and density $\rho$. These are called the natural variables of $e$. The other thermodynamic state variables viz. pressure $p$ and temperature $T$ can then be defined as
$$(\frac{\partial{e}}{\partial{V}})_S = -p$$
$$(\frac{\partial{e}}{\partial{S}})_V = T$$
Here $V$ is the specific volume (1/$\rho$)