I'm dealing with the isothermal-isobaric ensemble, where the fixed parameters are temperature, pression and particle number: $T,P,N$.

I konw that the expression for the mean value of the volume is easily derived and is given by $\langle V \rangle=-\frac{1}{\beta}\frac{\partial}{\partial P}\log Z$, where $Z(T,P,N)=\int e^{-\beta(H(q,p)-PV(q,p))}\text{d}q\text{d}p$ is the partition function of this ensemble and $\beta=\frac{1}{kT}$ where $k$ is the Boltzmann constant.

My question is if there is a simple expression even for the mean value of the energy.

$ $

My attempt: \begin{gather*} \langle H \rangle=\frac{1}{Z}\int H(q,p)e^{-\beta(H(q,p)+PV(q,p))}\text{d}q\text{d}p= \\ =\frac{1}{Z}\int (H(q,p)+PV(q,p)-PV(q,p))e^{-\beta(H(q,p)+PV(q,p))}\text{d}q\text{d}p= \\ =\frac{1}{Z}\int (H(q,p)+PV(q,p))e^{-\beta(H(q,p)+PV(q,p))}\text{d}q\text{d}p-\frac{P}{Z}\int V(q,p)e^{-\beta(H(q,p)+PV(q,p))}\text{d}q\text{d}p= \\ =-\frac{1}{Z}\int\frac{\partial}{\partial\beta}e^{-\beta(H(q,p)-PV(q,p))}\text{d}q\text{d}p+\frac{P}{Z\beta}\int\frac{\partial}{\partial P}e^{-\beta(H(q,p)-PV(q,p))}\text{d}q\text{d}p= \\ =-\frac{1}{Z}\frac{\partial Z}{\partial\beta}+\frac{P}{Z\beta}\frac{\partial Z}{\partial P} \end{gather*} Am I right? Thank you!

Again, is there any nice expression for $\langle H^2 \rangle$? Reasoning as above (namely writing $H^2=H(H+PV-PV)=...$ and so on) I have found: \begin{gather*} \langle H^2 \rangle=\frac{1}{Z}\frac{\partial^2Z}{\partial\beta^2}+\frac{P^2}{Z\beta^2}\frac{\partial^2Z}{\partial P^2}-\frac{2P}{Z\beta}\frac{\partial^2Z}{\partial P\partial\beta}+\frac{2P}{Z\beta^2}\frac{\partial Z}{\partial P} \end{gather*}

  • $\begingroup$ The volume $V$ does not depend on the $q$ and $p$'s. $\endgroup$ May 16, 2021 at 10:16
  • $\begingroup$ Moreover, the partition function contains an integral over the volume. $\endgroup$ May 16, 2021 at 10:17
  • $\begingroup$ Yes, I know that the partiton function can be written in the form: $Z(T,P,N)=\int Z(T,V,N)e^{-\beta(E+PV)}\text{d}V$, where $Z(T,V,N)$ is the canonical partition function. The volume $V(q,p)$ is simply the volume of the system that corresponds to the microscopic configuration $(q,p)$. My professor uses this convention, however, and this makes sense to me since we have to consider the average of the volume, which is not fixed here. See for example pag 5 and 6 of this pdf: micro.stanford.edu/~caiwei/me334/… $\endgroup$
    – Leonardo
    May 16, 2021 at 10:35
  • $\begingroup$ In no place, in the pdf you linked, I can see $V(q,p)$. It would be a nonsense. The fact that volume is not fixed has nothing to do with its supposed dependency on $p $ and $q$. $V$ is a macrostate variable, separate from the microscopic variables. $\endgroup$ May 16, 2021 at 11:31
  • 1
    $\begingroup$ It is just a matter of terminology but there too there is nothing justifying the possibility of looking at $V$ as a function of position and momenta. What that page is saying is that the individual elements of the ensemble at fixed $P$ have different volumes. In this sense, they call $\hat V$ a microscopic quantity. I would prefer to call it a macroscopic but fluctuating quantity. At the end of the day, the dominant contribution to the averages, for a macroscopic number of particles, comes from macroscopic volumes. $\endgroup$ May 16, 2021 at 15:22

1 Answer 1


Yes your result for $\langle H\rangle$ is correct given you know how to calculate your $V(q,p)$. I have not checked your result for $\langle H^2\rangle$, but the method is valid.

A few comments that might be helpful:

Your calculation uses the classical expression for the sum (i.e. integral) over states. The result is valid quantum mechanically if you replace the classical state sum with the corresponding trace over any complete set and the mathematics is more compact. That is write \begin{equation} \langle H \rangle = \frac{ {\rm tr} \hat H e^{-\beta(\hat H+P\hat V)}}{ {\rm tr} e^{-\beta(\hat H+P\hat V)}} \end{equation} where $\hat H$ and $\hat V$ are the Hamiltonian and volume operators, and the trace is over a complete set of states corresponding to all possible values of the volume. The Hamiltonian you use doesn't have terms that give matrix elements between states with different volume, so the volume and Hamiltonian operators commute and you can take the derivatives with result to $\beta$ and $P$ as you did classically. Your partitiion function is \begin{equation} Z = {\rm tr} e^{-\beta(\hat H+P\hat V)} = e^{-\beta G} \end{equation} where $G$ is the Gibbs free energy. Taking your same derivatives gives the same result quantum mechanically, and therefore also classically.

Thermodynamically the Gibbs free energy can be obtained by Legendre transforming the energy $G = E+PV-TS$, and $\frac{\partial G}{\partial T} = -S$, $\frac{\partial G}{\partial P} = V$. Thermodynamically, $E = G+P\frac{\partial G}{\partial V}-T\frac{\partial G}{\partial T}$, which is a check for $E = \langle H\rangle$.

As to using $V(q,p)$, I agree with GiorgioP that in the end the dominant contribution to the averages is the macroscopic $V$. The only way that I can see to calculate your $V(q,p)$ is to formulate the problem in the usual way with a volume integral, change variables from $q_i$ to $x_i = q_i/L$, with $L=V^{1/3}$ for a cubic box. Now all the volume dependence of the integrand can be put in the exponent. In the usual case, the $q$ and $p$ integrals are done, and the volume integral is a product of the increasing function like the $V^N$ from the change of variables and the decreasing functions of $V$ in the exponent which give the usual result of $V$ strongly peaked around the macroscopic value. Assuming this same situation occurs for the volume dependence and the integrand at fixed $p$ and $x$ values this peak of the integrand as a function of $x$ and $p$ would define a $V(q,p)$. This seems to me to be much more complicated than the usual method of simply keeping the $V$ integral, but if it goes through for your Hamiltonian it would be correct.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.