Lecture 15: Interacting Particles Part 1

Flash and JavaScript are required for this feature.

Download the video from iTunes U or the Internet Archive.

Description: This is the first of five lectures on Interacting Particles.

Instructor: Mehran Kardar

The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free. To make a donation or view additional materials from hundreds of MIT courses, visit MIT OpenCourseWare at ocw.mit.edu.

PROFESSOR: OK, let's start. So we said that the task of statistical mechanics is to assign probabilities to different microstates given that we have knowledge of the microstate. And the most kind of simple logical place to start was in the microcanonical ensemble where the microstate that we specified was one in which there was no exchange of work or heat with the surroundings so that the energy was constant, and the parameters, such as x and N, that account for chemical and mechanical work were fixed also.

Then this assignment was, we said, like counting how many faces the dice has, and saying all of them are equally likely. So we would say that the probability here of a microstate is of the form 0 or 1 depending on whether the energy of that microstate is or is not the right energy that is listed over here.

And as any probability, it has to be normalized. So we had this 1 over omega. And we also had a rule for converting probabilities to entropies, which in dimensionless form-- that is, if we divide by kB-- was simply minus the expectation value of the log of the probability, this probability being uniformly 1 over omega. This simply gave us log of omega E, x, N.

Once we had the entropy as a function of E, x, N, we also identified the derivatives of this quantity in equilibrium. And partial derivative with respect to energy was identified as 1 So systems that were in equilibrium with each other, this derivative dS by dE had to be the same for all of them. And because of mechanical stability, we could identify the next derivative with respect to x. That was minus J/T. And with respect to N by identifying a corresponding thing, we would get this.

So from here, we can proceed and calculate thermodynamic properties using these microscopic rules, as well as probabilities in the entire space of microstates that you have. Now, the next thing that we did was to go and look at the different ensemble, the canonical ensemble, in which we said that, again, thermodynamically, I choose a different set of variables. For example, I can replace the energy with temperature. And indeed, the characteristic of the canonical ensemble is that rather than specifying the energy, you specify the temperature.

But there's still no chemical or mechanical work. So the other two parameters are kept fixed also. And then the statement that we had was that by putting a system in contact with a huge reservoir, we could ensure that it is maintained at some temperature. And since system and reservoir were jointly microcanonical, we could use the probabilities that we had microcanonically.

We integrated over the degrees of freedom of the reservoir that we didn't care about. And we ended up with the probability of a microstate in the canonical ensemble, which was related to the energy of that by the form exponential of minus beta h where we introduced beta to be 1 over kT.

And this probably, again, had to be normalized. So the normalization we called Z. And Z is attained by summing over all of the microstates E to the minus beta H of the microstate where this could be an integration over the entire phase space if you're dealing with continuous variables.

OK, now the question was, thermodynamically, these quantities T and E are completely exchangeable ways of identifying the same equilibrium state, whereas what I have done now is I have told you what the temperature is. But the energy of the system is a random variable. And so I can ask, what is the probability that I look at my system and I find a particular energy E? So how can I get that?

Well, that probability, first of all, has to come from a microstate that has the right energy. And so I will get e to the minus beta E divided by Z, which is the probability of getting that microstate that has the right energy. But I only said something about the energy. And there are a huge number of microstates, as we've seen, that have the same energy.

So I could have picked from any one of those microstates, their number being omega of E, the omega that we had identified before. So since omega can be written as exponential of s over kB, this you can also think of as being proportional to exponential of minus beta E minus T, the entropy that I would get for that energy according to the formula above, divided by Z.

Now, we said that the quantity that I'm looking at here in the numerator has a dependence on the size of the system that is extensive. Both the entropy and energy we expect to be growing proportionately to the size of the system. And hence, this exponent also grows proportionately to the size of the system.

So I expect that if I plot this probability as a function of energy, this probability to get energy E, it would be one of those functions. It's certainly positive. It's a probability. It has an exponential dependence.

So there's a part that maybe from the density of states grows exponentially. e to the minus beta E will exponential kill it. And maybe there is, because of this competition, one or potentially more maxima. But if there are more maxima locally, I don't really care. Because one will be exponentially larger than the other. So presumably, there is some location corresponding to some E star where the probability is maximized.

Well, how should I characterize the energy of the system? Should I pick E star, or given this probability, should I look at maybe the mean value, the average of H? How can I get the average of H? Well, what I need to do is to sum over all the microstates H of the microstate e to the minus beta H divided by sum over microstates e to the minus beta H, which is the normalization.

The denominator is of course the partition function. The numerator can be obtained by taking a derivative of this with respect to beta of the minus sign. So what this is is minus the log Z by d beta. So if I have calculated H, I can potentially go through this procedure and maybe calculate where the mean value is. And is that a better representation of the energy of the system than the most likely value, which was E star? Well, let's see how much energy fluctuates.

