Find the temperature change resulting from a free expansion of a gas. Is the heat capacity at constant volume Cv volume independent in this case? I was solving problem 5.18 concerning the free expansion of a gas in Fundamentals of Statistical and Thermal Physics by F. Rief. In this process, the internal energy $E$ is constant i.e. $dE=0$. The first part of the problem is to find an expression for $\big(\frac{\partial T}{\partial V}\big)_E$ in terms of the pressure $p$, temperature $T$, $\big(\frac{\partial p}{\partial T}\big)_V$, and the heat capacity at constant volume $C_V$. (The subscripts of the partial derivatives indicate the variable that is held constant). By writing $E=E(T,V)$ and solving for $dE=0$ it can be shown that
$$
\label{one}
\tag{1}
\bigg(\frac{\partial T}{\partial V}\bigg)_E=\frac{1}{C_V}\bigg[p-T\bigg(\frac{\partial p}{\partial T}\bigg)_V\bigg].
$$

The second part asks for an expression for $\big(\frac{\partial S}{\partial V}\big)_E$, $S$ being the entropy, and by examining the first law $dE=TdS-pdV$ and, again, solving for $dE=0$ one can find
$$
\tag{2}
\bigg(\frac{\partial S}{\partial V}\bigg)_E=\frac{p}{T}.
$$

The last part of the problem is where I am struggling. The question asks for the temperature change $\Delta T=T_2-T_1$ resulting from a volume change from $V_1$ to $V_2$ using parts $(1)$ and $(2)$. Here is how I attempted a solution:




From $(2)$:
$$
p=T\bigg(\frac{\partial S}{\partial V}\bigg)_E \\
\begin{align}
\bigg(\frac{\partial p}{\partial T}\bigg)_V &=\bigg(\frac{\partial}{\partial T}\bigg)_V\bigg(T\bigg(\frac{\partial S}{\partial V}\bigg)_E\bigg) \\
&=\bigg(\frac{\partial T}{\partial T}\bigg)_V\bigg(\frac{\partial S}{\partial V}\bigg)_E+T\bigg(\frac{\partial}{\partial T}\bigg)_V\bigg(\frac{\partial S}{\partial V}\bigg)_E \\
&=\bigg(\frac{\partial S}{\partial V}\bigg)_E+T\bigg(\frac{\partial }{\partial V}\bigg)_E\bigg(\frac{\partial S}{\partial T}\bigg)_V \\
&=\frac{p}{T}+T\bigg(\frac{\partial}{\partial V}\bigg)_E\bigg(\frac{\partial S}{\partial T}\bigg)_V \tag{3}
\end{align}
$$
where in the last step I swapped the order of differentiation assuming $S$ is a well-behaved function.
To find $\big(\frac{\partial S}{\partial T}\big)_V$ I write $S=S(E,V)$. Since the derivative is at constant volume it becomes
$$
\bigg(\frac{\partial S}{\partial T}\bigg)_V=\frac{\partial S}{\partial E}\bigg(\frac{\partial E}{\partial T}\bigg)_V=\frac{1}{T}C_V \tag{4}.
$$
Therefore
$$
\begin{align}
\bigg(\frac{\partial}{\partial V}\bigg)_E\bigg(\frac{\partial S}{\partial T}\bigg)_V &=\bigg(\frac{\partial}{\partial V}\bigg)_E\bigg(\frac{C_V}{T}\bigg) \\
&=\frac{1}{T}\bigg(\frac{\partial C_V}{\partial V}\bigg)_E-\frac{C_V}{T^2}\bigg(\frac{\partial T}{\partial V}\bigg)_E \tag{5}.
\end{align}
$$
Substituting back into $(3)$:
$$
\bigg(\frac{\partial p}{\partial T}\bigg)_V=\frac{p}{T}+\bigg(\frac{\partial C_V}{\partial V}\bigg)_E-\frac{C_V}{T}\bigg(\frac{\partial T}{\partial V}\bigg)_E. \tag{6}
$$
Rearranging:
$$
\bigg(\frac{\partial T}{\partial V}\bigg)_E=\frac{1}{C_V}\bigg[p-T\bigg(\frac{\partial p}{\partial T}\bigg)_V+\bigg(\frac{\partial C_V}{\partial V}\bigg)_E\bigg]. \tag{7}
$$
By comparing $(1)$ and $(7)$ one finds that
$$
\bigg(\frac{\partial C_V}{\partial V}\bigg)_E=0 \tag{8}
$$
or that $C_V$ does not depend on the total volume.


