Okay in this video I'm going to continue on with my tutorials and content statistics. This is tutorial number 31 and I'm going to discuss the Fermi-Dirach distribution which is we're going to maximize the occupancy function or make the most probable distribution. I also like to note that I have a website now, universityphysicstorials.com. So the previous videos to this are number 30 where I worked out the Bose Einstein distribution function, number 29 where I showed what the values for alpha and beta are, 28 were the Maxwell-Boltz-M distribution. Now this is the most detailed of the last. So I suggest go back to here if you don't understand what I'm doing in this video and if denodder is an leverage multiplier is not optimizing or maximizing the multiplicity. Because this is the last time we've done this or this is the last function to be maximized I'm going to do it pretty quickly because of this stage you've seen it a few times. So we're talking about fermions. So in a previous video I proved that the probability for fermions as a function of the number of particles in each macro box is the multiplication over s of the number of states in each macro box factorial. Now you have g sub s minus n sub s factorial. I have n sub s factorial. Okay, what we're going to do now is follow the usual procedure. So we're trying to maximize this function. So before we maximize the function what we need to do is make this look a bit better. So starting this approximation says the natural logarithm of a factorial is equal to a natural logarithm of a minus a. We also know that the logarithm of a b is equal to log a plus log b. Now we know that the natural logarithm of a over b is equal to the natural logarithm of a minus the natural logarithm of b. So look very quickly at what we have here. Well this is a product so that's a plus b and this in general here is a caution that's a minus b. So we're going to get the log of g sub s factorial. Sorry before we don't need that, excuse me, it's difficult to maximize this function. It's more easy or easy to maximize the log of it. So I'm going to take the log of this whole thing and then make it look nicer. So when we take the log bit we're going to have first of all a cautioned, so when I have a minus b, but the denominator is also going to have its own product, a plus b. And then I'm going to apply sterins approximation and all the factorials. Alright, so I'm just going to do it reasonably quickly because the algebra isn't that difficult. It's just a bit of a pain in the face I suppose you could say. Alright, so once you do all those that I said, the natural logarithm of p, okay with g sub s, log g sub s minus g sub s, that's the sterins approximation here. Then we have minus g sub s minus n sub s, log g sub s minus n sub s, that's another, and that's another sterins approximation. That's a plus here, okay, and then we have minus n sub s, log n sub s plus n sub s. So that's just applying the bit to the bobs that I did there. You can do some cancellation with this guy, with this guy, and finally with these two here. And what we find is the natural logarithm of the probability function for fermions is equal to g sub s, log g sub s minus g sub s minus n sub s, log g sub s minus n sub s, minus n sub s, log of n sub s. Okay, it still looks like a bit of a pain in the face, but it's definitely cleaner than what we had it. So that is the logarithm of the probability function for fermions. Now what we're trying to do is maximize this subject to constraints. So let's just remind ourselves what the constraints are. The first constraint is that the total number of particles is equal to the sum over s of n sub s. Okay, and that means that when we have the change of that is going to be equal to zero. So what we can say is that dn is equal to the sum over s of delta n sub s is equal to zero. That's the first constraint, I'm going to call it constraint one. And then we have a constraint on the energy for that dE is equal to sum over s epsilon delta n sub s is equal to zero. This is constraint number two. Okay, so going back to our method of Lagrange multipliers, we need to have the gradient of our function is equal to alpha times the gradient of constraint one plus beta times the gradient of constraint number two. All right, so alpha and beta are our Lagrange multipliers and the logarithm of the probability function is our function which we're trying to maximize. So what we need to do then is get what what is the gradient of the log of p. The gradient of the log of p is going to equal to the following. You're going to have plus one plus Lagg sub s minus n sub s, when I have minus one minus Lagg of n sub s. Okay, so it just, I'll just do the differentiation right there, the differentials here just for clarity even I've already written down the answer, del del n sub s of the Lagg of g sub s minus n sub s is equal to one over g sub s minus n sub s times minus one. Okay, and we have there with me now, so del del n sub s of the log of g sub s minus n sub s, we have g sub s minus n sub s is equal to plus one. All right, and that's the plus one up here. All right, so that's just the more difficult term. Now we need to get the derivatives of our constraint functions, so put them all together, we're going to get the following, we're going to get del del n sub s of the log of p is equal to alpha del del n sub s times n plus beta del del n sub s, operating i e. Okay, so we're going to get the sum over s. Natural logarithm g sub s minus n sub s minus the logarithm of n sub s. The reason we can do that is because the minus and the plus here cancel. All right, now we're going to be equal to our constraint functions, which is the sum over s and write it this way because it's just easier alpha plus beta epsilon or it would say instead of e you want to call it epsilon. Now, so if I bring this over becomes zero and the only way this equation will be satisfied, the only way this equation will be satisfied is if the logarithm of g sub s minus n sub s minus the logarithm of n sub s is equal to alpha plus beta epsilon. Okay, rearrange that. Okay, so if we expedient it both sides then we're going to get this. Like that. And finally if we rearrange it and divide it across by n sub s, you're going to get that n sub s is equal to g sub s divided by e to the alpha plus beta epsilon plus one. Okay, and that is the Fermi-Dirach occupancy function. So we know at this stage we know what we know all the components are, so that's the minus of those. You know that this is the density of states. And this here, that's the Fermi-Dirach occupancy function f of e. And this is n of e if I suppose we're talking about a continuum of energy states. So we could write this as n of e is equal to g of e times f of e. Like that. Alright. So we know that alpha for Fermions is there e? Yes, for Fermions we have a chemical potential Fermions. I'm actually, I'll have to think about that. But any of beta is one of the KT's I've done in the previous video. Okay, so that's all I've got to say about that. Thanks for watching. Please pass out your friends. Subscribe to my channel. And you might also have a look at University Physics Tutorials.com. Thank you.