Basically, we saw that if I repeat this procedure many times, I can see that the n-th moment is minus 1 to the n 1 over Z the n-th derivative of Z with respect to beta. And hence the partition function, by expanding it in powers of beta, will generate for me higher and higher moments. And we therefore concluded that the cumulant would be obtained by the same procedure, except that I will replace this by log Z. So this will be the n-th derivative of log Z with respect to beta.

So the variance H squared c is a second derivative of log Z. The first derivative gives me the first cumulant, which was the mean. So this is going to give me d by d beta with a minus sign of the expectation value of H, which is the same thing as kBT squared, because the derivative of 1 over kT is 1 over T squared times derivative with respect to T. And it goes to the other side, to the numerator. And so then I have the derivative of this object with respect to temperature, which is something like a heat capacity.

But most importantly, the statement is that all of these quantities are things that are of the order of the size of the system. And just like we did in the central limit theorem, with the addition of random variables, you have a situation that is very much like that. The distribution, in some sense, is going to converge more and more towards the Gaussian dominated by the first and second cumulant.

And in fact, even the second cumulant we see is of the order of square root of n. And hence the fluctuations between these two quantities, which are each one of them order of n, is only of the order of square root of n. And when the limit of n goes to infinity, we can ignore any such difference. We can essentially identify either one of them with the energy of the system thermodynamically. And then this quantity, if I identify this with energy of the system, is simply the usual heat capacity of constant x.

So the scale of the fluctuations over here is set by square root of kBT squared the heat capacity. By the way, which is also the reason that heat capacities must be positive. Because statistically, the variances are certainly positive quantities. So you have a constraint that we had seen before on the sign emerging in its statistical interpretation.

What I did over here was to identify an entropy associated with a particular form of the probability. What happens if I look at an entropy with this probability that I have over here? OK, so this is a probability phase space. What is its entropy?

So S over k is expectation value of log p. And what is log of p? Well, there is log of this minus beta H. So what I will have, because of the change in sign-- beta expectation value of H. And then I have minus log Z here. The sign changes, and I will get plus log Z.

So yeah, that's correct. If I were to rearrange this, what do I get? I can take this minus-- let's see. Yeah, OK, so if I take this to the other side, then I will get that log Z equals-- this goes to the other side-- minus beta. Expectation value of H we are calling E. And then I have multiplying this by beta. The kB's disappear, and I will get minus TS.

So we see that I can identify log Z with the combination E minus TS, which is the Helmholtz free energy. So log Z, in the same way that the normalization here that was omega, gave us the entropy. The normalization of the probability in the canonical ensemble, which is also called the partition function if I take its log, will give me the free energy. And I can then go and compute various thermodynamic quantities based on that.

There's an alternative way of getting the same result, which is to note that actually the same quantity is appearing over here, right? And really, I should be evaluating the probability here at the maximum. Maximum is the energy of the system. So if you like, I can call this variable over here epsilon. This is the probability of epsilon.

And it is only when I'm at the maximum that I can replace this epsilon with E. Then since with almost probability 1, I'm going to see this state and none of the other states, because of this exponential dependence. When this expression is evaluated at this energy, it should give me probability 1. And so you can see again that Z has to be-- so basically what I'm saying is that this quantity has to be 1 so that you get this relationship back from that perspective also.

AUDIENCE: Question.

PROFESSOR: Yes.

AUDIENCE: So I agree that if in order to plug in d, mean energy, into that expression, you would get a probability of 1 at that point. But because even though the other energies are exponentially less probable, they strictly speaking aren't 0 probability, are they?

PROFESSOR: No.

AUDIENCE: So how does this get normalized? How does this probability expression get normalized?

PROFESSOR: OK, so what are we doing? So Z, I can also write it as the normalization of the energy. So rather than picking the one energy that maximizes things, you say, you should really do this, right? Now, I will evaluate this by the saddle point method.

The saddle point method says, pick the maximum of this. So I have e to the minus beta F evaluated at the maximum. And then I have to integrate over variations around that maximum.

Variations around that maximum I have to expand this to second order. And if I really correctly expand this to second order, I will get delta E squared divided by this 2kTCx, because we already established what this variance is.

I can do this Gaussian integration. I get e to the minus beta F of e star. And then the variance of this object is going to give me root of 2 pi kTC of x-- T-square. So what do I mean when I say that this quantity is Z? Really, the thing that we are calculating always in order to make computation is something like a free energy, which is log Z.

So when I take the log, log of Z is going to be this minus beta F star S. But you're right. There was a weight. All of those things are contributing. How much are they contributing? 1/2 log of 2 pi kBT squared C.

Now, in the limit of large N, this is order of N. This is order of log N. And I [INAUDIBLE]. So it's the same saddle point. The idea of saddle point was that there is a weight. But you can ignore it. There maybe another maximum here. You say, what about that? Well, that will be exponentially small.

So everything I keep emphasizing only works because of this N goes to infinity limit. And it's magical, you see? You can replace this sum with just one, the maximum. And everything is fine and consistent. Yes.

AUDIENCE: Not to belabor this point, but if you have an expected return for catastrophe where this outlier causes an event that brings the system down, couldn't that chase this limit in the sense that as that goes to 0, that still goes to infinity, and thus you're-- you understand what I'm saying. If an outlier causes this simulation-- that's my word-- causes this system to crumble, then-- so is there a paradox there?

