# Stat mech derivation: Covarience of energy and pressure

• swmmr1928
In summary, the conversation discusses a homework problem involving the canonical ensemble and proving an equation related to covariance and the average values of energy, internal energy, microstate pressure, and average pressure. The equations relevant to the problem include the microcanonical pressure in terms of energy and the expression for the microcanonical pressure in terms of volume. The conversation also suggests using substitutions and calculating the partial derivative of the logarithm of Q with respect to volume to solve the problem. However, it is noted that it may not be possible to solve the problem using just thermodynamic relations and instead requires considering averages and microstate distributions.
swmmr1928

## Homework Statement

Prove for the canonical ensemble
##\overline{(E-U)(p-\overline{p})}=kT[(\frac{\partial U} {\partial V})_{N,T} + p]##

Left hand side is covariance
E is energy
U is internal energy, average of E
p is microstate pressure
$$\overline{p}$$ is average pressure
V is volume
N is number of particles
T is temperature

## Homework Equations

##P=-\frac{\partial{U}} {\partial{V}}##
##P=kT(\frac{\partial{ln Q}}{\partial V})##
##U=kT^2(\frac{\partial{ln Q}}{\partial V})##

## The Attempt at a Solution

##\overline{(E-U)(p-\overline{p})}=Cov(E,p)=\overline{E*p}-\overline{E}*\overline{p}=\overline{E*p}-U*\overline{p}##

##\overline{E*p}=?##

Last edited:
##E(E*P)=\sum\nolimits_{i=1}^n E_i P_i p_i = U \sum\nolimits_{i=1}^n P_i=U*P##
Because
##U = \sum\nolimits_{i=1}^n E_i p_i##

##U(p-\overline{p})=kT[(\frac{\partial U} {\partial V})_{N,T} + p]##

