 so in the last lecture we did discuss the micro chronical ensemble and the chronical ensemble we started this we discussed and I want to repeat that statistical mechanics starts with the two postulates and one hypothesis the postulates are time average equal to ensemble average time average is the experimental quantity experimental thing that goes on and we let gives at the main construction brilliant construction of ensemble so they had to put these two together that the first postulate time average equal to ensemble average second postulate in order to ensure that equality that every state visited in time averaging is equally probable or every state picked up in ensemble average is equally probable however one has to assure or want to guarantee that the systems trajectory takes you to all different states and that is the auguric hypothesis that means every state is visited and that is the one that has evoked lot of research over the years particularly in from mathematicians and the statistical mechanics starts at the level of construction of this formidable theoretical framework the most important role is played by this relation of Boltzmann's formulae entropy equal to kbl and omega which is often not realized that the entire statistical mechanics the micro canonical canonical grant and all the ensembles everything relation between statistical mechanics is how one knows is derived from Boltzmann formula so a variant of Boltzmann formula which is here omega is the number of microscopic states available to the system which is kept fixed at volume v energy with n number of particles a variant of that is used to derive the second equation which is free energy hemorrhage free energy equal to minus kb kb is Boltzmann constant times temperature then logarithmic of the canonical partition function and canonical partition function is given by this one-term version or sum over energy levels or classical that is integration over the phase space position and momentum what we will do today we will go from canonical ensemble to grand canonical then ultimately to isothermal isobaric ensemble so the whole derivation remember when we did from micro canonical canonical we had the following construction a mental construction you put all the systems in canonical ensemble together and we allow them to exchange energy and we put them in a temperature bath and when they achieve constant temperature then we remove then we remove the bath and put an insulation around it so that ensemble the canonical ensemble becomes a super system in the micro canonical ensemble then we do a super ensemble and with this construction then we repeat the calculations that we did in the micro canonical and that allows us to get to the the result that free energy equal to minus kb t l n q n so today we'll first briefly review the canonical ensemble and then we'll go to do the grand canonical and we would like to finish today and discuss the isothermal isobaric ensemble which is the NPT ensemble and the NPT ensemble is the one which is most commonly used in computer simulations and also very close to experimental results one you can start this essentially as a derivation as a definition of grand canonical ensemble there is the mu is now the chemical potential the horribly mixed notation as i said mu and gamma gets mixed up this would then z to the power n i think this is one of the type post people have pointed out to me so and this is pardon me my doing because i usually use this notation so this was in between put in uh because many of the things were edited by my students okay now what we now have to do we have to have in this the put in the constraint which is the how do i define not the constant how i define average number which we have to which we'll define density average volume and what the volume is fixed so average if i get the average number then i divide by the volume which is given from supplied from outstike and external constraint i'll get the density so then i have to define an average energy and average energy is this quantity and pressure is so you have to average energy you understand this thing that but now the sum note that sum is the microscopic state or the state of the system which is character microscopic state of the system characterized by energy ej and number n this is not the microscopic state i'm sorry because it's still the macroscopic state uh and uh because it's a large number of particles still there much of the time interestingly in the grand canonical ensemble these uh so the this is the average energy as i was saying that you note that they are a double sum now very interestingly the same definition we used of the pressure in the canonical ensemble we do the same thing but again sum over g and a and one thing that i was going to say it's very very interesting uh property you have to look into limiting limiting properties of this quantity this grand canonical ensemble now these sum starts from n equal to zero they're very interesting not even equal to one and q zero is by definition one so that so the grand canonical partition function starts with one n equal to zero this is one and q zero that means it does not depend this so this is a null or vacuum state that also no particle in the system also contributes to the grand canonical ensemble now next is n equal to one n equal to two n equal to three and uh this particular property plays a very important role because uh you know when you do these kind of sums that calls the uh generating function whenever i put a polynomial like that is a generative function so uh grand canonical canonical is the generative function of the canonical ensemble that becomes serious these are all positive that's very important and these are all positive because it is nothing but the sum of Boltzmann factors and Boltzmann uh each of the exponential is an entire function that is a completely analytical function these are very important properties since it is completely analytical function that means this is another analytical function you know if you know a little bit of mathematics one of the things now mathematicians are not given to talk of very big big big language but there is a thing which is called fundamental theory of ap algebra uh unlike physicists who very easily coined theory of everything and those kind of language mathematicians are not at all you know superlative they are very very reserved people but it started the culture instead it started with Gauss so what is the fundamental theorem of algebra there's a beautiful book by levidev i loved it where is that fundamental theorem of algebra yeah that's the rational approximation that's called rational function and that's a way to develop an approximation we have a all-basal function and all these things we have the rational approximation and a book of apprehensions taken it full of them but what is the fundamental theorem of algebra fundamental theorem of algebra is there a polynomial order n then you have n roots and depending if all these are positive then you will have roots in a complex conjugate that means one will be z another will be z star the one of the reason many people don't use z here is that you want to keep the z as a complex number you know that's why many times that's the reason of the confusion that two schools are there so it is extremely important to realize two or three properties one of them it starts from n equal to zero second at all of them are positive and when all of them positive then you have these roots which are complex conjugate and that plays very important you know without that property that will not be able to describe any phase transition or any property okay now so then energy goes like that bj and the pressure is also so i have now definition of pressure i have definition of energy and i have definition of all that then we play the game exactly we played from going to canonical from micro canonical to canonical exactly we do the same thing this dpj exactly same equation we did before but now everything is sum over j and n there i had sum only over j okay now then we would compare that with the thermodynamics and we will we'll see that the this already i discussed that lagrangian multiplier is this thing okay entropy generalized from boljuan formula and that this one comes again and again this variant so that's what i said one should could as well regard it as a postulate and this is the Euler equation when you combine you get the following equation pv equal to kbtl and this thing this is a very powerful and extremely useful thing now realize one thing while in micro canonical i will maximize entropy that to find this stable equilibrium system in canonical i will minimize the free energy or if i do minus eight that's the better way to write actually i'll maximize minus a which means everywhere i maximize the partition function so here we maximize the quantity pv so pv also has the dimension of energy right so in grand canonical applications in phase transition all the things we impose equality of chemical potential to derive our equations then we put the calculated pressure by maximizing this l n you know sigma so then we still go on doing the relationship you can partition functions that we just again the same thing we have to go to g equal to h minus ts and mu and e minus pt so the kind of things we did in the thing is again done here and one gets the beautiful relations of entropy so if you have the grand partition function you have this is the entropy then this is the number this should be average number and this is the pressure so that finishes this part now i'll spend some time because this is the one that used most extensively in computer simulations isothermal isobaric it was done and it was created because gives when we let gives was doing statistical mechanics we let gives carried it out the whole development of statistical mechanics with it aim to understand the van der Waals equation of states so there are those days two major approach that is going on the people whose stat mac was in very incipient condition one was bulgeman trying to understand Maxwell distribution and the phenomenon contribution was made by van der Waals actually van der Waals in one of the underrated scientists of the of the by gonada so van der Waals had not only the equation of state he also had a beautiful equation of interface and and so we let gives was trying to develop a theory of interface particular gas liquid interface and so as soon as you develop the the ensemble thing one of his first goal or was the beginning goal was to understand van der Waals equation of state the story is that when he did these things Maxwell so the we let gives nobody knew what we let gives was doing you are far ahead of time so he was doing this ensemble canonical ensemble micro canonical grand canon even terms were new nobody understood however on the other side of atlantic Maxwell was keenly following the development of we let gives and Maxwell sent or is the other way around i think but they they they were met but sent a solid kind of not marble but this kind of cement paste with a solid a of van der Waals loop of equation of state and gives always used to go to class with the one that sent was sent by Maxwell however Maxwell died very young Maxwell died at the age of i think 37 or 39 and within that little time Maxwell not only did his kinetic theory of gases he did whole of electromagnetic theory and many many other things but they well of course are we faces remember for you know his contribution one of the considered one of the most successful theory is that of that of electrodynamics now Maxwell's equations and then of course he has phenomenal contribution as you know in thermodynamics the Maxwell diagram SP TV and all these things are Maxwell's so is amazing how much he did in such a short time i as i remember died on 37 so when he died there was a common joke in atl or in America that in the entire world one person used to understand what Gibbs does and that person is dead so nobody so now so naturally these was the emphasis the NPT isothermal isobaric ensemble so we need to spend a little time trying to understand this this ensemble so now in this ensemble we are not allowing number fluctuations and it is very important computer simulation because as i told you this is the most suitable in many cases we allow now fluctuations in volume so long we have not allowed fluctuations in volume so this is the time when fluctuations volume is done and that one of the reason is that if you are studying a system where say liquid is going to crystal you can simulate with the same number but volume must change like what are going to eyes volume has to increase to 11 percent right so that has to be allowed so that's why this is an important thing in study of a transition as i said will it gives the almost entire thing with an aim and his big paper book where all the entire thermodynamics of homogeneous or heterogeneous heterogeneous systems that's the whole textbook where many of these things were done now so how do we do we essentially do the same thing again we go on there's a little take little trick of going through by introducing a agenda transformation and using this relation well known relation and then go to which leads to a definition of gifts gifts free energy not the hemorrhage free energy but the main thing that i want to so the analysis goes in the same way exactly same way we have done but one important relation that one finds useful in analytical work is that you can consider grand partition function as a laplace transformation of the this is a laplace term right so you can call volume as a time and beta p as the z the laplace variable or s then you see that one is a laplace transformation other and that is very very important consequence because then i can get q as a laplace inversion of the grand canonical partition function now the a is that so what we are using one thing that see the other notation that i use this chapter i think i think probably every chapter this will come through okay so this is the notation we are using for both one is z vt that is the canonical and this is i don't know who did it whether printer did it more is possible printer did it and other is the one i use is this thing for i should analyze over it npt but here i believe this was done by the printer and we miss a eat in the gallery so but there is no confusion because it is npt probably i did it go that because of the x everywhere it is npt written so that's why there is not much of a problem so what one can do by doing analysis very similar to the one that we have doing all through that going then you have to do what is the average number what is the average volume and average pressure and then you go through that that exercise you is that that particular exercise that we have seen already in the case of canonical partition function is elaborate and a little boring so i'm not going to do that but this is given in the book also so this is the final expression for this is the isothermal isobaric so advantage of isothermal isobaric particularly in chemistry is that this is the we get the Gibbs free energy so and this plays an extremely important role go back it is very tempting for me to start on phase transition here but i will not go do that here so this quantity the thermodynamic potential in grand canonical ensemble and thermodynamic potential in isothermal isobaric ensemble are so if i do remember g equal to and that is e plus pv minus ts and e minus ts is hemogenogy right then plus pv so g minus a is pv and so pv is kbt ln zbt right and g is so i have what i'm trying to say that we have a relation at the level of logarithmic of all the partition functions this is then comes in isothermal isobaric this is the canonical and this is the grand canonical and this is an amazing relation that is often given in slightly advanced courses of statistical mechanics that show that this relationship you know you of course you are not expected to derive the whole thing but you are expected to write down the expression of the potential these are amazing relation one should remember because this is the one we use when we do ramagration use of theory of freezing or density function theory of freezing that this this trick is used okay and now now i have discussed it here is very important that what is the physical interpretation then of the what will let you remember and understand the partition function i have already discussed different ensembles come with different partition function but all of them have one common thing is that either your the partition function itself it has to be maximum so the state that is selected or the state that is thermodynamic is stable is the one that has the maximum partition function now you can understand that physical insight from canonical ensemble why can anybody tell why canonical ensemble everyone gives every ensemble gives this beautiful interpretation but why in canonical ensemble this is particularly held tightening and very very intuitively clear so partition function i can write i can also write in a some normalization which i am not going to talk now all the particles all the momentum and e to the power minus beta h h is the Hamiltonian right i don't remember giving these equations to you when he did micro canonical ensemble so he started grand canonical allowed fluctuations then what how did the logic go we started with molecule canonical then we relaxed that we constructed the thing and then oh yeah we did that because that is what was done in normalization right i explicitly separately these i wrote down but classical version i did not write down that is a classical version now what i am asking you we already discussed that qn for all in qn is positive positive definite that's a very important quantity because that's they are the coefficients in the polynomial that defines canonical partition function now i am asking you a question that it is intuitively clear in any of this definition it's most clear in this ensemble not even in micro canonical why a partition function maximum partition function selects the macroscopic state not that i am asking something very simple is it really simple but you need to think that a macroscopic state which defines the equilibrium or the stable state because that's a supposed to be stable for time t goes to infinity why that is partition function is maximum okay see just i give you a simple example and now you should be able to tell i have these two which one will be selected why darbhava that because this is where this is maximum if i have just two state like that then this still has certain contribution but i have to say infinite number of particles in my system macroscopic each particle is little stabilized then this just disappears this is selected and that comes from this this this expression that it is the energetic criteria which we intuitively understand intuitively understand from our boljman distribution is included in the partition function and that's exactly this very very important that i'm telling because that's how selection is done absolutely zip it just goes through to keep in coexistence particularly in computer simulation is extremely difficult even in computer simulation of thousand particles this what i'm telling here becomes very important okay so let's continue these are very very intuitive and very nice so you have to understand i remember when i taught and gave exams we should do some problems so now that what i have been telling is that these are these are the functions for a given thermodynamic state read this and the partition function is maximum at equilibrium this is a very important thing that note statmic book tells you let us elaborate this and the often quoted statement to gain some physical insight then i describe consider physical quantity it can be function other than the state functions then all these quantities are satisfied very important because when you try to expand the free energy like in land of theory of phase transition or any kind of thing that we the first derivative goes so the order parameter zeta is the order parameter in the parameter that distinguishes between old and new that will discuss in detail this condition is very important so the first term and if there is a symmetry then third order term also not there so it's that's why this is the reason why the free energy function for small displacement is harmonic is an extremely important quantity because the coefficient of the harmonic the force constant are what we call the response function those specific heat thermal compressibility all these things are the second derivative of these quantities and that is the reason in a phase transition these quantity will become the harmonic frequency goes to zero because the springs we call the small functions of the springs and they soften up it's very beautiful thing that going on there so then as i'm telling you that they are so these are the cartoons micro canonical then canonical and then canonical that kind of thing my students i found are very good in cartoons and so there's a problem said i'd imagine somebody has to do the problem said okay so these completes the a on canonical on the on the partition functions next what you are going to do is to start on the next chapter which is the okay we have two ways to go from here but i i would like to really jump the board a little bit and do something very interesting which is this the response functions that you have been discussing that means which are in terms of fluctuations so the response functions are secondary derivative of the free energy like specific heat and compressibility but their real meaning is that they are the quantities which are the standard deviations or mean square fluctuation of the relevant quantity so the idea is the following we will do the response function or fluctuations chapter is i think chapter five or chapter six is fluctuations in the book after fluctuations because it is so important i want to do it for next after fluctuations that was done by Einstein after fluctuations we do monotomic gas and diatomic gas all right okay thank you right very good question npt simulation see the way when simulation happens if you plot the pressure you will find that you will win with the barrel stat which is slightly fluctuating but we define it it has to be on the average the pressure you your piston which is barrel stat so it is not correct to say absolutely not fluctuating but it's fluctuating very small amount the one that is fluctuating is the volume volume is fluctuating in a big way but you can still define a volume and the the mean square volume fluctuation that gives you the compressibility absolutely yeah absolutely the thermodynamic properties calculated in ensemble every ensemble is the all the thermodynamic properties are the same that because one can show we'll do little bit in the energy fluctuations today today afternoon we'll do that the fluctuations or mean square fluctuation see what we need to talk of the quantity and then you know how it is varying with n and what the fluctuation in the quantity that you can so it goes as one over root n or one over root v so n going to infinity so you start the micro-canonical ensemble no fluctuation is allowed in e n and v now i go to canonical ensemble i allow fluctuation energy now i calculated how the fluctuation energy goes it will go as one over root n now i go to grand canonical i allow fluctuation of in now now i calculate how the fact so the result that you get at the fixed in a micro-canonical ensemble becomes the same at canonical ensemble the same at grand canonical ensemble calculation of properties in micro-canonical ensemble essentially impossible it's extremely difficult that become progressively easier and that will discuss that because yeah this i think you got to you know you need to love mathematics to do stat mechanics the very mathematical subject i was going to tell and i forgot because i i usually do a random walk in my teaching but my all through this years my students whom not my own students my students who took my course always they say they enjoyed and remembered this little bit of random walk that they do so i tried to tell that is where i came to tell you the fundamental theorem algebra that grand partition function is a infinite series is a polynomial but it is a series because up to infinity however you can pack only certain number of particles because of the heart sphere kind of interaction short range interaction so n equal to never infinity it becomes a maximum value so it becomes a polynomial so when it becomes a polynomial then it is zeros zeros of the polynomial determine the singularity of the partition function and properties and that those are the things called very famous we'll do that i have a chapter i think chapter 13 or 14 in the book which called yungly theorems and that was exactly that very very famous contribution by sier yung and tidily you got nobody's for to work confinement but this was also one of their phenomenal contribution has to be take a put think of putting a marble ball in a jar you can put only a certain number because after that you cannot pack so we'll come back