 OK, we are going to do an exercise. I promised you that I think it's something that it's good to remember and to bear in mind. I think it's very nice. I think it was done in a publication by Bonetto. It is cited in my notes, I think. So we're going to, first of all, build a thermostat. A thermostat, in this case, is something that will keep the energy constant. Now, if your system is following Newton's equations, there is no need for that. But imagine all the things that need a thermostat. For example, I have a sample. And I want to apply, this is a metal, and I want to apply AC magnetic field. You don't need to know a lot, but the thing is that the magnetic field is going to shake the dipoles inside. And this will create energy. If I want to study, even theoretically, this situation, what will happen is that the system will heat up. Because necessarily, it's like when you stir coffee, you're heating it up a bit. So unless you want to study specifically a situation where a system is heating up, that is not usually what you want to study. What you usually want to study is a situation in which this is in contact with some thermal bath or with some thermostat. And you do this. And then the system reaches, in this case, not a steady state, but a periodic state. Another example that we will talk about a little bit is in hydrodynamics. You have, I don't know, water. And then you have here some sort of thing that is turning. And you would like to understand, again, this is turning, you would like to understand. So this gives energy in some manner to the water. And you want to understand things about it, how much work you're doing, and so on. Again, if you're going to be strict, you're heating the water up. So maybe you want to study that, but usually you want to study a steady state, a state where the heat comes in through your work and then it goes out, and it goes out through some form of thermostat. So even theoretically, for many things, you need a thermostat. The one we're going to do here today, we're going to do two. The one we're going to do here is in connection with that little exercise. We're going to do a thermostat that is called, for reasons that I'm not very sure, the Gaussian thermostat. And it's a thermostat that fixes energy. There are thermostats that fix temperature. And those are the ones that are more common and are more, let's say, less theoretical. Because as you will see very easily, the thermostat I'm going to propose is not going to be something that Mahesh can do in his lab. But theoretically, they are very interesting. Why am I doing this exercise now? We will come back to this, but what I'm doing is the following. We have a system, and I told you that this was proven that it is completely chaotic, energetic, meaning that, loosely speaking, the energy shell is explored uniformly. We are going to discuss a little bit that, and then we are going to see what happens when we do exactly the same thing, but now we force the system with forces like these, and we apply a thermostat. And so the question is, okay, I am forcing the system, but then I'm applying a thermostat that keeps the energy constant. Can I recover ergodicity, thermodynamics, and so on? Is this a strategy that allows me to study any problem and you will see that there's a lot of limitations to this. This is going to be interesting for you because many of you will end up solving equations of many actors, for example, reproduction of cells or active matter and so on, which follow equations, but they follow and maybe keep the energy constant, but these equations are not of Hamiltonian form. And then you will see what are the limitations or what one can one do about it. Okay, so let's build our thermostat if I can find, yeah. This is, I think, also called Hoover, like the vacuum machine thermostat. Okay, so we have two dimensions. This is a simple Hamiltonian system. This is a force that may derive from a potential. And then we will add another force that doesn't. In, for example, this case, the force that doesn't, it's going to be, this will have periodic boundary conditions and it's going to be a force that goes like this, like this, and comes back like this. So it doesn't derive from a potential because it's like a torus, no? So you, so it does work on your system. And now this is just the equations of motion. So we have what? We have, these are the usual equations for a system that could be conservative. This is the drive term. And now we need to add the thermostat. So the thermostat will, we will do the following. It's, when you think of it a bit reasonable, we are going to add a friction. A friction is a term that is proportional to the velocity. A frictional force is linear in the velocity. So this is on purpose because this is doing work on your system. I need something that takes it away. So I will do something proportional to the velocity, but I will regulate it at every time so that the energy is constant. So this is a function of time that we will have to fix. And we will construct this in such a manner that the system keeps a constant energy. But the signs, because gamma is going to be, yeah, I don't know, the literature can, but the sign doesn't matter because gamma we will have to determine, no? So if I do it negative, it will, yeah. Okay, so let us, how do we guarantee that this thing is going to conserve energy? Well, the trick is to multiply these equations, this equation, sorry, what is it? We're going to multiply this equation by P left and right. So if I multiply and then I sum, this is just mathematics, then I have P i, P i dot equals minus d v d q i. And P i is q dot i over m, okay? I used this equation minus, here I could put P i if you want F i. I use the fact that it's the derivative because it's going to be useful for us, where are we? Thank you. And gamma of T P i squared, okay? So now here you recognize, and yeah, it was more comfortable to divide by the whole equation. The fact is that, look at this one, this is the derivative of P i squared over two. This is the derivative with respect to time because the potential depends multiplied by m, and here I divide by m and I put the minus side. I pass it to this side, and here on this side, yes, oh sorry, the derivative is also like that. Here on this side I have minus P i F i plus gamma of T P i squared. And now the mistake I made before, let me divide everything by m, and now it's nice, okay? And you make this one nicer, okay? Up to now I haven't done, and sorry, and now implicitly I'm going to sum over i. It has been summed here already, and I'm summing over i. Okay, for the moment, this is just using the equation of motion, and now I want the energy to be constant. That's the aim of this game. So I would like this to be zero, okay? Nice, so this tells me that if I want this to hold, I have to tune the friction at every instant. This is why Mahesh will not be able to do it. Here I do q dot i dot i, and here, let's say q, okay? So, where? Here, here? No, no, because it's P over m. Okay, so the whole story is that you are on an energy shell which is this thing equals constant. You are forcing the system. Remember that this is the force that doesn't derive from a potential, that could not derive from a potential. And now I'm asked, I have to tune this so that tweaking this because there is a forcing that would kick me out of the energy shell. This guy, if it's tuned this way at every single instant, it will keep the system on an energy shell, okay? So this is a system that conserves energy. We sort of imposed it, but it is not Hamiltonian. The equation of motion, as you see, this is not Hamilton form. This is not Newton. It has a force that is linear in the friction. Okay, two minutes to analyze this expression because it's very interesting. First of all, look what this quantity is. Force times velocity. So this is a power that is being done on the system by the non-conservative force. And what is this? This is kind of a kinetic energy average. So let us say that this is playing some role of, like as it were a temperature. It's not strictly a temperature for the moment because we didn't explain, but it's the average kinetic energy of a particle. Let's call it temperature. It's usually called that way. But what is power divided by temperature? You probably have seen and we will. So this is the power. And this would be the entropy production. So I'm telling you this. Maybe you don't know at this stage exactly what entropy is. We will discuss about this, but it's called entropy production. For those of you who have seen thermodynamics, entropy is precisely the energy, the change in energy that we're giving the system divided by temperature. If you haven't seen that in thermodynamics, it's just a name, okay? Yes, that this comes out in this thermostat this way was a very nice discovery because this is not a thermodynamic context. And you will see that it's even nicer in a second. Okay, so we have this thermostat and now our question is going to be, if I have a system that I manage that his energy is constant. Remember I told you a hundred times yesterday that there is some property that your system has to have in order that you can guarantee that eventually it will equilibrate, it will be ergodic, it will explore the energy shell in a democratic manner. All these are synonyms, okay? Now, this system, ah, sorry, another remark that is important. What happens if the force that does not derive from a potential is zero? Well, then gamma is zero, but that's good, no? It's telling you that if your system is not forced, the thermostat doesn't need to do anything. It conserves energy on its own, the system. And of course the so quote unquote entropy production is zero, okay? So now we're going to first discuss this system without forcing, so we don't need the thermostat. As I told you last time, what Mr. Sinai proved is that, so you crash against the wall, somebody yesterday asked me after the lesson, what is a wall? A wall is a potential that does this, and this is super high. So your particle comes and rebounds. So you can always think a wall as an infinite potential that you have in front of you. If not infinite, much higher than the energy you have, okay? If you don't like a wall because this is a bit cruel, you can make it a limit of a decent smooth potential and consider stiffer and stiffer situations, okay? So when I say V in this case, I'm talking about these walls. It's the only potential there is. Otherwise, within these regions, things are completely flat. So the only purpose of the potential is to reflect your particle when it meets the wall and it reflects it with a law of optics, no equal angles. So this reflects this way. I'm trying to be fair with my drawing. Now it comes into here. So to say that this is ergodic means a lot of things and it's amazing, you will realize how amazing it is. So I'm going to erase this part only. To say that it is ergodic, it means in that case that first of all, all space because the energy has to be constant and it's infinity here and zero here, all space has to be occupied with time, has to be explored completely democratically, yes? So the probability that in a long time you pass by this little square is just proportional to the area of that little square, okay? Then it also means that the velocity, which is fixed because you don't have any friction here until you will put these things, also is democratic. So you have Px, Py and it has to, again, if I ask what is the probability that the velocity is that, it is with time going to be explored also democratically. This is like saying that the constant energy surface is explored flatly, but there's even more because the form of the energy is P squared vector divided by two plus V. The distribution of this and this are independent. So this means something amazing. It means that if I am standing here, I'm going to see all directions of velocity with the same probability. So the fact that the wall is beside me doesn't change average over, this is amazing, no? And this is one example and you will, I will try to bombard you with examples where equilibrium is an amazingly strong concept. Mostly to tell you that normally you in your work are not going to have it because the equations that probably you will have to face unfortunately are not going to be equilibrium. But you see how amazing it is that even though the wall is nearby and you would think it would correlate with you, it doesn't. The fact that the measure is flat, it means that every point, if you think of it and take randomly a point on this constant thing, you immediately see that there is no, it's as if on average velocity and position, it's not mean, do not correlate at all. Okay, so the proof of this, as I told you yesterday, is hard and I have no idea how it's done. Well, I have a vague idea how it's done. Okay, there is a property here is that there is no, this is a thermostat but it's completely deterministic. Okay, so now we have this and now we will add a thermostat to this. So let me do these equations. So this one is this one and we would let us set the mass to one, doesn't matter. And we are going to apply here and this is going to be the only force that doesn't derive from a potential of a constant forcing in that direction. Okay, so we will have, well q dot x, q dot y we know and we have p dot x. In x, we only have the effect of the walls. Walls means the potential with the walls. Plus, this term has to apply, gamma of t px and p dot y is going to have the walls plus. Now we have the forcing to which we will assign a sign. The sign is a bit arbitrary and pointing in that direction plus gamma t times p y. Okay, so this is the thermostat equation. If you like here, you just simply put q dot dot x, q dot dot y, q dot x and q dot y, okay? Okay, and then that proof holds the energy is conserved, no problem, okay? So okay, fine, we applied the thermostat to this problem. Now let me show you what happens with this problem. We will, if you solve these equations, it's easy to do because you see this one is linear and this one is linear too. It's easy to do but I can tell you the solution, you can do it but it's very simple. If the particle is going this way, the field will want it to accelerate in that direction and the thermostat will keep the energy which is the kinetic energy constant so it will turn in this direction but the velocity will be shortened by the thermostat. So it will do this and move that way. If it's moving that way, the field wants it still to go upwards so this will do that something like this. So sorry, this is straight, it will do like this and it will move upwards and then even more straight. The only thing is that it doesn't accelerate because precisely for that, the thermostat is taking away energy. So the only thing that the field does is align you on the y-axis, thanks to the thermostat. You see if I didn't have the thermostat, it would be a mess because the particle will keep on gaining energy eternally and we don't want that, we want a stationary system. Is it okay? So now very easy, if you want to consult these equations you're going to confirm what I said just now. Now forget about this one and let us consider a case where the field is super strong because it will be easier to caricature. So we start here, the thing will be like this. Now it does this but the thermostat wants it to do like this. No, the thing I was saying. Then it does this and then it wants to be like this. Then it does, the rebounds are as usual. Are you convinced? And similarly on this side. And next time it comes, it comes already through here. So it comes, yes, so I didn't solve these equations because it would take us a short time but you see what this is doing. The thermostat we are choosing has something that takes away from the energy and the only energy, when the particle is flying the only energy is the kinetic energy. So it keeps the modulus of the velocity constant. Now when for example your particle comes like this and crashes against a wall it crashes with a law of reflection. Now the field wants it to do this. It's pulling it up. The only thing the thermostat is doing is that normally it would be gaining speed but the thermostat removes this gaining speed so the direction turns because of the field but we are not gaining in kinetic energy because the thermostat, the only thing it does is it takes it away, okay? So it sort of aligns the particle. Normally it would accelerate, not like gravity but imagine with gravity I throw a bullet but I have somebody who is always changing the velocity the modulus of the velocity. So the particle would still do something like this but it would not accelerate, just change its direction, okay? This is the way that it works automatically with those equations. Yes? Please have a question about, so maybe instead of adding another forces, the heat that you add over there if maybe we consider that the wall that we are going to use is going to absorb one part of the energy of the system. So in that case, are we going to have a equilibrium? The problem is that a potential, a force that derives from a potential doesn't absorb all the time. It always gives you back. So I throw a ball, it absorbs my kinetic energy but then it gives it back to me. So you need something that violates this form. That is not the gradient of that. So to take away, it has been chosen. This is a choice that is going to be friction. It's okay because friction is something that we have in life. A force that is proportional to the velocity cannot be derived from a potential and it takes away your heat, your energy, okay? No, there was you? No, okay. Okay, so are you convinced by this graphical solution of the equations of motion? You can, of course, do it. It's just when it's flying, it's flying and when it hits a wall, it remounces, okay? So at the end of the day, with a very strong field, I used a very strong field just to make it more extreme. At the end of the day, what I will have is something that comes in, pump, pump, pump, pump, pump, comes in, pump, pump, pump, pump, pump, pump, and so on. Okay? And so, for example, if I consider long times now, this region is not explored at all. It's, and furthermore, if I look at this, there is a very strong domination of this velocity because while it's flying, the field tends to align and then when it rebounces, you get other possibilities because the wall changes your direction. And furthermore, the non-correlation that I said before was a miracle between velocity and position is gone, why? Because when I'm outside the wall, I expected the velocity to be almost always vertical. When I'm near a wall, it's the only times at which I can have another angle. So all the miracles of thermalization of ergodicity have disappeared. And this happens as soon as I connect the forcing. I think this example is super nice because it illustrates, and we're going to come back to this, it illustrates how equilibrium dynamics, that potentially can lead you to equilibrium. Here, equilibrium, I'm using it in an ambiguous sense. It's not, well, the equilibrium is established when your dynamics allows you to do this. And you will see that this means some form of time reversal, as I told you already. Equilibrium dynamics of all the possible dynamics that you have is a very, very, very singular point. So of all the book of thermodynamics that you read, essentially 90% is an isolated point in the set of systems that you can have in life. And if you're going to do complex systems, complex systems, maybe your particles are going to be agents that buy or sell in the market or they could be cells that are competing and reproducing or they could be lots of things like this. Neurons, you cannot expect these people, these things to satisfy Hamilton's equations. And they will not. And then what is the probability that they satisfy an equation that leads to ergodicity, zero. So this is the thing one has to keep in mind. Yeah, so to put it pictographically of all the energy shell, which in this case is p squared constant and being outside the walls, you are only exploring some region. No, because this is a region and there is another one here, no? Okay, so now a little calculation, very simple calculation that is, I think, very nice. So these are the equations of motions when you have a thermostat, okay? Now, when you have an equation of motion that is like this, x dot i equals a certain function of all the x's, a vector function, and you want to start and you start with a set of initial conditions, you would want to study how the volume of this set of initial condition changes. So with dynamics, it may do this. Each point goes to a point, okay? You have studied, and this is the origin of the word, that what you have to do is calculate the divergence of this field. This is the origin of the word divergent. So the derivative of the volume with respect to time is this thing. This is the divergence, and this is why it's called divergence, okay? So we are going to calculate the divergence of this and see what we can learn from it, okay? So let's calculate the divergence of this, okay? So this is the equation for q. I have to differentiate this with respect. So the divergence, the derivative of the volume is the divergence of the equations of motion, and it is. First of all, I have to differentiate this with respect to q because it's a q coordinate, zero. Second, I have to differentiate this with respect to p. This part is zero. This is a potential. So we already realized that the Hamiltonian terms do not contribute to the divergence, very nice. Then I have to differentiate this with respect to p, zero. And then I have to differentiate this with respect to p, one. So all in all, I get n times gamma of t. So it means many things, n is the number of degrees of freedom because it's a sum. It doesn't matter, I mean one could have, but it's okay, and yes, sorry, two. I did it in general, but in our case let's keep the n. So it's a total sum, it's something extensive. So this means that if I start with a set of initial conditions here, it could be this set of initial conditions with all velocities like this, and then I follow all these initial conditions. So this is like an ink, think of the ink blood that is sort of moving. These are all that the dynamics takes you through. This is going to have, in fact it is a contraction that is proportional to gamma, but we said that gamma was the entropy production or force divided by temperature, work divided by temperature, and we also said that gamma was zero in a Hamiltonian system, no? You don't need the thermostat that is doing nothing in a Hamiltonian. So first of all, the ink blood size doesn't, volume doesn't change if the system is pure Hamiltonian. This is also known as L'Huvel's theorem. It's an amazing property of Hamiltonian dynamics that if you consider all the points initial condition here and you consider it a while later, the total volume they occupy is constant. This is why, remember when I was discussing ergodicity, I always said that you had an ink blood and in a case that it sort of stretches, I say stretches and not spreads because it conserves the volume, which is quite a miracle, okay? That's Hamilton, Newton conservative. Now, what happens here? I mean, how can the volume of something contract forever? Now we have a forcing and we are letting this system move with the thermostat. How can it, how can a volume contract forever? Can somebody guess? Nobody, you're shy, I think. So then Matteo will have to answer. You want to embarrass Matteo? Okay, yes, exactly. So a volume can contract forever if it ends in a point, zero volume, or if it is in a fractal. It ends up in a thing that has zero volume and the only things that don't have a volume are not the points, are also fractals. So this means that if you wait long enough in this thing, and this is amazing, not only you will not visit democratically, we saw it already, but on top of it, not even smoothly, the attractor as we call it, the set of points that you have a very long time in the dynamics is a set that has zero volume. It's a curiosity, we're never going to use this, but it's nice to say, when gamma is zero, nothing, you have conservation of volume, and then gamma finishes by being zero. Okay, so what have we learned from this exercise? I think two things, first of all. Another question, so about the sign, so gamma is the entropy production, right? Yes, and it's you doing work on the system, not the system on you. Okay, so the entropy production in this case is negative. Yes, I don't know, the signs depend on the literature, but the important thing to know is that when you stir coffee, you are heating up the coffee and you're not getting any energy from the coffee into your spoon, that's what you have to bear in mind. This is the second principle, so it's in that direction. And this is entropy contraction, I'm sorry, volume contraction. The other possibility would be expansion. Of course, maybe one can write systems, I don't know, but not in this one. Okay, so two things we have learned. Equilibrium properties are amazing. They're super strong, we will see this a hundred times. And they are very surprising and you shouldn't expect them to be valid away from, as soon as you do something that breaks this equilibrium property. You will also see that there is a lot of literature, really a lot of literature, where people attempt to do things in equilibrium, as if you were in equilibrium when you're not. The literature is not necessarily bad, it's simply that it's an assumption that is extremely strong. I heard we were talking yesterday about maximal entropy principles that are used, I think some of you, I don't know who it was, maximal entropy means that you are assuming in a system where you don't have a right to assume that, however, you are more or less democratically studying all the possibilities. Okay, this is a very strong assumption. I mean, the people who do it understand that it is a very strong assumption. But there is no a priori reason why such a thing has to be true, okay? Good. Any questions on this? Because I'm going to change gears a little bit. The system that, what is it about the curvature of the system that makes it aquatic? That it's like this, so it amplifies the differences. It's like a convex length, a mirror. So if we were to reverse the curvature. But you cannot make it like this everywhere. But if you want something that is not chaotic, then you need a symmetry. For example, an ellipse, amazingly enough, doesn't have any chaos. But if instead of an ellipse, you cut a piece of ellipse and you make it straight here, it has chaos. Go figure. So it means that you have to be careful. By the way, this is what people call a billyard for obvious reasons. So do we learn that due to the presence of this external field, we get this entropy production? Yes. Okay. Yes. So if there wasn't any external field there. No. And it is. And egodicity is lost by this. Egodicity is lost by the effect of the field. And then there is a question, it may be someone of you asked. I said, there is no entropy production in a purely Hamiltonian system. But you say, well, how is this possible? I mean, we are taught in school that thermodynamics with Hamiltonian and everything, entropy increases. This is a fantastic subject. It's almost philosophy. It increases, sorry, you're guilty. You're guilty. So in a Hamiltonian system, an ink blood, it's a metaphor, becomes, as I said, stretched, but its volume is conserved. So entropy is not produced, okay? So how is entropy produced in the room where they've had half the full and the other half? No. The answer is entropy rigorously is never produced. It took humanity the best minds of Europe half a century to work this one out. Entropy does not increase in a Hamiltonian system unless you decide to look at your space in a coarse grained manner. So you fix an epsilon and you say, I'm going to look at it in the scale of an epsilon. I am going to make a small error. And if you do that because your ink blood is super stretched, then it is as if it were uniform. And then you regain, you lose the conservation of volume. This is, for those of you who want the origin of irreversibility. So it took half a century for people like Boltzmann. Maxwell got it very before others. How can equations of motion that are reversible like Hamilton's produce irreversibility? You know, irreversibility, I throw a glass, it breaks, but I never see the pieces coming up and reproducing the glass, et cetera, et cetera. How can this be possible? And technically speaking here, you see it very well. The volume of this thing, which is the entropy, the log of the volume is the entropy, we will do a calculation. It's conserved. So how is this, there's no entropy production. Yes, true. But it appears only when I decide to look at the same thing with a little bit of error, coarse-graining. Only then entropy is produced because this thing conserves this volume, but it's so fractured into little filaments of ink, let's say, that when I look at it from a distance and I close a bit my eyes, I see it as gray. Or in other words, you have black and white. The volume of black is constant, but the black is sort of stretching and stretching and stretching such that if I manage to see the thing without precision, I see it all gray. So this is the paradox and the origin of irreversibility. I didn't want to talk about this, but since you forced me, I'm doing it, okay? So one last question. So in microclinical ensemble, we keep calculating this entropy and there's the fluctuation term, which is like connected to this, right? We need to have some fluctuation in energy or Hamiltonian that is causing this entropy. What is causing the entropy is the force, this frictional force, which is modulated, it is fluctuating, but it's always, not always, but most of the time working against you, stopping you. Occasionally it gives you a little kick, but most of the time you're losing. That's what the second principle said. This creates entropy, which is the same thing, it's synonymous with the volume reducing. And this one is, you can write the equations, but if there is no F, there is no gamma because there is no need for gamma and you see it from the formula. You said if gamma is non-zero, then it will land on a fractal, it could land, right? So instead, can it not land on a, let's say, circle or some limit cycle? Yes, yes, it could land on anything that has lower dimension. In, I think, in most cases it ends up by being a fractal because you should be, I think, very lucky that it's sort of an integer, has to be a dimension smaller than two in our case, no? So that it doesn't have volume. I think that you're never lucky that it's going to be precisely one, but I'm not a big expert on this, but it will land on anything that has volume zero. Okay. And this is, ah, and you know nothing about it a priori. There is no formula that tells you what the attractor is going to be. Once you're outside the equilibrium, you're on your own. You don't have any way, a priori, to compute the attractor set. So you could say, well, I'm going to do thermodynamics, but instead of doing equi probability, I'm going to have another measure. Yes, you have another measure, which is where this system goes to, but there is no general, never any general formula for that never other than doing the dynamics. So I have a question or observation. So isn't this example of the breaking glass misleading because if your glass, I mean if everything was Hamiltonian, then if you wait long enough, you will see the glass form again. Yes. So, I mean it's, you have to wait a very long time. And here, unfortunately I don't have the film, but if you go to, I'm going to give you the website tomorrow. We think you do the experiment with ink. The equations are very similar on the other hand. And you turn a crank and the ink thing goes like this. And then you go back, I don't know if you've seen it. You go back in your cranking and it remakes the, so you have reversibility. This is the big paradox. This is why irreversibility is a problem in Hamilton. Because yes, it's true what you say, but if you coarse grain, if you allow a little bit of error in the motion, then you never come back. But basically never come back. Or the times in which you come back are epsilonic with respect to the total span of time. Yes, yes. Showing a better picture. Yes, yes, the coarse graining. But the one has to remember there is a famous thing where Boltzmann was discussing with, I don't know whom, about entropy and how is it possible when you have a reversible equation of motion. And there's a famous quote from Maxwell. I don't know what these Germans are discussing. They were not Germans, but for Maxwell probably, from his perspective, everybody was a German. And I don't know what they are discussing. It's clear that irreversibility can only happen if you coarse grain. So he saw it. So the correspondence was between Boltzmann and Ernst Zermelo. Zermelo, who was also, no, he was German, I think, yeah. But Ernst was also against Boltzmann's ideas. Yeah, and they were fighting for this. And I think that Maxwell, at the end of his life, understood that irreversibility comes from some form of coarse graining, which we have. Okay, let us, this is over. So now I'm going to change a little bit gears with a couple of exercises that I think are important and then we'll see a couple of things. So remember I said that the two things that count are the possibility of doing equilibrium and the fact that you have many degrees of freedom and that those things are independent. Okay, let's do this simple exercise that probably you've done, or maybe not. We have a sphere of radius one in d dimensions and we're going to throw a point randomly inside the sphere and we will try to see how big is the radius of that point, that the radius of the sphere is one. But we're going to throw a point at random and ask what is the radius. Okay, so let's do the average and we normalize by the volume of the sphere, which is the integral of the number one within the sphere. Okay, very good. So now we go to polar coordinates. We will have a volume here that we don't care for the reason that you will see. We go to polar coordinates, you know, the Jacobian. So this comes from integrating over all the angles, nothing depends on the angles. This R is this X here and the normalization, this is why I don't care, is so that if this wouldn't be here I get one, okay? And let me write it in a slightly more suggestive way. Sorry, I should put a prime here because it's not the same integral. Okay, so this I'm going to put it like this with a normalization so that this thing has an integral of one and then I have the thing of which I am calculating the average, okay? I just rewrote this one in a more suggestive way and I'm going to call this rho over R because it's a normalized density of probability. Okay, so now we have to calculate this. Of course it's not difficult, but we bet the good thing is to see what this looks like. So let me plot this function. It's a function that has an integral of one and starts in zero and it's super for D large, sharply picked in one. No, because this is a very high power. If you want I can write this one and we will do this very often. So it's the log of R what we're doing. This is a way of saying that D minus one is multiplying a smooth function of one. I just took the log of this thing. So what is important in this calculation is this exponent here, okay? So the morals of this is that if I throw a point at random in a sphere of high dimension, the point is going to be very close to the surface with probability one, okay? This is an amazing fact of working in many dimensions. The point is going to be extremely close to the peel of the orange, okay? Okay, exercise number two, very similar. Now we are, can I erase? Exercise number two is I am on the surface of the sphere now and I want to know, I'm throwing a point at random and I want to know what is the typical angle from the equator it will have. I'm on the sphere, okay? So in other words, I am calculating the volume of this slice in D dimension. Yes, yes, yes, this is the center. This is the sphere. I am in D dimensions. So this is another sphere of dimension one less and the radius it has is the cosine of theta. So the typical angle is going to be cos theta. To the D minus one and here I want to put the angle just to say that I want to calculate the average value and then I have to divide it by the normalization which is the volume of the sphere. But okay, because the volume of this slice is, the radius of this slice is cos theta, okay? Now again, the function cos theta, cos theta goes from minus pi over two to pi over two. No, yes, and around zero the cosine does this but when I raise it to the power D minus one this is a function again that is superpicked in zero. You see because it's a cos which is close to one here as soon as the cos gets a little bit smaller than one the D if it's large kills it. So just before doing any calculation what is the morals of this? It is that if you are standing on a sphere and you have points at random on the surface of the sphere, almost everybody is in the equation. If you're standing in the pole everybody you see is living in the equator. This is again another property of large dimensions. So you see that geometry of large dimensions is something that is very different from the one of usual life. So there is spherical symmetry, right? So that the way you define the equator is arbitrary. And so isn't that... Contradictory, no, because you are standing in France and I am starting standing in Singapore. Our equators are different. Almost all of the people of the world are for you in your equator, your Polish France and my Polish Singapore and almost everybody is in another equator. So you should conclude almost everybody is in the intersection of both equators. The intersection of both equators is still a high dimensional thing. But one dimension less, but D is very large. So almost everybody is both in your and in my equators, intersection. But you cannot exaggerate too much. I mean if you take too many points then you begin to lose the dimensionality of the set and then you come to a point where you will have a problem. Okay, so when I told you yesterday that you had your energy surface, for example, and suppose that these are my spins, just variables, no? And then I'm looking at the magnetization which is the sum of SI one over the number of degrees of freedom. So the magnetization is this axis, one, one, one axis and you're measuring the magnetization values like this. Okay, so now imagine that I am moving on a sphere, let's say, or it could be a cube of S plus minus one, but I'm moving randomly. You see that the magnetization in spite of the fact that it can go from minus one to one because almost everything is in the equator. It will be typically this because almost every point is there, zero. So this is how the large dimensionality makes that the thermodynamic variables concentrate. Okay, this is if you are doing your exploration in a democratic way. What happens if you don't know, for example, the case we did a while ago where the energy shell is not covered democratically? What can I say? Well, what can I say? Please stop me if you don't see this point. What can you say in situations where you don't know? For example, active matter, people who act agents in an economic system, number of species in bacteria. Well, your attractor is going to be something, of which we say we don't know. So some people say, okay, maybe it's not democratic, but there is this effect of accumulation of the measure in one subset. Doesn't this compensate that at the end, it's the same as if I were democratic? The answer is sometimes, not necessarily, because all your measure could be here and you wouldn't be able to do these things. But people and many of you will end up by doing, I suppose, max entropy principles. It is to say, although I am treating a problem that does not have ergodicity, because the vast majority of the points here, independently of the dynamics, are in the equator, well, I can assume that the only part that counts is this one. It's generically not true. But people who do, for example, proteins use it and they are successful, so I don't know. Depends on the problem. Sure, there are questions. Is everything clear? Or I lost everybody. Okay, so, let's try. So you have a question. No question? No? No questions? Ah, I want. So maybe it's just to recap. So in the normal situation with ergodicity and no active matter, the point on the, let's say in the first space is clustered near the shell of the sphere. In this case, no, there are other situations where it can be clustered. And also on the, near the equator. Yes, in this case, in this example. But they are clustered somewhere. And this is pure geometry. It doesn't have to do with the dynamics itself. So also this justifies the fact that we only use the energy shell to build the mechocononical ensemble. This also justifies the fact, I would like to do this exercise, that you can go from micro-canonical to canonical and nothing changes. Because they are concentrated, the two measures in the same places. So this is one thing that happens that is due to the large n limit. So here again, you see the two things. Large n limit gives you a certain geometry of your space. Dynamics tells you how you explore it. Okay, so let me give you the technical point now. We want to calculate this, but instead of doing it by the I, I mean this function is super peaked in zero. So theta average is going to be approximately zero, which means everybody's in the equator. How do you do this in practice? Well, consider this function, which is the weight, no? This function here is, as I said, of the form e to the d minus one. And because I already see that this is going to be close to zero, I'm going to write cos theta as one minus theta squared over two, okay? So when I take the log of this, okay? So this is d minus one, theta squared over two. This is the integral I have to calculate, okay? And here I am calculating an average and I'm dividing by the normalization. I'm going to, I want just to justify what I said that almost everybody's in the equator. How do you calculate an integral like this or like this? Let's do this one that is easy for large d. Of course it's a Gaussian, no? We understood it's a Gaussian, but how do we calculate it without knowing that it is a Gaussian? So we need to calculate, or even with a cosine, let's say this one. So now what we have is a function here with a minus that has a minimum in zero. It could be even the cosine. And it has this very large exponent, okay? So where, who's going to dominate this integral? The minimum of the function you have here because the smaller this is, then the more that this is big. So if you have any function like this, this point here, if this is the function you have on top, and this is the lowest point, if you are doing it to an enormous power, all this is going to be infinite. This point will dominate. This will be exaggerated like this because d is a super large. So always it's the minimum that dominates, okay? So an integral like this is dominated. Here I could have put instead of this log of cos theta, which was your original thing. So you need to develop this function around the minimum, which is what I did, and this is what is called saddle point evaluation. So you end up, you start with the minimum, you end up with a Gaussian, and then you integrate it, and this is one over, I don't know, square root of pi over two, d minus one, and then there is a zero. So the point that we are doing is that all these integrals that are multiplied by an enormous number in front of the exponent are dominated by their smallest number, and this is called saddle point evaluation. And this is, again, saddle point evaluation is the same argument as saying every point is in the equator. There is a point, a typical value that dominates your integral, and that one is as if everybody would be there. So all thermodynamics, as we know it, once you got rid of dynamics, is constructed upon evaluating integrals like this. I mean, this is your bread and butter if you're doing thermodynamics. This is what you do all the time. Who of you have seen this saddle point evaluation? Please, hands up. Okay. Two thirds. Okay. Yes. Can, is it meaningful to look at the exponential as theta minus mu whole squared? So mu is zero. So the mean is zero. Yes, yes, yes. And d minus one is basically the inverse of the sigma squared. So square root of d minus one. So in the large d limit, this is going to become a delta function. Yes, yes, yes, yes. What we are saying is that in the large dimensional limit, it's as if everything becomes a delta function somewhere. That's what saddle point is telling you. So if I am measuring your angle with respect to the equator, the equator is a delta function in the large d limit. This is what the probabilists call concentration of measure. The measure which was flat on the sphere because of the law of large numbers ends up by being as if concentrated on the equator. Okay. Next, and we will discuss it later tomorrow. Why is this important? So then we have, again, this I'm sure you have seen already, but it's never bad to do it again. So what is an, suppose I have a system, let's say with, for example, spins on a lattice. So in every site, there is an SI. And the interactions are, let's say, not very long range. There are, so the system interacts relatively near neighbors. And we will need to calculate the partition function, which is the sum of, as you know, e to the beta, beta is one over the temperature with Boltzmann constant equals one. And the energy is, I don't know, for example, the sum of SI, SJ, where I and J are nearest neighbors. I don't know, it's an example like anyone else. I mean, it's not important. Some form of interaction between the things. So one thing that is very important for us, both in dynamics and in statics and always, is to identify which quantities scale with a system size. We say which quantities are extensive, which quantities are intensive. For example, energy, we expect that per unit volume has a limit that is not infinite or zero, neither infinite nor zero. So how can we say that? Why do we think that energy is extensive? Well, because if I cut the system here, and I cut it here, for example, I expect that I have a lot of energy in the bulk, then some energy here in the interface because of the interaction, then another energy in the bulk, then another in the interface. But the energy of the interfaces has one dimension less than the bulk. So you expect that the energies of three is more or less, except for the energy of the surface, the energy of number one, plus energy of number two, plus energy of number three, by which I mean that number one is now disconnected from number two, disconnected from number three, okay? And this is the argument we usually give to say energy is an extensive quantity. We expect it for a large sample to essentially scale with the volume because pieces add, their volumes add, so it's proportional to the volume, okay? Let's consider this quantity now. Now imagine the system would be disconnected. So I would have to compute the energy, total energy as the energy here plus the energy here, plus the energy here. And because of this and because this is an exponential and this is an addition, this means that if I disconnect the system, z total is more or less equal now because this is in the exponent, it's not a sum, well it is a sum in the exponent, but because this is a, we are adding this quantity, so there's something that is not nice here. The limit of large volume of this is a multiplication of things, which is not very nice. So what is the nice quantity? Well, the nice quantity, obviously, it's the logarithm of z, then this one is, yes, the logarithm of z one plus the logarithm of z two. I just took logarithms in this thing and this has a name, the logarithm of the partition function is either denoted, well, we could either denote it like this and this is going to be proportional to the volume, to all the degrees of here, or, sorry, not in exponent. I will add a sign, but what is important is this, the usual way of calling it is to define a thing like this and call this the free energy. The temperature here is conventional, but this is a name. For the moment, it's only a name. So conclusion, we were asked to calculate the partition function. We asked if it was going to be extensive. We concluded that it's not going to be extensive, but then its logarithm is a meaningful extensive quantity and we decided to baptize it with a fancy name, which is we add a beta and we call this free energy. It's a name for the moment. This is a nice quantity that we will expect that is proportional to the size of the system because it's additive, okay? Here and always, I'm going to use capital letters for the total quantity and per unit degree of freedom, I'm going to use the small letters and so on, okay? So that these quantities are per unit volume on number of degrees of free, okay? And just to end, there is another way of being extensive and I'd like to give this together. So I suppose that those of you who did a stat mech course started this way, I mean, at the beginning, but it's a nice thing to see this again. There are quantities that are extensive and this is going to be important in connection to the saddle point calculation we did before. Just a quick comment. Sometimes extensivity is not in space, but it could be in time. Let me give you an example. You have a system that has water in it and you're shaking it with this stirrer that creates a terrible turbulence here, okay? And because this is a mess what is going on in there, when you look at the work you're doing, work is a theta dot times torque. It's a work that you're doing for stirring and because this is a mess and you have water going in every direction, when you do, I don't know, experiment, you find that it sort of fluctuates and most of the time you are doing work into the water. Every now and then you're lucky and the water comes back to you and gives you a little kick to you, but this happens very little, okay? What I just said is the second principle of thermodynamics. Okay, so this is it. And I would maybe want to calculate the total work which is the integral of a small w, let's say of t dt and let me say, okay, this is the total work. This is a quantity that fluctuates and it is a bit random. It is meaningful to ask a question similar to this one. Can I assume that the work in a piece of time, that the total work can be decomposed in works on pieces of time, this time instead of space? Well, what does it need? It needs the correlations of this noise, let's say, are fixed in time and I have a longer time. So are these independent processes, if they are, I can consider that this is, let's say, extensive, but now in time instead of space, okay? So if this happens to be proportional to time, times work per unit time averaged for long times, then I say that this quantity is like I did for space here, you can use it also for time, okay? When you use it for space, we will use it in the context of thermodynamics, but I want to tell you this now because later on we're going to try to see a large deviations of problems and you will see that it's the same argument as you do in thermodynamics, but with respect to time instead of doing it with respect to space. That's why I think it's nice to see things together, okay? In real life, this is in the mathematics textbooks and this is in the physics textbooks, so it's divorced in actual real life. Okay, so let's stop here. So I was thinking that you said that ergodicity is breaking and entropy is produced, so is this statement vice versa? Because in micro-tyranical ensemble, we keep the full system ergodic and then apply the equal a priori probability and calculate the thermodynamics. In what system? Micro-tyranical ensemble. Yes. So we keep the equal a priori probability. So the system is ergodic, that whole of the space space can be accessed and then we calculate the entropy. But if your underlying dynamics is not one of the good ones, like Hamilton, like Newton, then you have no guarantee that you will explore the energy shell and that the micro-canonical assumption is good. So that's where it fails. Okay. Precisely. So when you are driving the system, it's funny because we introduced a thermostat so everything is on an energy shell and you would say, okay, I've solved my problem. I am on the energy shell because I forced it, but no, because the driving ruins everything in the sense that, yes, you are on the energy shell, but not democratically. Any other question? Valentino, do you have a question? Okay, let's take a break. Valentino doesn't have a question. Valentino doesn't have a question. Let's take a break. I reconvene here at 11 for Mahesh lecture and he told me that he will give the most important message right at the start. So be on time. Be on time.