hi there! in the first equation:
$$\overline{(E-U)(p-\overline{p})}=kT[(\frac{\partial U} {\partial V})_{N,T} + p]$$
the ##p## on the right-hand side should really be a ##\overline{p}##. Also, for the relevant equations, I agree with:
$$P=kT(\frac{\partial{ln Q}}{\partial V})$$
(and to keep your notation consistent, maybe it's best to just call it ##\overline{p}##). But I think the equation for ##U## is very suspicious:
$$U=kT^2(\frac{\partial{ln Q}}{\partial V})$$
I don't trust this at all, since it would imply that the internal energy is simply the average pressure, multiplied by temperature.

Anyway, for the actual answer, you've written
$$E(E*P)=\sum\nolimits_{i=1}^n E_i P_i p_i = U \sum\nolimits_{i=1}^n P_i=U*P$$
I'm guessing the far left-hand side is "expectation of microcanonical energy, times microcanonical pressure" ? Good, that is the main thing you need to calculate. And the second expression is correct. But I don't trust the third expression. I'm pretty sure that it is not OK to simply take ##U## out of the sum here. Since for each "i", the values of ##E_i## and ##P_i## will be different, this means you can't take one of them out of the sum, as if it were constant throughout the sum. In other words, doing this:
$$\sum\nolimits_{i=1}^n E_i P_i p_i = ( \sum\nolimits_{i=1}^n E_i p_i ) ( \sum\nolimits_{i=1}^n P_i )$$
is not allowed. For doing this problem, I think the most important "relevant equation" should be the expression for the microcanonical pressure, in terms of the microcanonical energy. Also, it might be easier to start from
$$(\frac{\partial U} {\partial V})_{N,T}$$
and then work your way back from there. but you can do it whichever way makes more sense to you.

edit: p.s. for the expression of the microcanonical pressure, in terms of the microcanonical energy, this can just be a general kind of equation. You don't need to write down an explicit equation for ##E_i##. But it is important to write ##P_i## in terms of an expression involving ##E_i##. As a hint, it is pretty much the equation you might expect. Hopefully it is in your notes somewhere too.

Last edited:
Correction:
##U=kT^2(\frac{\partial{ln Q}}{\partial T})##

Current Equation:
##\sum\nolimits_{i=1}^n E_i P_i p_i - U*\overline{P}=kT[(\frac{\partial U} {\partial V})_{N,T} + \overline{P}]##

##p_i=\frac{e^{-B*E_i}} {Q(N,V,T)}##

##\overline{P}=kT(\frac{\partial{ln Q}}{\partial V}_{N,T})##
##Q(N,V,T)=\sum\nolimits_{i=1}^n e^{\frac{-E_i} {kT}}##
##\overline{P(E_i)}=kT(\frac{\partial{ln \sum\nolimits_{i=1}^n e^{\frac{-E_i} {kT}}}}{\partial V}_{N,T})##
Reduce this to a more general equation?
##\sum\nolimits_{i=1}^n E_i P_i p_i =\sum\nolimits_{i=1}^n E_i*\frac{e^{-B*E_i}} {Q(N,V,T)}*kT(\frac{\partial{ln Q}}{\partial V}_{N,T})##
Integrate over all energies, $$E_i$$ ?For right hand side
A Possible Substitution:
##(\frac{\partial{U}}{\partial V})_{N,T}=T(\frac{\partial{S}}{\partial V})_{T}-P=T(\frac{\partial{P}}{\partial T})_{V}-P##

After Substitution:
##\sum\nolimits_{i=1}^n E_i P_i p_i - U*\overline{P}=kT^2[\frac{\partial{P}}{\partial T}]_{V}##

A different Substitution:
##\overline{P}=-\frac{\partial{U}} {\partial{V}}##

After Substituting:
##\sum\nolimits_{i=1}^n E_i P_i p_i - U*\overline{P}=kT[(\frac{\partial U} {\partial V})_{N,T} -\frac{\partial{U}} {\partial{V}}##

Last edited:
swmmr1928 said:
##\sum\nolimits_{i=1}^n E_i P_i p_i =\sum\nolimits_{i=1}^n E_i*\frac{e^{-B*E_i}} {Q(N,V,T)}*kT(\frac{\partial{ln Q}}{\partial V}_{N,T})##
yeah, this is good. So the next step would naturally be to calculate
$$( \frac{\partial{ln Q}}{\partial V} )_{N,T}$$
right? I mean, you know everything else on the right-hand side, so hopefully if you can calculate this, you can rearrange into something more familiar.

swmmr1928 said:
A Possible Substitution:
##(\frac{\partial{U}}{\partial V})_{N,T}=T(\frac{\partial{S}}{\partial V})_{T}-P=T(\frac{\partial{P}}{\partial T})_{V}-P##
But where does this equation come from? I don't recognize it..

edit: Oh, I think I see what you meant, something like
$$U=TS-PV$$
and so taking partial derivative with respect to volume, while holding only temperature constant:
$$( \frac{\partial U}{\partial V} )_T = ( \frac{\partial TS}{\partial V} )_T - ( \frac{\partial PV}{\partial V} )_T$$
But the problem then, is that
$$( \frac{\partial PV}{\partial V} )_T$$
is not the same as
$$P ( \frac{\partial V}{\partial V} )_T$$
This is not allowed, unless you are assuming that ##P## doesn't change when ##T## is constant.

generally, I don't think it is possible to solve this problem using just thermodynamic relations. It is a stat. mech. problem, after all. It needs you to think about averages, and microstate values.

Last edited:
##Q(N,V,T)=\frac{(q_{trans}*q_{elect}*q_{nuc})^N} {N!}##
##Q(N,V,T)=\frac{(V*A(T,E))^N} {N!}##
##A(T,E)=\frac{q_{elec}(E,T)*q_{trans}(T,V)} {V}##
##\frac{\partial{{ln((V*A(T,E))^N} {N!})}} {\partial{V}}_{N,T}=N/V##
##( \frac{\partial{ln Q}}{\partial V} )_{N,T}=N/V##

ah, that's nice. But that is for a specific kind of system. In fact, that is essentially the ideal gas law ##P=kTN/V##. But I think they are looking for a more general rule.

Also, I was wrong in my last post. sorry, I didn't read carefully enough. When you wrote this equation:
$$\sum\nolimits_{i=1}^n E_i P_i p_i =\sum\nolimits_{i=1}^n E_i*\frac{e^{-B*E_i}} {Q(N,V,T)}*kT(\frac{\partial{ln Q}}{\partial V}_{N,T})$$
it is not quite right. Because on the right-hand side, you have put the average pressure, but it should be the microcanonical pressure.

You need to have a guess at what the microcanonical pressure is (since I'm guessing it's not in your notes). Try to continue with this equation which you wrote before:
$$\overline{P(E_i)}=kT(\frac{\partial{ln \sum\nolimits_{i=1}^n e^{\frac{-E_i} {kT}}}}{\partial V}_{N,T})$$
This is the form of ##Q## that I think you should use, try to calculate this partial derivative. And then, compare it to the other way to define ##\overline{p}## (i.e. in terms of its own microcanonical values). From this, you should be able to guess what is the equation for the microcanonical pressure, as some equation involving the microcanonical energy.

Microcanonical ensemble:
##\frac {P} {T}=k\frac{\partial{ln(Ω(N,U,V))}} {\partial{N}}_{U,N}##
Ω(N,V,E) is the degeneracy of of the state N,V,E

Last edited:
by 'microcanonical values' I just mean ##E_i## and ##P_i##. If you write out this equation:
$$\overline{P(E_i)}=kT(\frac{\partial{ln \sum\nolimits_{i=1}^n e^{\frac{-E_i} {kT}}}}{\partial V}_{N,T})$$
Then you'll get some equation with ##E_i## on the right-hand side. And for the left-hand side, you can use ##\overline{P(P_i)}## to write it out in terms of the ##P_i##. So then, you should be able to guess at how ##E_i## and ##P_i## are related.

edit: To clarify, for the left-hand side, you should just write it in terms of probabilities ##p_i## and microcanonical pressure values ##P_i##.

second edit: I guess I should call them "microstate values" instead of "microcanonical values" to have the correct terminology.

Last edited:
So to find the microcanonical pressure, I should find the average pressure by taking that derivative and comparing it to the average pressure using probabilities:

Average Pressure as a pdf
##\overline P = \sum\nolimits_{i=1}^n p_i * P_i(E_i)##

Average Pressure from Q

##\overline{P(E_i)}=kT(\frac{\partial{ln \sum\nolimits_{i=1}^n e^{\frac{-E_i} {kT}}}}{\partial V}_{N,T})##

When I take this derivative, there is no V, so it equals zero? Or do I use:
##E_i(V)= \sum\nolimits_{i=1}^n \frac{-βh^2(l_x^2+l_y^2+l_z^2)} {8mV^{2/3}}##

Edit, To get:

##\frac{\partial{ln(V^{-2/3}*A)}} {\partial V}_{N,T}=\frac{-2} {3*V}##

Last edited:
swmmr1928 said:
So to find the microcanonical pressure, I should find the average pressure by taking that derivative and comparing it to the average pressure using probabilities:

Average Pressure as a pdf
##\overline P = \sum\nolimits_{i=1}^n p_i * P_i(E_i)##
yeah, that's it :) And for the right-hand side, just get to:
$$( \frac{\partial E_i}{\partial V} )_T$$
you don't need to write it out explicitly (in fact, you can't write it out explicitly, since they haven't told you what kind of system it is). Anyway, once you get to here, you should compare both sides of the equation, then you should be able to guess the equation for the microstate pressure. And then from there, you have enough information to do the question.

So I compare these:
##\overline P = \sum\nolimits_{i=1}^n p_i * P_i(E_i)=( \frac{\partial E_i}{\partial V} )_T####p_i\overset{still true?}=\frac{e^{-B*E_i}} {Q(N,V,T)}##

swmmr1928 said:
##p_i\overset{still true?}=\frac{e^{-B*E_i}} {Q(N,V,T)}##
hehe, yes this is true. But this:
$$kT(\frac{\partial{ln \sum\nolimits_{i=1}^n e^{\frac{-E_i} {kT}}}}{\partial V}_{N,T}) = ( \frac{\partial E_i}{\partial V} )_T$$
is not true. But it is true that the right hand-side will contain terms with
$$( \frac{\partial E_i}{\partial V} )_T$$
Once you have done the calculation (i.e. use product rule). Then you can compare both sides to guess the equation for the microstate pressure ##P_i##.

Why use product rule? Besides E_i, what else is a function of Volume?

edit: Nevermind, I use:
1/f(x) * d/dx (f(x)) a form of product rule

Last edited:
##\frac {1} {\sum\nolimits_{i=1}^n e^{\frac{-E_i} {kT}}} * ( \frac{\partial \sum\nolimits_{i=1}^n e^{\frac{-E_i} {kT}}}{\partial V} )_T##

yeah, that's what I meant. and yes, sorry I think the name is chain rule, I got the name mixed up. But anyway, you've done it the correct way. Next is to use chain rule again, on each of the terms in that sum.

##\frac{\partial \sum\nolimits_{i=1}^n e^{\frac{-E_i} {kT}}}{\partial V}=\sum\nolimits_{i=1}^n e^{\frac{-E_i} {kT}}*\frac {\partial {E_i}} {\partial V} * \frac {-1} {kT}##

A guess:
##P_i=\frac {\partial{ln(E_i)}} {\partial V}##

yep, that's it! So now, compare to the left-hand side
$$\sum\nolimits_{i=1}^n p_i * P_i(E_i)$$
and you can make a guess for how to write the microstate pressure ##P_i##.

ah, I think you made another post just before me. Uh, it's very close. There should be a minus sign if you check it again.

edit: also are you sure it has ##ln(E_i)## ?

on the right hand side, the sums cancel:
##\sum\nolimits_{i=1}^n p_i * P_i(E_i) = \frac {-1} {kT} * {\frac {\partial {E_i}} {\partial V} }_T##

##P_i=-\frac {\partial E_i} {\partial V}##

An equation we are given is: ##{\frac {\partial A} {\partial V}}_T=-P##
Where A is Helmholtz Energy

yeah! that's it. Although really, the sums don't cancel, it is technically just a guess. But since they don't give you ##P_i## In the question, I think you had to make this guess. At least it is a fairly sensible guess. So anyway, now that you have ##P_i##, you can prove the expression they gave:
$$\sum\nolimits_{i=1}^n E_i P_i p_i - U*\overline{P}=kT[(\frac{\partial U} {\partial V})_{N,T} + \overline{P}]$$
So, from here, the two 'unfamiliar' things are
$$( \frac{\partial U} {\partial V})_{N,T}$$
and
$$\sum\nolimits_{i=1}^n E_i P_i p_i$$
$$P_i=-\frac {\partial E_i} {\partial V}$$
you can try to see how these 'unfamiliar' terms are related.

uh, they are both derivatives with respect to V?

you mean the two 'unfamiliar' terms? You need to write them out explicitly to see how they are related. they are not just equal to each other, since there are other terms in the big equation which you are trying to prove is true.

##\sum\nolimits_{i=1}^n -\frac {\partial E_i} {\partial V}*E_i*p_i=\sum\nolimits_{i=1}^n -\frac {\partial E_i} {\partial V}*E_i*\frac {e^{-β*E_i}} {Q(N,V,T)}##

##{\frac {\partial U} {\partial V}}_{N,T}##

##U=\frac{\sum\nolimits_{i=1}^n E_i*e^{-E_i/kT}} {Q}##

##Q=\sum\nolimits_{i=1}^n e^{-E_i/kT}##

##\frac {\partial} {\partial V} { {\sum\nolimits_{i=1}^n E_i*e^{-E_i/kT}} *1/e^{-E_i/kT}}=##
##\frac {\partial} {\partial V} { {\sum\nolimits_{i=1}^n E_i}}##
##{\frac {\partial U} {\partial V}}_{N,T}=\frac {\partial} {\partial V} { {\sum\nolimits_{i=1}^n E_i}}##

Last edited:
yep. good so far. keep going. Although I think it is easier to write ##U## directly in terms of ##E_i##, and then do the partial differential with respect to ##V##.

Compare this ##\sum\nolimits_{i=1}^n E_i *(-\frac {\partial E_i} {\partial V})*p_i## to ##{\frac {\partial U} {\partial V}}_{N,T}=\frac {\partial} {\partial V} { {\sum\nolimits_{i=1}^n E_i}}##

##\sum\nolimits_{i=1}^n E_i *(-\frac {\partial E_i} {\partial V})*p_i##
##\sum\nolimits_{i=1}^n \frac {\partial E_i} {\partial V} ##

These terms include the same derivative, where on the first line, it is multiplied by ##-E_i*p_i=U##

##\sum\nolimits_{i=1}^n E_i P_i p_i - U*\overline{P}=kT[(\frac{\partial U} {\partial V})_{N,T} + \overline{P}]##

Last edited:
hmm. hold on, this:
$${\frac {\partial U} {\partial V}}_{N,T}=\frac {\partial} {\partial V} { {\sum\nolimits_{i=1}^n E_i}}$$
is not quite right. The right-hand side is missing the probabilities that go with each of the microstate energies ##E_i##

Instead it is ##\frac {\partial {\sum\nolimits_{i=1}^n E_i p_i}} {\partial V}##
And the other ##\sum\nolimits_{i=1}^n E_i p_i*(-\frac {\partial E_i} {\partial V})##
Can these be differentialted?
If both the probability and energy are functions of Volume, i can use product rule

Last edited:
If I use the expression for U that expresses the probability in E_i and exp(-BE_i) and Q(N,V,T) then Product and quotient rule?

Last edited:
swmmr1928 said:
Instead it is ##\frac {\partial {\sum\nolimits_{i=1}^n E_i p_i}} {\partial V}##
And the other ##\sum\nolimits_{i=1}^n E_i p_i*(-\frac {\partial E_i} {\partial V})##
Can these be differentialted?
If both the probability and energy are functions of Volume, i can use product rule
yep. you should differentiate the first one, using product rule. And the second one, you can just leave it as it is. It is fine like that.

##p_i \frac {\partial E_i} {\partial V} + E_i \frac {\partial p_i} {\partial V}##
##p_i=exp(-B*E_i)/Q(N,T,V)=exp(-B*E_i)/exp(-B*E_i)##
##\frac {\partial p_i} {\partial V}=0##
##\frac {\partial {\sum\nolimits_{i=1}^n E_i p_i}} {\partial V}=\sum\nolimits_{i=1}^n p_i \frac {\partial E_i} {\partial V}##

swmmr1928 said:
##p_i=exp(-B*E_i)/Q(N,T,V)=exp(-B*E_i)/exp(-B*E_i)##
The first equality is correct. But the second equality is definitely not correct. ##Q## is a completely separate sum, not the same sum. So you need to use another product rule here. You're getting there, though. So, try using product rule on the middle expression:
##exp(-B*E_i)/Q(N,T,V)##

Replies
4
Views
1K
Replies
32
Views
867
Replies
4
Views
2K
Replies
20
Views
3K
Replies
27
Views
2K
Replies
1
Views
1K
Replies
1
Views
2K
Replies
1
Views
1K
Replies
1
Views
1K
Replies
4
Views
1K