PROFESSOR: No, there is here the possibility of a catastrophe in the sense that all the oxygen in this room could go over there, and you and I will suffocate after a few minutes. It's possible, that's true. You just have to wait many, many ages of the universe for that to happen. Yes.

AUDIENCE: So when you're integrating, that introduces units into the problem. So we have to divide by something to [INAUDIBLE].

PROFESSOR: Yes, and when we are doing this for the case of the ideal gas, I will be very careful to do that. But it turns out that those issues, as far as various derivatives are concerned, will not make too much difference. But when we are looking at the specific example, such as the ideal gas, I will be careful about that.

So we saw how this transition occurs. But when we were looking at the case of thermodynamical descriptions, we looked at a couple of other microstates. One of them was the Gibbs canonical. And what we did was we said, well, let's allow now some work to take place on the system, mechanical work. And rather than saying that, say, the displacement x is fixed, I allow it to vary. But I will say what the corresponding force is. But let's keep the number of particles fixed.

So essentially, the picture that we have is that somehow my system is parametrized by some quantity x. And I'm maintaining the system at fixed value of some force J. So x is allowed potentially to find the value that is consistent with this particular J that I impose on the system.

And again, I have put the whole system in contact with the reservoir temperature T so that if I now say that I really maintain the system at variable x, but fix J, I have to put this spring over there. And then this spring plus the system is jointly in a canonical perspective.

And what that really means is that you have to keep track of the energy of the microstate, as well as the energy that you extract from the spring, which is something like J dot x. And since the joint system is in the canonical state, it would say that the probability for the joint system, which has T and J and N specified, but I don't know the microstate, and I don't know the actual displacement x, this joint probability is canonical.

And so it is proportional to e to the minus beta H of the microstate plus this contribution Jx that I'm getting from the other degree of freedom, which is the spring, which keeps the whole thing at fixed J. And I have to divide by some normalization that in addition includes integration over x. And this will depend on T, J, N.

So in this system, both x and the energy of the system are variables. They can potentially change. What I can now do is to either characterize like I did over here what the probability of x is, or go by this other route and calculate what the entropy of this probability is, which would be minus the log of the corresponding probability.

And what is the log in this case? I will get beta expectation value of H. And I will get minus beta J expectation value of x. And then I will get plus log of this Z tilde.

So rearranging things, what I get is that log of this Z tilde is minus beta. I will call this E like I did over there. Minus J-- I would call this the actual thermodynamic displacement x. And from down here, the other side, I will get a factor of TS.

So this should remind you that we had called a Gibbs free energy the combination of E minus TS minus Jx. And the natural variables for this G were indeed, once we looked at the variation DE, T. They were J, and N that we did not do anything with.

And to the question of, what is the displacement, since it's a random variable now, I can again try to go to the same procedure as I did over here. I can calculate the expectation value of x by noting that this exponent here has a factor of beta Jx. So if I take a derivative with respect to beta J, I will bring down a factor of x.

So if I take the derivative of log of this Z tilde with respect to beta J, I would generate what the mean value is. And actually, maybe here let me show you that dG was indeed what I expected.

So dG would be dE. dE has a TdS. This will make that into a minus SdT. dE has a Jdx. This will make it minus xdJ. And then I have mu dN. So thermodynamically, you would have said that x is obtained as a derivative of G with respect to J.

Now, log Z is something that is like beta G. At fixed temperature, I can remove these betas. What do I get? This is the same thing as dG by dJ. And I seem to have lost a sign somewhere. OK, log Z was minus G. So there's a minus here. Everything is consistent.

So you can play around with things in multiple ways, convince yourself, again, that in this ensemble, I have fixed the force, x's variable. But just like the energy here was well defined up to something that was square root of N, this x is well defined up to something that is of the order square root of N. Because again, you can second look at the variance. It will be related to two derivatives of log G, which would be related to one derivative of x. And ultimately, that will give you something like, again, kBT squared d of x by dJ. Yes.

AUDIENCE: Can you mention again, regarding the probability distribution? What was the idea?

PROFESSOR: How did I get this probability?

AUDIENCE: Yes.

PROFESSOR: OK, so I said that canonically, I was looking at a system where x was fixed. But now I have told you that J-- I know what J is, what the force is. And so how can I make sure that the system is maintained at a fixed J? I go back and say, how did I ensure that my microcanonical system was at a fixed temperature? I put it in contact with a huge bath that had the right temperature.

So here, what I will do is I will connect the wall of my system to a huge spring that will maintain a particle [? effect ?] force J on the system. When we do it for the case of the gas, I will imagine that I have a box. I have a piston on top that can move up and down. I put a weight on top of it. And that weight will ensure that the pressure is at some particular value inside the gas.

But then the piston can slide up and down. So a particular state of the system I have to specify where the piston is, how big x is, and what is the microstate of the system. So the variables that I'm not sure of are mu and x.