I obviously failed to find a general expression for $\Delta T$, but I arrived at a puzzling result (at least for me). Is it true that $C_V$ is volume independent for any gas if the internal energy is held fixed? Also, how do I proceed to find an expression for $\Delta T$? Is it possible without foreknowledge of the equation of state?
 A: I'm pretty sure that $C_V$ may also depend on the volume and $(8)$ is
not generally true.  The point in your analysis where it goes wrong
is the exchange of derivatives in $(3)$.
You may exchange derivatives like
$$ \left( \frac{\partial}{\partial V} \right)_E \left( \frac{\partial S}{\partial E} \right)_V = \left( \frac{\partial}{\partial E} \right)_V \left( \frac{\partial S}{\partial V} \right)_E, $$
where both partial derivatives are with respect to the same basis, $E$
and $V$.  This is assured by Schwarz's
theorem
as long as the functions are smooth enough.
However, if the derivatives are in different bases, there is no need
why they should commute.  As a purely mathematical example, think of
$$ S = E = T V. $$
Then
$$ \left( \frac{\partial}{\partial T} \right)_V \left( \frac{\partial S}{\partial V} \right)_E = 0, $$
$$ \left( \frac{\partial}{\partial V} \right)_E \left( \frac{\partial S}{\partial T} \right)_V = 1. $$
In general, you can use the chain rule to transform one of the
derivatives into the other's basis, e.g.
$$ \left( \frac{\partial S}{\partial V} \right)_E = \left( \frac{\partial T}{\partial V} \right)_E \left( \frac{\partial S}{\partial T} \right)_V + \left( \frac{\partial S}{\partial V} \right)_T. $$
Then the difference of both orderings follows as
$$ \left( \frac{\partial}{\partial T} \right)_V \left( \frac{\partial S}{\partial V} \right)_E - \left( \frac{\partial}{\partial V} \right)_E \left( \frac{\partial S}{\partial T} \right)_V = \left[ \left( \frac{\partial}{\partial T} \right)_V \left( \frac{\partial T}{\partial V} \right)_E \right] \cdot \left( \frac{\partial S}{\partial T} \right)_V. $$
So, I guess the reason for your strange result is that this difference
is missing.  Also note that a factor $T$ is missing in front of the
last partial derivative in $(7)$.

Regarding how to compute the temperature change in a free expansion,
I'm not sure what the intended solution is.  Without knowing the first
part of the problem, I would have taken the energy $E(T,V)$ as a
function of $T$ and $V$ and solved for $T_2-T_1$.  One could determine
$E(T,V)$ by integrating over its partial derivatives,
$$ \left( \frac{\partial E}{\partial T} \right)_V = C_V \qquad \text{and} \qquad \left( \frac{\partial E}{\partial V} \right)_T = T \left( \frac{\partial p}{\partial T} \right)_V - p, $$
so
$$ E(T,V) = E(T_0,V_0) + \int_{T_0}^T C_V \mathrm{d} T' + \int_{V_0}^V \left[ T \left( \frac{\partial p}{\partial T} \right)_V - p \right] \mathrm{d} V', $$
but I don't really see much connection to the first parts of the
problem.  Perhaps there is a simple way to arrive at the temperature
difference which I'm overlooking.
