 So, the Poisson-Baltzmann equation for the concentration of ions at point r is, or for the electrostatic potential phi of r is given by Laplacian minus Laplacian phi equals rho f of r, or let's write it like this, minus epsilon Laplacian of phi plus sum over k of ck 0 qk e to the minus beta epsilon, beta qk phi. So, this is the density or the concentration of fixed charges. So, it's walls or containers or whatever you want. And this is the contribution of mobile ions in the solution. So, as we saw, as I said yesterday, this equation is a very complex nonlinear partial differential equation that you have to solve in certain geometry, which is given by all the fixed external charges that you may have in your system. And by the different species of ions that you have, which have their charges and initial concentration. And we have the, in addition, there is the boundary conditions that you have to take into account, and the boundary condition being that the two types of boundary conditions, either fixed potential or fixed charges. Then we saw that if beta e phi is much smaller than one, then you can do a linear approximation to the nonlinear part by expanding to first order the exponential. And then you get what's called the Debye-Hooker equation. And the Debye-Hooker equation, so if I can write it as minus epsilon Laplacian square plus Kpd, sorry, so I'll write it like this, minus Laplacian square plus Kpd square phi equals rho f of r by epsilon. This is the Debye-Hooker equation. So it's a linear equation. Now it's linearized. So this is true when this quantity is small enough. And what I want to show you now is that this equation, so the difference of this equation, the effect, the whole effect of the mobile ion is this Kpd square, which we'll see in field theory it's like a mass term. So if this term is not present, it's the standard Coulomb, it's the standard Poisson equation which tells you that phi would be as one over r. But because of this constant term here, we'll see that this implies exponential decay of the potential phi at large distances. By the way, there was a question yesterday when I told you, so I don't remember who asked it, about the initial guess. So I told you that in order to solve this, you start with a certain phi zero. At phi zero fixed, you solve for the Poisson equation here. You get a phi one, and then you iterate. And the question was, how do you choose the initial phi zero? So the initial phi zero, one common choice, is to solve the Debye-Huckel equation, which you can solve easily because it's a linear equation. So there are many ways to solve it. So you solve it initially. You get a certain solution which you call phi zero, which you inject now in the nonlinear equation, and you can start iterating from this linear approximation to refine it to obtain the exact solution numerically for the Poisson-Boltzmann equation. Was there any other question yesterday? OK. So an exercise that we will do is to see what happens. And this is where I stopped, I think, yesterday. When you take a single charge q, so that's an external fixed charge which doesn't move. So this charge q at point zero. So rho f of r equals q delta of r. And you ask, what is the electrostatic potential phi created by this single charge q? So if it was just Coulomb, it would be q over 4 pi epsilon r. But here, so we have to solve this equation, which is minus Laplacian plus Kappa d square phi equals q over epsilon delta of r. So this kind of equation is very common and we'll see it again and again in the field theoretical approach. And the way to do is to go to Fourier transform. So if you write phi of r as integral d3k over 2 pi q e to the ikr phi tilde of k, where phi tilde is the Fourier transform of phi of r, then of course when you take the gradient of phi, you bring down ik. So when you take Laplacian, you bring down ik square. So this equation in Fourier and of course delta of r is the integral d3k over 2 pi q e to the ikr times 1. So if you combine these two things, you replace in there and you see that you get immediately a very simple equation for phi tilde, which is that k square plus Kappa d square phi tilde of k equals q over epsilon. Is it clear? No question? OK. So phi tilde of k equals q over epsilon 1 over k square plus Kappa square. So I can forget the vector here because it's the... And therefore, so we just have to stick this back here to calculate the electrostatic potential phi of r because that's what we want. So phi of r is q over epsilon integral d3k over 2 pi q. e to the ikr divided by k square plus Kappa d square. So I don't know if you have... Has anyone ever seen such a calculation? Is it... Yes? So should I do it or... OK, I'll do it for those... OK, there are many ways to calculate this. So the simplest way, I think, is by the... Just to calculate the integral. OK, so d3k, if I go to spherical coordinates, is k square dk d phi sin theta d theta. If I have k1, k2, k3, right? k is a three-dimensional vector. And if this is the vector k, this is the angle phi and this is the angle theta, which is minus k square dk d phi d of cosine theta. So if I rewrite phi of r, phi of r is q over epsilon. And phi, so phi is between zero and 2 pi and theta is between zero and pi. And k is between zero and infinity. So the integral is just integral from zero to infinity dk k square. That's this term. So there is... So here, this integral is e. So I'll write it here. It's e to the ikr cosine theta, right? I use r as the axis, the z axis. So kr is kr cosine theta divided by k square plus kd square. And then I have sum from zero to 2 pi d phi, sum from zero to pi with a minus sign, if you want, because of this of d cosine theta. So if I write... So there is no dependence on phi, so there is a factor of 2 pi which comes out from this. So if I write u equals cosine theta, so this is one. For theta I call zero. It's one. For pi, it's minus one. So if I invert, I get phi of r. And I forgot the 2 pi q, which is 8 pi q. OK. I forgot to write. So I factorize out a factor of 2 pi. So I get q over 4 pi square epsilon. So 8 pi q times 2 pi. That's the 1 over 4 pi square. The sign changes because I will put... Here it's integral from 1 to minus 1 when I use this variable. So if I change it... OK. So let me write it. Right? Everybody follows? No question? So we can do the integral over u. And this is... So it's q over 4 pi square epsilon sum from 0 to infinity dk k square. And this over k square plus kappa d square. And then here this integral is over ikr e to the ikr minus e to the minus ikr. Right? I just... From here to here, I just did the u integral. OK. So it is just q over 4 pi square epsilon 1 over ir integral from 0 to infinity dk. So k square over k is just k over k square plus kappa d square e to the ikr minus e to the minus ikr. So you see that in order to bring down a k, it's like taking a derivative with respect to r. If I take a derivative with respect to r of this, it brings down ik. And this one brings down also ik. So I can write this as q over 4 pi square epsilon 1 over ir. And then d... So if I do d by dr, sum from 0 to infinity dk 1 over k square plus kappa d square times e to the ikr plus e to the minus ikr. OK. So when I do the d by dr of this, I bring down ik and here minus ik. So it's... When I do the d by dr of this, it's ik times this. Right? So there is a factor i which is too much, so I have a factor 1 over i to put here. Is it clear? Sorry, it's a bit technical, so I have no way to avoid it. And so it's... If I continue over here, so it simplifies quite a lot because... So there is a 1 over i square. So phi of r is minus q over 4 pi square epsilon 1 over r. So it's this. d by dr of this integral. Now you see that in this integral, this second term, if I change k into minus k, it will be... I will get something like that, but the integral will be from minus infinity to zero. So it is just integral from minus infinity to plus infinity dk of e to the ikr divided by k square plus kappa d. Is it clear? Right? I just make a change k into minus k. So then this term, this is invariant. This becomes e to the plus ikr and the integral, interval of integration is from minus infinity to zero, and so they add like this. Now to calculate this integral, this is given by the residue method. So you all know the residue method. Does anybody not know the complex integrals, residue method? Everybody? You don't know? No. OK. No, because you see, when I change k into minus k, so the first one is integrated from zero to infinity, and this one will be integrated from minus infinity to zero, because the bounds used to here... Why? I forgot, by the way, just the second one. I forgot the d by dr here. Sorry. There is a d by d. No, no, no, no, sorry. No, this is correct. So what did I... Here, you make a derivative with respect to r. Down? Yes. So you get ik, and you get minus ik. So it's exactly... Because you divide it by 1 a, you want to divide by 1 over i. Yes, because when I bring down d by dr, I bring down ik, so I want to bring down only k. That's why I divide by i. So when I take a derivative with respect to r, I bring down... I get this term becomes ik e to the ikr minus ik e to the minus ikr, and I correct the factor of i by 1 over i. There is no question. OK, so if I look at this integral in the complex plane, in the real and imaginary plane. So I have two poles. The poles are k equals plus or minus ikd. So one pole is here, and one pole is minus ikd. And the integral is over this axis. So then you know the technique is that you should close the contour in the either upper or lower half plane. So that the exponential factor should go to zero at infinity. So obviously you need to have a positive imaginary part. If you have a positive imaginary part like this, then the contribution in the integral. So what you have is that the integral over this circuit, which I call c, dk of e to the ikr divided by k square plus kappa v square, is equal when the radius r goes to infinity. So r is this radius to the integral from minus r to plus r, which means from minus infinity to plus infinity dk of e to the ikr divided by k square plus kappa d square. OK, and then this is equal to two i pi residue of the function at the pole. So here the pole is i kappa d. And the residue of the function at the pole is the value of the function where k is replaced by this divided by the derivative of the denominator. So the residue is equal to e to the i i kappa d times r divided by 2k or let me write it as e to the ikr divided by 2k. It's the numerator divided by the derivative of the denominator taken at k equals i kappa d. So it is equal to e to the minus k dr divided by 2i kd. And therefore, if I write the result, I have the integral from minus infinity to plus infinity dk e to the ikr divided by k square plus kappa square d equals. So it's 2i pi times the residue, which is e to the minus kappa d r divided by 2i kappa d. And therefore, pi of r, you take this, you multiply by this. So it's q square. So there is a minus sign coming here from the 1 over i square. So it's minus q square over 4 pi square epsilon times 1 over r times 2i pi. So times pi over kd times d by dr of e to the minus kappa d r. So one of the pi goes away. You take a derivative, the minus sign goes away. You bring down a kd and you get the final result that pi of r is equal to q over 4 pi epsilon e to the minus kd r over r where kd is 1 over lambda d is the constant. So it's a calculation which may look a bit convoluted, but it's very standard. Once you do it once, you just do it like this. OK, so any question about this calculation? So this is really, and I remind you that what was the equation which may be still there now was minus Laplacian plus kd square pi equals q over epsilon delta of r. So this means that when you have a point charge in an ionic environment, the Coulomb potential created by the point charge q is no more the Coulomb law, q over 4 pi epsilon r, but it's a screened Coulomb law which means it's a Coulomb law with exponential multiplied by an exponential factor and the scale of the exponential factor is lambda d which is the by length. And this by length, as I showed you before, it scales like one over the valence of the ions and the square root of the concentration of the ions. You see, by the way, this method tells you that if kpd is equal to zero, then it's just a Poisson equation for a standard charge. And you see that if kpd is zero, you get back the standard Coulomb potential which is q over 4 pi epsilon r. So which means that the solution of the pure Poisson equation Laplacian phi equals q over epsilon delta of r gives you back. Of course, there are simpler ways to find the Coulomb law, but for the bifocal, I don't know exactly. So, by the way, this equation in particle physics also is called the Yukawa potential, this kind of potential. And it's the kind of interaction potential that you have between the particles when the exchange particle is massive, has a mass. So you see the electrostatic interaction between two particles come from the exchange of photons which have zero mass. And this term in field theory has the role of a mass. So the equation which defines the interaction is something like this, but if the particle that you exchange has a mass, then it has this form. So for instance, in nuclear physics, the interaction, I mean, in the old days, people were thinking that the interaction between protons, neutrons, et cetera, was mediated by mesons, pions. And the pion is a particle with a mass. That's why the strong interaction has a short range. So it's the same here. Here, the reason is the screening. The particle is surrounded by a shell of positive and negative ions, which it's like Faraday screening or whatever. And so the exchange, the interaction is exponentially decaying. Any question? What else did I want to say? So to conclude, so I will now, yes, so Poisson Boltzmann, so this is a first step approximation to Poisson Boltzmann. The Debye-Huckel equation can be solved. It's a linear equation, so you can solve it much easier, in a much easier way than the Poisson Boltzmann. And it is a good starting point for solving numerically Poisson Boltzmann equation. So the Poisson Boltzmann, I will show you how one can calculate the free energy, what is the free energy of the Poisson Boltzmann theory. So before that, I want to emphasize a little bit some of the defects of the Poisson Boltzmann theory, what is wrong in the Poisson Boltzmann theory. So a few things which are, so Poisson Boltzmann is good in many cases. It's a good approximation in biological, so in physiological conditions. So physiological conditions is essentially for NACL with concentration C of the order of 0.1 molar. And then it gives, if you look at profile of this ion near charged surfaces or near DNA or things like that, it's okay. Now, what is missing or bad? So it's not good if you have a multivalent ion. Yes? Sorry? In physiological conditions, okay. And the last thing which is missing is that it's a mean field approximation. So no fluctuations and no correlation effects. And so it's missing in case of strongly charged surfaces or things like that, it's missing quite a lot of phenomena. Okay. So any question about all these? So now the question is, how do you calculate the free energy of the Poisson Boltzmann or in the Poisson Boltzmann approximation? So the free energy, of course, we know it's U minus Ts. So we need two ingredients. Yes? Sorry? I'm sorry. This part? Yes? Good and missing. Good. Well, I'm not missing bad. Let's say bad or missing. These are the few things which are not taken into account in the Poisson Boltzmann approximation. In this mean field approximation. So this approximation is not good. We will see when you have multivalent ions because when you have multivalent ions, usually you're not in a good position. Okay. Poisson Boltzmann is good for weak fields, weak potentials, weak everything. But when you have multivalent ions, usually it's not weak because things depend on the valence to some, usually to power two or three. So it goes very fast with the valence. And so for, for instance, magnesium ions are very important in biology because they regulate a lot of things. You cannot use Poisson Boltzmann equation to describe the behavior or the profiles of magnesium ions. Second thing is steric effects. So there is no, at short distance, nothing prevents the ions to come as close as they together, even to collapse on each other. Third thing is about water structure. You treat the background as a uniform medium with a constant dielectric constant, with a uniform dielectric constant. But you see, for instance, if you put, water is dipoles, right? Dipoles like these floating around. So if you put an ion which is charged, a big ion, or even not a big, but with a big charge, if you put an ion in water, it will be hydrated, which means that locally the dipoles will orient. And you will have some structure of the water, which will affect the dielectric constant of the water locally. And this is, of course, not at all taken into account in Poisson Boltzmann equation because you treat it as a uniform medium. And finally, okay, there are many, maybe other things which are not, this is the ones I was thinking about, mean field. So there are no fluctuations. That's all the standard problems of mean field, no correlation effects, no fluctuations. Each particle sees the mean field created by all the others. And as a result, there is no correlation effect. When you calculate simply the correlation functions, they are trivial. Yes? Yes. And for just a single charge in infinite space, in infinite free charge in infinite ionic medium characterized by kappa d. So I remind you that kappa d is given in terms of the ion concentrations of the various types. I can give you the formula kappa d square, lambda d to the minus 2 is sum over all species of 4 pi mb ck zk square, where zk is the valence of the ions. For some problem, we have this linear equation for that particular boundary condition. Exactly. Yes. So if you have, for instance, I don't know, this wall or so this was in free space, but if you have something like this, let's say you have a charge here and you impose phi zero on the surface, then you have to solve with this boundary condition. Here the boundary condition, the implicit boundary condition, it's implicit because when you take the Fourier transform, implicitly you assume that the function goes to zero at infinity. Right? Otherwise you cannot make a Fourier transform. So the fact that you solve it by Fourier transform implicitly implies that the boundary condition is that phi goes to zero at infinity. So you can have any boundary conditions, but then you can solve it. If it's trivial geometry, you can solve it analytically, otherwise you solve it numerically. But since it's a linear partial differential equation, there are many, many, many, many simple ways to solve it numerically. Yes? Yes. So I mean nothing prevents you to use it, but the question is whether it's good approximation or not good approximation. So what I'm saying is that it's not a good approximation when the balance is not one, essentially. Sorry? No, I didn't assume anything about anything. It's just an approximation that I present here. Next week, when we will do the field theory, it will be more clear when the approximation is good or not good. There will be a parameter, which is an expansion parameter, and we'll show that the zero-thorder of this approximation is the Poisson Boltzmann, and then we can see the corrections and things like that. But this requires to dig more into the system. OK, no more questions. OK, so we saw last time that the internal energy, u, is essentially given by epsilon over 2. So it's epsilon over 2 integral d3r of gradient phi squared. That's the internal energy. Now, what is the entropy? So the entropy, I will use the standard phenomenological form for the entropy. OK, so you will tell me if you, OK, I will write it first, and then I will discuss it. So for the entropy, it's the entropy of mixing of gas of particles. So it's minus kb integral d3r sum over k, let's say, of ck of r log. So does this ring a bell to some of you? Who has ever seen such an expression for the entropy? Nobody? OK, so I guess if nobody has ever seen it, I will try to derive it for you. So the entropy, in fact, in this kind of problems, I will do, so everything I do is, I mean, it's a lot of hand-waving arguments because I didn't justify the Poisson Boltzmann equation. I just told you, you do this, you do that. The justification for all this we'll see next week. But so if I write the partition function for the system, so there is one factor which I forgot a few times, which is one over factorial n, which is the one over factorial n, which comes from the fact that all the ions of each species are the same. So in fact, it's a product over k, over all species of ion. There is a factor one over factorial n of the k. And then, so I will do it only for one species now. And then you have a product of all the dr's, and e to the minus the u electrostatic, the electrostatic energy, interaction energy of the particle. These are products over all charges present in the system, and this is the electrostatic interaction energy of the system. So let me assume that there is only one kind of charge to simplify, and then we just have to, it's additive, so we'll just add. So z is essentially, I will write something like one over factorial n, then e to the minus u, it's essentially the e to the minus beta u, beta epsilon over two integral gradient phi square. And this is essentially, this factor is v to the n. So now you have, so this is the internal energy, and this is what is going to play the role of the entropy. So the entropy in this kind of system is e to the minus two, or e to the minus log factorial n divided by v to the n minus beta epsilon over two integral gradient phi square. Now if I look at this term, of course you know the sterling formula. So the sterling formula is an approximation for factorial n, which is valid for large n. So in the thermodynamic limit you have factorial n equivalent for large n to n over e to the power n, and then there is a correcting factor which is square root of two pi n, but I don't care about that one, but this is the interesting factor, n over e to the factorial n. So the term which corresponds to the entropy is e to the minus log, and it's n over e to the power n, which can be written as e to the minus n log n over v minus plus n. So this formula is essentially this one. So let me show you why, because this term is just, if I consider that there is a certain concentration c of r of ions such that the integral d three r of c of r is n, then you see that I can rewrite this expression as e to the minus integral d three r log c of r minus c of r. So it starts looking a little bit like this. And now what you want to do, so you know that when you calculate entropies you need always a reference state with respect to which you calculate your entropy. So if I decide that the reference state is the state that, so my entropy then is something like s equals minus kb integral d three r c of r log c of r minus c of r. Now, if I want that my entropy is equal to zero if c of r is uniform equal to c zero, then you just have to subtract and then you write that s equals minus kb integral d three r c of r log c of r divided by c zero minus c of r plus c zero. When I do that, so what I have done, I have divided by log c zero, which is a constant, but remember that the integral of c of r is a constant, so this is division by c zero is irrelevant and the addition of c zero is also irrelevant because so all these, so this is the expression of the entropy that, so this is a very common entropy, so this entropy is zero in the reference state, the reference state being the uniform state c of r equals c zero and this is the excess entropy which can be positive or negative when the concentration is modified with respect to the uniform concentration. So it's from here, right? So you imagine the same thing locally. That's all. In fact, so you can justify a little bit better by putting things on a lattice and doing things like that, but it's essentially, it's very phenomenological and you will see better derivation next week. It's just you start from here and you assume that the density or the concentrations are not global but they vary locally, slowly compared to whatever the usual, the usual song. And so you replace this n over v, this c by c of r and et cetera. Is this entropy? No, c, you know it. First of all, this one is an excess. So actually this is very similar to s, you know, one of the standard form of the entropy is s equals minus sum if you have of p i log p i, right? You know this formula. No, but p i is smaller than one. So if p i is smaller than one, then this kind of entropy is positive. Here it's the entropy with respect to a given state, a given state of uniform c zero. No, state of maximum entropy, no. When you have a system which has energy and entropy, you don't maximize the entropy. You minimize the free energy because you have balance between internal energy and entropy. Maximizing the entropy is a more isolated system without, so any questions? So as a result, yes? So here is a macro state of the system and we have the entropy. Yes, it's a macro state, yes, with local, yes, with local concentrations. Non-uniform, yes. But extra not c of r between the potentials. I mean it should have somehow related. OK, so this will come now. This is related by the Poisson equation. So let me write the free energy. So the free energy f is epsilon over two integral d three r gradient phi to the square minus T s, so plus k by t. So let's assume that there are several species in the system, so it's sum over k integral d three r of ck of r log ck of r by ck zero minus ck of r plus ck zero. OK, that's the expression for the free energy. Take it into account. Electrostatic energy and entropy of the fluid. And then, of course, there is the relation between the two, which is given by the Poisson equation which relates, which is minus epsilon Laplacian phi equals sum over k of qk ck of r. That's Coulomb equation, Poisson equation, right? Minus epsilon Laplacian phi equals concentrate or density of ions. So this is the relation between the two. In fact, from this, you can derive the Poisson Boltzmann equation by looking, by minimizing what is the, so precisely it's, by minimizing the free energy with respect to the ck of r, so by what is the concentration, the ion concentration, which minimizes f. So if you write delta f by delta ck of r equals zero, you get back the Boltzmann equation, Boltzmann weights. OK, so I will do this because we will use, so this is a way to, to do functional derivatives. I don't know if you have seen already functional derivatives in your life. Who has seen, who has not seen functional derivative? OK, OK, so I will, yes? Sorry? What is the definition of entropy in a biological system? Well, it depends. The entropy is defined as the, first of all, entropy is defined only for equilibrium system. You don't, it's, I mean, there are definitions out of equilibrium, but typically entropy can be defined only when you have a system at equilibrium. Then you can define a macro state, and the macro state is a kind of superposition or of a certain number of micro states. And entropy is just the log of the number of micro states which participate in the macro state, right? In biology if you're, I mean, I'm doing biology at equilibrium. So of course you can define entropy if the system is slowly varying or whatever, but in biology it's a different, it's a different question. I mean, if you take into account the fact that it's time dependent that the system is evolving, that it's alive, et cetera, everything has to, all the framework has to be, has to be changed. When I'm talking about biology here, I'm looking what happens, for instance, if you have a membrane, if you have ions near the membrane, what, how the ions will be close to the membranes? How can they go through or things like that? So it's really not related. I mean, the fact that it's a biological, it's just a biological object. It's not, I'm not considering living objects. Exactly, yes. It's just the fact that the ions are moving around. If you are colder, if the system is colder, the ions will move less. And if it's things like that, I mean, it's just the standard entropy that you can imagine. I thought your question was about life, open system, so it's completely different. Yes? Sorry? Z equals? Yes, yes, exactly. Yeah, well, you have Z equals e to the minus beta f. So it's e to the minus 1 over kt u minus ts. So it's e to the minus beta u, which is the beta epsilon over 2 integral phi, gradient phi square. And then e to the 1 over, e to the s over k. Sorry? Yes. Where is e to the minus beta u? The e to the minus beta u was the term e to the minus beta over 2 integral epsilon, gradient phi square, which I, no? No, you didn't? OK, OK, so now I go to functional derivatives. So you see, very often we will see that, and that's the general principle, that's the same kind of thing that you do when you derive Lagrange equation in mechanics, when you go, when you want to derive from the Lagrangian, the Euler-Lagrange equation, which gives you the Newton equation, you have to, so you write a certain function of a given trajectory with fixed ends, and then you look what is the trajectory which minimizes this quantity. So here, for instance, what we want to do is to find what is the ion concentration which will minimize this function f. So if you have a function of one variable, f of x, you know that to look for the, to minimize this function f of x, you will write df or df dx equals zero. Now, if you have many variables, x1, xn, you will have to write for any i, you have to write partial f by partial xi equals zero. Now the question is what happens if you have f of a certain function, let's say c of r, where c of r is defined everywhere in space, and you want to, you want to, so you can imagine that you discretize this variable c of, so you discretize your space, and then the variable, this is a function f of c of r1, c of r2, et cetera, c of rm, so you have discretized your space, these are the variables, and you want to write that the gradient of f with respect to each of these variables is equal to zero. So what you write is what's called a functional derivative. You write d delta f by delta c of r equals zero. OK, so how does it work? So usually the, usually the, we have a function, let's say, I will call it, how can I call it? We call it w, or f, actually f. f will be, so let me, yes, f will be, usually it takes the form of an integral over f of r of a certain function, let's say f of c of r. Right, so this is really exactly the kind of thing that we have. So in order to see, so f is a function of c of r at each point in space. So I will use this notation. So what you want to do is you replace c of r by c of r plus delta c of r. You expand to first order, so this, you expand f of c of r plus delta c of r to first order in delta c of r. So what you get usually is that f of c of r plus delta c of r is equal to f of c of r plus integral d3r of delta f by delta c of r delta c of r plus order delta c squared. Okay, so it's just a formal expansion like this. And therefore if you want to write that the variation is zero, so this quantity here, the coefficient of delta c of r is called a functional derivative with respect to c of r. So it's really, you obtain it by just doing a simple, simple Taylor expansion. And writing that the function is minimal is just writing that delta f by delta c of r. For any r is equal to zero. Okay, so if I now, so this is something we will use very much that's used constantly in field theory and in variational principles in all kind of cases. So, for instance, if I take the entropy and if I look, so the entropy as we saw is minus kb integral d3r of ck of r log ck of r over ck zero minus ck of r plus ck zero. So now I will give you a rule because you can do the expansion. So what I suggest is you do, you just do this, right? You replace ck of r by ck of r plus delta ck. You subtract, et cetera. You expand to first order. So I will give you a rule to do it very fast without any difficulty. So, first of all, when you are like this, you write it dc prime because it's an integration variable. So let's call it. And in order to calculate delta s by delta ck of r, what you do is first you take a derivative of the integrand with respect to ck of r prime. And then you use the rule that delta ck of r prime by delta ck of r equals delta of r minus r prime. So the reason being, of course, that you can write that ck of r is the integral dr prime delta of r minus r prime ck of r prime. So the functional derivative of ck of r with respect to ck of r prime is just the delta function here. So if you use these rules here, you get that delta s by delta ck of r is equal to minus kb times. So essentially, what you have is you take a derivative of this. This will give you log ck of r by zero and then plus one, minus one. So that's it. So I suggest if you have afternoon sessions or whatever that you practice a little bit this functional integral, this functional derivation, because we will use it extensively next week. Yes? No, because you don't, yes, there is a sum over k here, but of course you take, it's only the ck, the specific ck that you're looking. So let me write it as sum over l here. Now if I take a derivative with respect to ck, I will select only l equals k in this sum. Right, because it's like if you have a variable x1 to xn, if you take a derivative with respect to xi, you pick up only the xi term. And so this is the result of this functional derivative. So it's maybe a bit fast, but can you do that in the tutoring? Where are the tutors? Are you familiar with this? Yes? So you can do it, you can add some exercises. And for instance, for this, and for instance, the standard exercise is to derive the Newton equation from the Lagrangian, which is sum from zero to t, I don't know, writing that's the Lagrangian and the exercise is you write delta l by delta x of t equals zero and you should get Newton equation. That's an example of functional derivative that you learn. So these are the so-called Euler-Lagrangian equations. OK, so if I look at here, so there are two terms to take a derivative, so if I want to see what is the best Ck, how the concentration of ions will adjust in order to minimize the free energy. So I have two terms to consider, one is this one and the other one is this one. So the other one and of course, so if I look at delta by delta Ck of r integral d3r gradient phi square. OK, so we saw that you can integrate this by part if you assume that there is no boundary term, so this is the same as delta by delta Ck of r integral d3r of phi of r Laplacian phi of r. You remember, we saw that yesterday that up to boundary terms, which we don't care. And where can I write this back here? And then all the rules of that. So then you have delta by delta Ck of r of the integral, let me call it d3r prime gradient phi of r prime square. So the first, so then I will apply it to here plus applying to there. So it's minus integral d3r delta phi of r prime by delta Ck of r Laplacian phi of r prime. So the second term is minus integral d3r phi of r prime gradient square delta phi by of r prime by delta Ck of r. Right, it's just, and since it's not r prime is a variable of integration, so it commutes with the delta by delta Ck because it's not acting on the same points. And therefore, if you integrate this by part, it acts here. So it doubles this term. So this is just minus two times integral d3r prime phi of r prime. And I write it as delta by delta Ck of r prime Laplacian phi of r prime. Right, I can commute whatever you can do whatever you want with this. They commute and you just apply the standard rules of derivative because it's a derivative. Now, because of the Poisson equation, you see that, so, because of Poisson equation Laplacian phi of r prime equals with a minus epsilon equals sum over K Qk Ck of r. And therefore delta by delta phi by delta Ck of r of Laplacian phi of r prime is equal to minus Qk over epsilon delta of r minus r prime. Yes? Sorry? Oh, sorry. OK, next. OK, sorry. I'm going a bit fast but I think this is the kind of thing you have to do in tutoring and it's really, it's not difficult. It's just an extension of the standard rules of taking derivatives. But when you do field theory and these kind of things, you cannot avoid going through these functional derivatives and then we will see functional integration also, which is OK. But anyway, that was a very good question. OK, so is it clear that when you have this, it implies this? I just used the rule that I said that you take a standard derivative and the delta of Ck by Ck, sorry, this was r prime, delta of Ck of r prime by delta Ck of r gives a delta function. And therefore you have the property that delta by delta Ck of r of the integral d3 r prime gradient phi of r prime square equals minus 2 times, so it's plus 2 Qk over epsilon integral of d3 r prime phi of r prime delta of r minus r prime, which is 2 Qk over epsilon phi of r. And therefore we can write that delta f by delta Ck of r equals, so the first term will be epsilon over 2. So the first term is the derivative of epsilon over 2 times this, so it's Qk phi of r. And the derivative of this term is plus KBT we saw before. It was log of Ck of r by Ck0. So this is the functional derivative of f with respect to, say, Ck of r. And this is equal to 0. The Ck, which minimizes the free energy, satisfies this equation. And the solution of this equation is, of course, the Boltzmann distribution, that Ck of r equals Ck of 0 e to the minus beta Qk phi of r by just writing this equal to 0. And therefore you see that at equilibrium the concentration is given as a Boltzmann distribution as a function of phi of r, and phi satisfies the Poisson equation. So this is just the standard Poisson-Boltzmann equation, which you obtain, which shows that the Poisson-Boltzmann equation minimized the free energy as written like this. So apart from this technical point of functional derivatives, it's very simple. So what I'm saying is that delta f by delta Ck of r for this free energy equals 0 is equivalent to Poisson-Boltzmann equation. Yes? Yes. So I say that this is my free energy with the Poisson equation. Now, if I minimize this free energy with respect to the ion concentration, so I look what is the concentration of ions which makes this free energy minimum, you find that the concentration is given by a electron weight Boltzmann factor in this potential phi of r. But phi was related to Ck by this, so you need to solve these two equations simultaneously. And solving these two equations simultaneously is just the Poisson-Boltzmann, right? I mean, you just replace Ck here by this expression and you get back the Poisson-Boltzmann equation. Yes? Yes? No, it's in the assumption that it's an assumption that the free energy is minimized, that at equilibrium the free energy is... Yes. Actually, we will justify it next week again by the saddle point method in field theory. Exactly, what? Oh, this free energy is an approximation. It's not an exact free energy. It's a phenomenological kind of free energy which I derived by a lot of hand-waving arguments, but this is not the exact free energy of the system. Everything is approximate. The internal energy is not the same. The entropy, of course, it's the entropy of a gas of free particle. This is really a gas of free particle. And the free energy, it's the free energy of a system of charges. So, yeah, it's very approximate. The kind that it's mean field is that you have independent particles, free gas of particles moving in the same direction. So, they all live in an external potential phi of r in space, and this external potential phi is self-consistently created by the particles themselves. But there is no direct interactions or correlation between the particles directly from one to another, whereas in the real theory, as I showed you, if you write it in terms of the last thing is the, and okay, so I give you as an exercise, so this is the Poisson-Wolzmann free energy. And if you go to the Debye-Huckel approximation, and this is an exercise, so you will not be surprised that the Debye-Huckel free energy is just epsilon over 2 integral d3r gradient phi of r squared plus kappa d. Okay, so this is in the Debye-Huckel approximation. This is what you get. And I let you do it yourself. It's an exercise. It's quite trivial. So, the free energy is quadratic in the phi's, and you can calculate everything. Okay, so now I come to specific examples of solutions of the Poisson-Wolzmann equation. And the first case, so the first case of study is Planar case. The Planar case is one surface plus counter-ions. So, what are counter-ions? Counter-ions are, so one, I assume that there is one surface, which is a hard surface that can, through which ions cannot go through. It has a charge, I will assume, a negative charges here with a charge density sigma, which is therefore negative. And here I will assume counter-ions. Counter-ions are just ions which have the opposite sign of these, so it's not salt, it's counter-ions, so it's plus ions which are floating around. So, it's the simplest geometry that you can imagine, and we will see how you can, okay. So, let me call the axis Z, and I will assume that it's monovalent ions. Okay, so the Poisson, and this problem is called the electric double layer. The reason is, as we will see, that there is a layer of counter-ions which are covering the wall with a certain profile which decays slowly to infinity. Okay, so the Poisson Boltzmann equation is Laplacian phi equals, so Laplacian phi equals rho f over epsilon, so rho f is precisely, it's sigma, I will come back, but then plus c0e over epsilon e to the minus beta e, and rho f is the density, the fixed charges is just the wall, so rho f is sigma delta of Z, yes? Yes, absolutely, it should be minus here, either on one side or the other. Okay, so when you have an equation like this, with this kind of symmetry, of course, phi will depend only on Z, phi of x, y, z is a function of Z only because there is translation, I mean I assume that the wall is infinite, so there is translation invariance along the xy axis, so the electrostatic potential depends only on the distance. And because of this, so the equation is minus phi second of Z equals sigma, so you see that if I integrate this equation on a small between here and here, inside phi is equal to zero, so if you integrate from, let's say, minus a certain distance d, which is very small, to plus d, which is very small, so d being minus d plus d, you get, so I integrate this equation and you get that minus, so the integral of phi second is phi prime, so you get the boundary condition, which is the standard boundary condition, that phi prime of zero plus, so phi prime at zero, and I assume that on the other side of the wall, phi prime, the electric field is zero, because phi prime is related to the electric field, so phi prime of zero is sigma over epsilon, so this is the boundary condition here. OK, so I have to solve this, so I have to solve the equation, phi second equals minus C zero e over epsilon, e to the minus beta e phi, with the boundary condition that phi prime of zero equals minus sigma over epsilon. So there are many ways to, so I can give you the solution and we can check that it works, or you can try to derive it by first integrals. So, deriving it by first integrals is, you know, when you have an equation like this, you multiply both sides by phi prime, so you have phi prime phi second equals minus C zero e over epsilon phi prime e to the minus beta e phi, so phi prime phi second is just the derivative of one half phi prime square prime, and this is just C zero over beta epsilon e to the minus beta e phi prime, which means that, so if both derivatives are equal, then you can integrate, which means that this is equal to this plus a constant, et cetera. OK, so I will leave you to do that as an exercise, continue all the way through, and you will get the equation, the solution, which is of the form, you will see that phi is of the form a log z plus b plus some phi zero. So let's check that this is indeed a solution of the equation, so phi prime is a over z plus b, phi second is minus a over z plus b square, and if I want to check if it matches, so I have e to the minus beta e phi, beta e phi is e to the minus beta e phi zero with this times e to the minus beta e a log z plus b equals one over z plus b to the square, to the beta e a, sorry, and here is e to the minus. Right, I'm just replacing this expression in e to the minus beta e phi, so it's e to the minus beta e phi zero times e to the minus beta e a log z plus b, and so this comes down as z plus b to the beta e a, and this is e to the minus. So if you want to identify phi second with this equation, then you must have, and I will stop after that, so we have beta e a those two, which means that, so I try this, so I have to determine three parameters, a, b, and phi zero, and I have to adjust them in such a way that with the parameters, with the correct parameters, a, b, phi zero, they will satisfy the correct possible equation. So beta e a equals two, which means a equals two over beta e, and what else? Then I will write, so let me write this equation, so phi second is minus, so I would have minus a over z plus b square equals minus c zero e over epsilon e to the minus beta e phi, so it's e to the minus beta e phi zero divided by z plus b, and then since I have used this to the square. So I have this additional condition that a should be equal to c zero e over epsilon e to the minus beta e phi zero, but a is two over beta e, so this gives me e to the minus beta e phi zero equals two epsilon over c zero beta e square. And then we have still one parameter to match, which is b, and this comes from the boundary condition, so we saw that the boundary condition was phi prime of zero equals phi prime zero, sorry, sigma over minus sigma over s over epsilon, and phi prime zero is a over b at z equals zero, so we'll have the equation a over b equals minus sigma over epsilon, which gives you b. So we have all the parameters defined like this, and so we will continue tomorrow, and we will see what are the exact expression and the properties of the layers of irons, et cetera. Any questions? So try to do the exercises, particularly on functional derivatives and things like that. Sorry? I want to sign my attendance. Oh, it's circulating around. I can probably know. It should have come here.