Now, once I have said what mu and x is, and I've put the system in contact with a bath at temperature T, I can say, OK, the whole thing is canonical, the energy of the entire system composed of the energy of this, which is H of mu, and the energy of the spring, which is Jx. And so the canonical probability for the joint system is composed of the net energy of the two. And I have to normalize it. Yes.

AUDIENCE: Are you taking x squared to be a scalar, so that way the dx over dJ is like a divergence? Or are you taking it to be a covariance tensor?

PROFESSOR: Here, I have assumed that it is a scalar. But we can certainly do-- if you want to do it with a vector, then I can say something about positivity. So I really wanted this to be a variance and positive. And so if you like, then it would be the diagonal terms of whatever compressibility you have.

So you certainly can generalize this expression to be a vector. You can have xI xJ, and you would have d of xI with respect to JJ or something like this. But here, I really wanted the scalar case. Everything I did was scalar manipulation. And this is now the variance of something and is positive.

OK, there was one other ensemble, which was the grand canonical. So here, I went from the energy to temperature. I kept N fixed. I didn't make it into a chemical potential. But I can do that. Rather than having fixed number, I can have fixed chemical potential. But then I can't allow the other variable to be J. It has to be x. Because as we have discussed many times, at least one of them has to be extensive.

And then you can follow this procedure that you had here. Chemical work is just an analog of mechanical work mathematically. So now I would have the probability that I have specified this set of variables. But now I don't know what my microstate is. Actually, let me put mu s. Because I introduced a chemical potential mu. So mu sub s is the microstate of the system.

I don't know how many particles are in that microstate. The definition of mu s would potentially cover N. Or I can write it explicitly. And then, what I will have is e to the beta mu N minus beta H of the microstate's energy divided by the normalization, which is the grand partition function Q. So this was the Gibbs partition function. This is a function of T, x at the chemical potential.

And the analog of all of these expressions here would exist. So the average number in the system, which now we can use as the thermodynamic number, as we've seen, would be d of log of Q with respect to d beta mu. And you can look at the variances, et cetera. Yes.

AUDIENCE: So do you define, then, what the microstate of the system really is if the particle number is [INAUDIBLE]?

PROFESSOR: OK, so let's say I have five particles or six particles in the system. It would be, in the first case, the momentum coordinates of five particles. In the next case, in the momentum, I have coordinates of six particles. So these are spaces, as it has changed, where the dimensionality of the phase space is also being modified. And again, for the ideal gas, we will explicitly calculate that.

And again, you can identify what the log of this grand partition is going to be. It is going to be minus beta E minus TS. Rather than minus Jx, it will be minus mu N. And this combination is what we call the grand potential g, which is E minus TS minus mu N. You can do thermodynamics. You can do probability. Essentially, in the large end limit, and only in the large end limit, there's a consistent identification of most likely states according to the statistical description and thermodynamic parameters. Yes.

AUDIENCE: Can one build a more general ensemble or description where, say, J is not a fixed number, but I know how it varies? I know that it's subject to-- say the spring is not exactly a Hookean spring. It's not linear. The proportion is not linear.

PROFESSOR: I think you are then describing a [? composing ?] system, right? Because it may be that your system itself has some nonlinear properties for its force as a function of displacement. And most generally, it will. Very soon, we will look at the pressure of a gas, which will be some complicated function of its density-- does not necessarily have to be linear.

So the system itself could have all kinds of nonlinear dependencies. But you calculate the corresponding force through this procedure. And it will vary in some nonlinear function of density. If you're asking, can I do something in which I couple this to another system, which has some nonlinear properties, then I would say that really what you're doing is you're putting two systems together. And you should be doing separate thermodynamical calculations for each system, and then put the constraint that the J of this system should equal the J of the other system.

AUDIENCE: I don't think that's quite what I'm getting at. I'm thinking here, the J is not given by another thermodynamical system. We're just applying it-- like we're not applying thermodynamics to whatever is asserting to J.

PROFESSOR: No, I'm trying to mimic thermodynamics. So in thermodynamics, I have a way of describing equilibrium systems in terms of a certain set of variables. And given that set of variables, there are conjugate variables. So I'm constructing something that is analogous to thermodynamics.

It may be that you want to do something else. And my perspective is that the best way to do something else is to sort of imagine different systems that are in contact with each other. Each one of them you do thermodynamics, and then you put equilibrium between them.

If I want to solve some complicated system mechanically, then I sort of break it down into the forces that are acting on one, forces that are acting on the other, and then how this one is responding, how that one is responding. I don't see any advantage to having a more complicated mechanical description of an individual system.

AUDIENCE: It's not like in reality. It's hard to obtain situations where the external force is fixed. Really, if we're doing an experiment here, the pressure in the atmosphere is a fixed number. But maybe in other circumstances--

PROFESSOR: Yes, so if you are in another circumstance, like you have one gas that is expanding in a nonlinear medium, then what I would do is I would calculate the pressure of gas as a function of its volume, et cetera. I would calculate the response of that medium as a function of stress, or whatever else I'm exerting on that. And I say that I am constrained to move around the trajectory where this force equals this force.

