 We've finally made it to a position where we're able to get some really useful and interesting results for an ideal gas, which is what we're calling a 3D particle in a box in the classical limit. So we've been able to write down the partition function for a three-dimensional particle in a box in the classical limit or for an ideal gas. So we can use this partition function to describe a gas. Also remember we've seen these thermodynamic connection formulas. If we have a partition function, we can take particular derivatives of those partition functions to obtain thermodynamic properties like the energy and the pressure and the entropy. So we're well on our way to being able to calculate these thermodynamic properties. We've solved quantum mechanical problem to get the energies, use those energies to get a partition function. The partition function is about to tell us the thermodynamic properties for an ideal gas in particular. So let's see what we can learn from this partition function. If we would start by calculating the internal energy, the energy of an ideal gas. So using that thermodynamic connection formula, which tells us that the energy is kT squared times d log Q dt, or the temperature derivative of log Q. So I need to be able to take log of this partition function. Luckily that's just product of a bunch of different terms. So the log is the sum of the logarithms of the terms that are multiplied together. So I've got log of 1 over factorial, 1 over n factorial, which I can write as minus log of n factorial. I've got, for this parenthesis term, I've got log of this term to the 3n over 2. That's just the same as 3n over 2 times the log of the term in parentheses. 2 pi mk h squared. And instead of including the T, I'm going to look ahead a step and recognize that since I'm taking the T derivative, it's going to be nicer if my T is separated from the other variables a little bit. So I'll further break down log of 2 pi mk T over h squared into log of 2 pi mk over h squared and log of T. And that T is also still multiplied by a 3n over 2. So if we take these terms and combine them back up into one term, that's all the logarithm of this term right here. I still have the volume term to worry about. And that's plus n log of v. That's the log of v to the n. So I need to take the temperature derivative of this large term in brackets. Notice there's no temperatures anywhere except right here. So when I take the temperature derivative of log n or of this log term or n log v, those derivatives all disappear because there is no temperature dependence in those terms. And all I'm left with is kT squared out front, 3n over 2. Derivative of log T is 1 over T. So I've got a T squared that is partially canceled by this 1 over T. And in the end, I've got, let's see, the 3 over 2 as my constant. I've got a capital N. I've got a Boltzmann's constant k. And I've got one T that survives. So we've discovered that for an ideal gas, the internal energy is 3 halves n kT. 3 halves times the number of molecules, times Boltzmann's constant, times temperature. That may sound a little bit familiar. In fact, you likely are aware of the equation, similar sounding equation. Internal energy of a monatomic ideal gas is 3 halves nRT, where in this case, R is the gas constant and n is the number of moles of the gas. And in fact, these two equations are exactly the same thing, because Boltzmann's constant k and the gas constant R are also the same thing. So in case that fact is not familiar to you, let me point it out very briefly. So Boltzmann's constant is 1.38 times 10 to the minus 23rd joules per Kelvin. The gas constant, one of the units that you may know that in, is in joules per mole Kelvin. So if I convert this quantity to joules per mole instead of joules, keeping the one over Kelvin in the denominator. In other words, if I, in order to get moles, I can write one mole is 6.022 times 10 to the 23rd. So if I multiply these two numbers together to get a value that's in units of joules per Kelvin mole. So if you are not familiar with this fact that Boltzmann's constant and the gas constant are the same, I would encourage you to go ahead and pause the video, get out your calculator, take this product and see what you get. I'll give you a couple of seconds to do that. But when we multiply those two numbers together, it may or may not surprise you to learn that that value comes out to 8.314, which is the value that we call the gas constant. So this exercise just illustrates that the constant we call Boltzmann's constant, which we usually use in units of joules per Kelvin. And the constant we call the gas constant, which frequently we use in units of joules per Kelvin mole, those are really the same numbers. One is expressed in terms of joules per Kelvin, the other one expressed in joules per Kelvin mole. So k and r are the same thing. k times the number of molecules is exactly equal to gas constant times the number of moles, where the n in moles in this case is to cancel out the units of moles. So either one of these expressions is fine. The energy of an ideal gas is 3 halves nKt or 3 halves nRt, depending on which one you prefer. So that's reproducing a result you may have seen before in general chemistry. We can also calculate the pressure. I'll skip the entropy for now. But we'll calculate the pressure of an ideal gas using the thermodynamic connection formula. So the connection formula says pressure is kT d log QdV. So I need to take kT times the volume derivative of log Q. Log Q is this long thing we calculated before. So that's still the same as it was minus log n factorial plus 3n over 2 log of 2 pi mkT over h squared plus n log V. That's the quantity I have to take the volume derivative of. Now I don't care about the T anymore, what I care about is the V. There's no Vs anywhere except in this log V term. So my result ends up looking like kT times volume derivative of n log V. So there's an n derivative of log V is 1 over V. And if I simplify that a little bit, it looks like pressure is equal to nkT divided by V. Or if we remember that the gas constant and Boltzmann's constant are the same thing, molecules times Boltzmann's constant is the same as moles times the gas constant. And we found that pressure for an ideal gas is equal to nkT over V. Or in slightly more familiar terms, pressure is equal to nRT over V, which of course if we rearrange it, gives you the result you could have already told me, which is that PV equals nRT. So let me stop there and point out a few things about this result, these two results. So first of all, you might be somewhat surprised that such a familiar result comes at the end of doing all this work. So we've actually done quite a bit of work to derive this expression for the ideal gas law. So remember, we had to do a bunch of quantum mechanics, solve the 3D particle in a box, shorting our equation, use those energies to get a partition function, stick those into some thermodynamic connection formulas to get the pressure. So we did quite a bit of math to get this very simple result. But what's very important is this result comes with no measurements or empirical experimental work at all. So unlike Boyle and Charles and Dalton and the people that derived this expression experimentally several hundred years ago, all we had to do was assume that quantum mechanics works, assume V equals 0, assume the molecules of the gas are not interacting with each other, and then use the Boltzmann distribution to tell us something about which states are actually occupied, and all the rest of that followed directly and we were able to predict this ideal gas equation of state using only those assumptions. Nothing we've talked about so far has relied on any measurements of anything in the real world. So this is a purely theoretical prediction, which is one of the most powerful things about quantum mechanics and then statistical mechanics, is the predictions it can make without any experimental input. The other thing that's worth pointing out at this point is that these expressions, so once we've obtained an expression pv equals nrt or pv equals nkt, because we can then go into the real world and make measurements about gases, what is the pressure of a gas, one mole of a gas at a particular temperature at a particular volume, we can use this result then if we don't already know the value of k or r. Remember when we first wrote down expressions for the entropy that had a k in them, k could be any value, and we've been using the value of Boltzmann's constant ever since, but we didn't have a real good reason why that was the particular value of Boltzmann's constant. Here is one of many reasons we have for using that particular value for the gas constant or for Boltzmann's constant. Turns out that Boltzmann's constant has this value because that's the value that predicts the results that we do see in the real world when we use this equation that came theoretically originally from quantum mechanics for 3D particle in a box. So we've been able to obtain two important results, the energy of an ideal gas and the pressure of an ideal gas. While we're talking about gases, the next step is to continue to talk about some more additional properties of gases and that's what we'll do next.