So now let's carry out this procedure for the ideal gas. And the microscopic description of the ideal gas was that I have to sum over-- its Hamiltonian is composed of the kinetic energies of the particles. So I have their momentum. Plus the potential that we said I'm going to assume describes box of volume mu. And it is ideal, because we don't have interactions among particles. We will put that shortly for the next version.

Now, given this, I can go through the various prescriptions. I can go microcanonically and say that I know the energy volume and the number of particles. And in this prescription, we said that the probability is either 0 or 1 divided by omega. And this is if qi not in box and sum over i Pi squared over 2m not equal to E and one otherwise.

AUDIENCE: Is there any reason why we don't use a direct delta there?

PROFESSOR: I don't know how to use the direct delta for reading a box. For the energy, the reason I don't like to do that is because direct deltas have dimensions of 1 over whatever thing is inside. Yeah, you could do that. It's just I prefer not to do it. But you certainly could do that. It is certainly something that is 0 or 1 over omega on that surface.

The S for this, what was it? It was obtained by integrating over the entirety of the 6N dimensional phase space. From the Q integrations, we got V to the N. From the momentum integrations, we got the surface area of this hypersphere, which was 2 pi to the 3N over 2, because it was 3N dimensional. And this was the solid angle. And then we got the radius, which is 2mE square root raised to the power of number of dimensions minus 1.

Then we did something else. We said that the phase space is more appropriately divided by N factorial for identical particles. Here, I introduced some factor of H to dimensionalize the integrations over PQ space so that this quantity now did not carry any dimensions.

And oops, this was not S. This was omega. And S/k, which was log of omega-- we took the log of that expression. We got N log of V. From the log of N factorial, Stirling's approximation gave us a factor of N over e.

All of the other factors were proportional to 3N over 2. So the N is out front. I will have a factor of 3 over 2 here. I have 2 pi mE divided by 3N over 2. And then there's E from Stirling's approximation. And that was the entropy of the ideal gas. Yes.

AUDIENCE: Does that N factorial change when describing the system with distinct particles?

PROFESSOR: Yes, that's right.

AUDIENCE: So that definition changes?

PROFESSOR: Yes, so this factor of-- if I have a mixture of gas, and one of them are one kind, and two of them are another kind, I would be dividing by N1 factorial, N2 factorial, and not by N1 plus N2 factorial.

AUDIENCE: So that is the correct definition for all the cases?

PROFESSOR: That's the definition for phase space of identical particles. So all of them are identical particle, is what I have written. All of them are distinct. There's no such factor. If half of them are of one type and identical, half of them are another type of identical, then I will have N over 2 factorial, N over 2 factorial.

AUDIENCE: Question.

PROFESSOR: Yeah.

AUDIENCE: So when you're writing the formula for number of microstates, just a question of dimensions. You write V to the N. It gives you something that mentions coordinate to the power 3N times something of dimensions of [INAUDIBLE]. The power is 3N minus 1 divided by H to 3N. So overall, this gives you 1 over momentum.

PROFESSOR: OK, let's put a delta E over here-- actually, not a delta E, but a delta R. OK, so now it's fine. It's really what I want to make sure is that the extensive part is correctly taken into account. I may be missing a factor of dimension that is of the order of 1 every now and then. And then you can put some [INAUDIBLE] to correct it. And it's, again, the same story of the orange. It's all in the skin, including-- so the volume is the same thing as the surface area, which is essentially what I'm-- OK?

So once you have this, you can calculate various quantities. Again, the S is dE over T plus PdV over T minus mu dN over T. So you can immediately identify, for example, that 1 over T derivative with respect to energy would give me a factor of N/E. If I take a derivative with respect to volume, P over T, derivative of this object with respect to volume will give me N over V.

And mu over T is-- oops, actually, in all of these cases, I forgot the kB. So I have to restore it. And here I would get kB log of the N out front. I can throw out V/N 4 pi m E over 3N. And I forgot the H's. So the H's would appear as an H squared here. They will appear as an H squared here raised to the 3/2 power.

We also said that I can look at the probability of a single particle having momentum P1. And we showed that essentially I have to integrate over everything else if I'm not interested, such as the volume of the particle number one. The normalization was omega E, V, N. And integrating over particles numbers two to N, where the energy that is left to them is E minus the kinetic energy of the one particle, gave me this expression.

And essentially, we found that this was proportional to one side divided by E. 1 minus P1 squared over 2m raised to the power that was very close to 3N over 2 minus/plus something, and that this was proportional, therefore, to this P1 squared over 2m times-- P1 squared 2mE-- 3N over 2E.

And 3N over 2E from here we see is the same thing as 1 over kT. So we can, with this prescription, calculate all of the properties of the ideal gas, including probability to see one particle with some momentum. Now, if I do the same thing in the canonical form, in which the microstate that I'm looking at is temperature, volume, number of particles, then the probability of a microstate, given that I've specified now the temperature, is proportional to the energy of that microstate, which is e to the minus beta sum over i Pi squared over 2m. Of course I would have to have all of Qi's in box. Certainly they cannot go outside the box. And this has to be normalized.

Now we can see that in this canonical ensemble, the result that we had to do a couple of lines of algebra to get, which is that the momentum of a particle is Gaussian distributed, is automatically satisfied. And in this ensemble, each one of the momenta you can see is independently distributed according to this probability distribution.

So somethings clearly emerge much easier in this perspective. And if I were to look at the normalization Z, the normalization Z I obtained by integrating over the entirety of the phase space. So I have to do the integration over d cubed Pi d cubed qi. Since this is the phase space of identical particles, we said we have to normalize it by N factorial. And I had this factor of H to the 3N to make things dimensionless.

I have to exponentiate this energy sum over i Pi squared over 2m and just ensure that the qi are inside the box. So if I integrate the qi, what do I get? I will get V per particle. So I have V to the N divided by N factorial. So that's the volume contribution.

And then what are the P integrations? Each one of the P integrations is an independent Gaussian. In fact, each component is independent. So I have 3N Gaussian integrations. And I can do Gaussian integrations. I will get root 2 pi m inverse of beta, which is kT per Gaussian integration. And there are 3N of them.

And, oh, I had the factor of h to the 3N. I will put it here. So I chose these H's in order to make this phase space dimensionless. So the Z that I have now is dimensionless. So the dimensions of V must be made up by dimensions of all of these things that are left.

So I'm going to make that explicitly clear by writing it as 1 over N factorial V over some characteristic volume raised to the N-th power. The characteristic volume comes entirely from these factors. So I have introduced lambda of T, which is h over root 2 pi mkT, which is the thermal de Broglie wavelength.

At this stage, this h is just anything to make things dimensionally work. When we do quantum mechanics, we will see that this lens scale has a very important physical meaning. As long as the separations of particles on average is larger than this, you can ignore quantum mechanics. When it becomes less than this, you have to include quantum factors.

So then what do we have? We have that the free energy is minus kT log Z. So F is minus kT log of this partition function. Log of that quantity will give me N log V over lambda cubed. Stirling's formula, log of N factorial, will give me N log N over e. So that's the free energy.

Once I have the free energy, I can calculate, let's say, the volume. Let's see, dF, which is d of E minus TS, is minus SdT minus PdV, because work of the gas we had identified as minus PdV. I have mu dN.

What do we have, therefore? We have that, for example, P is minus dF by dV at constant T and N. So I have to go and look at this expression where the V up here, it just appears in log V. So the answer is going to be NkT over V.

I can calculate the chemical potential. Mu will be dF by dN at constant T and V, so just take the derivative with respect to N. So what do I get? I will get minus kT log of V over N lambda cubed. And this E will disappear when I take the derivative with respected to that log inside. So that's the formula for my mu.

I won't calculate entropy. But I will calculate the energy, noting that in this ensemble, a nice way of calculating energy is minus d log Z by d beta. So this is minus d log Z by d beta. And my Z, you can see, has a bunch of things-- V, N, et cetera.

But if I focus on temperature, which is the inverse beta, you can see it appears with a factor of 3N over 2. So this is beta to the minus 3N over 2. So this is going to be 3N over 2 derivative of log beta with respect to beta, which is 1 over beta, which is the same thing as 3 over 2 NkT.

So what if I wanted to maintain the system at some fixed temperature, but rather than telling you what the volume of the box is, I will tell you what its pressure is and how many particles I have? How can I ensure that I have a particular pressure?

You can imagine that this is the box that contains my gas. And I put a weight on top of some kind of a piston that can move over the gas. So then you would say that the net energy that I have to look at is the kinetic energy of the gas particles here plus the potential energy of this weight that is going up and down.

If you like, that potential energy is going to be mass times delta H. Delta H times area gives you volume. Mass times G divided by area will give you pressure. So the combination of those two is the same thing as pressure times volume.

So this is going to be the same thing as minus sum over i Pi squared over 2m. For all of the gas particles for this additional weight that is going up and down, it will give me a contribution that is minus beta PV. And so this is the probability in this state. It is going to be the same as this provided that I divide by some Gibbs partition function.

So this is the probability of the microstate. So what is the Gibbs partition function? Well, what is the normalization? I now have one additional variable, which is where this piston is located in order to ensure that it is at the right pressure.

So I have to integrate also over the additional volume. This additional factor only depends on PV. And then I have to integrate given that I have some particular V that I then have to integrate over all of the microstates that are confined within this volume. Their momenta and their coordinates-- what is that? I just calculated that. That's the partition function as a function of T, V, and N.

So for a fixed V, I already did the integration over all microscopic degrees of freedom. I have one more integration to do over the volume. And that's it. So if you like, this is like doing a Laplace transform. To go from Z of T, V, and N, to this Z tilde of T, P, and N is making some kind of a Laplace transformation from one variable to another variable.

And now I know actually what my answer was for the partition function. It was 1 over N factorial V over lambda cubed raised to the power of N. So I have 1 over N factorial lambda to the power of 3N. And then I have to do one of these integrals that we have seen many times, the integral of V to the N against an exponential.

That's something that actually we used in order to define N factorial, except that I have to dimensionalize this V. So I will get a factor of beta P to the power of N plus 1. The N factorials cancel. And the answer is beta P to the power of N plus 1 divided by lambda cubed to the power of N.

So my Gibbs free energy, which is minus kT log of the Gibbs partition function, is going to be minus NkT log of this object. I have ignored the difference between N and N plus 1. And what I will get here is the combination beta P lambda cubed. Yes.

AUDIENCE: Is your beta P to the N plus 1 in the numerator or the denominator?

PROFESSOR: Thank you, it should be in the denominator, which means that-- OK, this one is correct. I guess this one I was going by dimensions. Because beta PV is dimensionless. All right, yes.

AUDIENCE: One other thing, it seems like there's a dimensional mismatch in your expression for Z. Because you have an extra factor of beta P--

PROFESSOR: Exactly right, because this object is a probability density that involves a factor of volume. And as a probability density, the dimension of this will carry an extra factor of volume. So if I really wanted to make this quantity dimensionless also, I would need to divide by something that has some dimension of volume.

But alternatively, I can recognize that indeed this is a probability density in volume. So it will have the dimensions of volume. And again, as I said, what I'm really always careful to make sure that is dimensionless is the thing that is proportional to N. If there's a log of a single dimension out here, typically we don't have to worry about it. But if you think about its origin, the origin is indeed that this quantity is a probability density.

But it will, believe me, not change anything in your life to ignore that. All right, so once we have this G, then we recognize-- again, hopefully I didn't make any mistakes. G is E plus PV minus TS. So dG should be minus SdT plus VdP plus mu dN.

So that, for example, in this ensemble I can ask-- well, I told you what the pressure is. What's the volume? Volume is going to be obtained as dG by dP at constant temperature and number. So these two are constant. Log P, its derivative is going to give me NkT over P. So again, I get another form of the ideal gas equation of state.

I can ask, what's the chemical potential? It is going to be dG by dN at constant T and P. So I go and look at the N dependence. And I notice that there's just an N dependence out front. So what I will get is kT log of beta P lambda cubed.

And if you like, you can check that, say, this expression for the chemical potential and-- did we derive it somewhere else? Yes, we derived it over here. This expression for the chemical potential are identical once you take advantage of the ideal gas equation of state to convert the V over N in that expression to beta P.

And finally, we have the grand canonical. Let's do that also. So now we are going to look at an ensemble where I tell you what the temperature is and the chemical potential. But I have to tell you what the volume is. And then the statement is that the probability of a particular microstate that I will now indicate mu s force system-- not to be confused with the chemical potential-- is proportional to e to the beta mu N minus beta H of the microstate energy. And the normalization is this Q, which will be a grand partition function that is function of T, V, and mu.

How is this probability normalized? Well, I'm spanning over a space of microstates that have indefinite number. Their number runs, presumably, all the way from 0 to infinity. And I have to multiply each particular segment that has N of these present with e to the beta mu N.

Now, once I have that segment, what I need to do is to sum over all coordinates and momenta as appropriate to a system of N particles. And that, once more, is my partition function Z of T, V, and N. And so since I know what that expression is, I can substitute it in some e to the beta mu N. And Z is 1 over N factorial V over lambda cubed raised to the power of N.

Now fortunately, that's a sum that I recognize. It is 1 over N factorial something raised to the N-th power summed over all N, which is the summation for the exponential. So this is the exponential of e to the beta mu V over lambda cubed.

So once I have this, I can construct my G, which is minus kT log of Q, which is minus kT e to the beta mu V divided by lambda cubed. Now, note that in all of the other expressions that I had all of these logs of something, they were extensive. And the extensivity was ensured by having results that were ultimately proportional to N for these logs. Let's say I have here, I have an N here. For the s, I have an N there. Previously I had also an N here.

Now, in this ensemble, I don't have N. Extensivity is insured by this thing being proportional to G. Now also remember that G was E minus TS minus mu N. But we had another result for extensivity, that for extensive systems, E was TS plus mu N minus PV. So this is in fact because of extensivity, we had expected it to be proportional to the volume. And so this combination should end up being in fact the pressure.

I can see what the pressure is in different ways. I can, for example, look at what this dG is. It is minus SdT. It is minus PdV minus Nd mu. I could, for example, identify the pressure by taking a derivative of this with respect to volume. But it is proportional to volume. So I again get that this combination really should be pressure.

You say, I don't recognize that as a pressure. You say, well, it's because the formula for pressure that we have been using is always in terms of N. So let's check that. So what is N? I can get N from minus dG by d mu.

And what happens if I do that? When I take a derivative with respect to mu, I will bring down a factor of beta. Beta will kill the kT. I will get e to the beta mu V over lambda cubed, which by the way is also these expressions that we had previously for the relationship between mu and N over V lambda cubed if I just take the log of this expression.

And then if I substitute e to the beta mu V over lambda cubed to BN, you can see that I have the thing that I was calling pressure is indeed NkT over V. So everything is consistent with the ideal gas law. The chemical potential comes out consistently-- extensivity, everything is correctly identified.

Maybe one more thing that I note here is that, for this ideal gas and this particular form that I have for this object-- so let's maybe do something here. Note that the N appears in an exponential with e to the beta mu. So another way that I could have gotten my N would have been d log Q with respect to beta mu.

And again, my log Q is simply V over lambda cubed e to the beta mu. And you can check that if I do that, I will get this formula that I had for N. Well, the thing is that I can get various cumulants of this object by continuing to take derivatives. So I take m derivatives of log of Q with respect to beta mu.

So I have to keep taking derivatives of the exponential. And as long as I keep taking the derivative of the exponential, I will get the exponential back. So all of these things are really the same thing. So all cumulants of the number fluctuations of the gas are really the same thing as a number. Can you remember what that says? What's the distribution?

AUDIENCE: [INAUDIBLE]

PROFESSOR: Poisson, very good. The distribution where all of the cumulants were the same is Poisson distribution. Essentially it says that if I take a box, or if I just look at that imaginary volume in this room, and count the number of particles, as long as it is almost identical, the distribution of the number of particles within the volume is Poisson. You know all of the fluctuations, et cetera. Yes.

AUDIENCE: So this expression, you have N equals e to the beta mu V divided by lambda to the third. Considering that expression, could you then say that the exponential quantity is proportional to the phase space density [INAUDIBLE]?

PROFESSOR: Let's rearrange this. Beta mu is log of N over V lambda cubed. This is a single particle density. So beta mu, or the chemical potential up to a factor of kT, is the log of how many particles fit within one de Broglie volume. And this expression is in fact correct only in the limit where this is small. And as we shall see later on, there will be quantum mechanical corrections when this combination is large. So this combination is very important in identifying when things become quantum mechanic.

All right, so let's just give a preamble of what we will be doing next time. I should have erased the [INAUDIBLE]. So we want to now do interacting systems. So this one example of the ideal gas I did for you to [INAUDIBLE] in all possible ensembles. And I could do that, because it was a collection of non-interacting degrees of freedom.

As soon as I have interactions among my huge number of degrees of freedom, the story changes. So let's, for example, look at a generalization of what I had written before-- a one particle description which if I stop here gives me an ideal system, and potentially some complicated interaction among all of these coordinates. This could be a pairwise interaction. It could have three particles. It could potentially-- at this stage I want to write down the most general form.

I want to see what I can learn about the properties of this modified version, or non-ideal gas, and the ensemble that I will choose initially. Microcanonical is typically difficult. I will go and do things canonically, which is somewhat easier. And later on, maybe even grand canonical is easier.

So what do I have to do? I would say that the partition function is obtained by integrating over the entirety of this phase space-- product d cubed Pi d cubed qi. I will normalize things by N factorial, dimensionalize them by h to the 3N.

And I have exponential of minus beta sum over i Pi squared over 2m. And then I have the exponential of minus U. Now, this time around, the P integrals are [INAUDIBLE]. I can do them immediately. Because typically the momenta don't interact with each other.

And practicality, no matter how complicated a system of interactions is, you will be able to integrate over the momentum degrees of freedom. And what you get, you will get this factor of 1 over lambda to the power of 3N from the 3N momentum integrations.

The thing that is hard-- there will be this factor of 1 over N factorial-- is the integration over all of the coordinates, d cubed qi of this factor of e to the minus beta U. I gave you the most general possible U. There's no way that I can do this integration.

What I will do is I will divide each one of these integrations over coordinate of particle by its volume. I will therefore have V to the N here. And V to the N divided by lambda to the 3N N factorial is none other than the partition function that we had calculated before for the ideal gas. And I will call Z0 for the ideal gas.

And I claim that this object I can interpret as a kind of average of a function e to the beta U defined over the phase space of all of these particles where the probability to find each particle is uniform in the space of the box, let's say. So what this says is for the 0-th order case, for the ideal case that we have discussed, once I have set the box, the particle can be anywhere in the box uniformly.

For that uniform description probability, calculate what the average of this quantity is. So what we have is that Z is in fact Z0, that average that I can expand. And what we will be doing henceforth is a perturbation theory in powers of U. Because I know how to do things for the case of U equals 0. And then I hope to calculate things in various powers of U. So I will do that expansion.

And then I say, no really, what I'm interested in is something like a free energy, which is log Z. And so for that, I will need log of Z0 plus log of that series. But the log of these kinds of series I know I can write as minus beta to the l over l factorial, replacing, when I go to the log, moments by corresponding cumulants. So this is called the cumulant expansion, which we will carry out next time around. Yes.

AUDIENCE: In general, [INAUDIBLE].

PROFESSOR: For some cases, you can. For many cases, you find that that will give you wrong answers. Because the phase space around which you're expanding is so broad. It is not like a saddle point where you have one variable you are expanding in a huge number of variables.