 All right, so we've done a few useful things with equilibrium constant so far. If we know the value of an equilibrium constant, we can use that to determine which direction the reaction is going to proceed. We can use that to go a little further and determine exactly how far forward or backwards a reaction will proceed and where it will reach equilibrium. But doing either one of those things requires that we know the value of the equilibrium constant, the value of this constant, k. So far, in the problems we've considered, we've considered the value of that constant to be given to us. And sometimes that's true. Sometimes you're given a value of k or you can look up a value of k. But the value in having an expression like this one and some other equations is we can calculate the value of k for ourselves. We can obtain the value of k, in fact, a bunch of different ways. We can certainly do an experiment. If we have a reaction we'd like to know the equilibrium constant for, we can throw some reactants and or products into a container, let the reaction proceed until it reaches equilibrium. If we measure how much of each reactant and product we have, use that to calculate the reaction quotient, which must be equal to the value of k, then we've determined the value of k experimentally. There's another way that we've seen, I'll just say, from the free energies. We can use the free energy change of a reaction to calculate the value of k. Remember we've seen an equation that says the value of an equilibrium constant is e to the minus Gibbs free energy change for that reaction divided by RT or divided by kT. So if we know the Gibbs energy change for that reaction, we can calculate k directly from thermodynamics in that way. We can also get the value of k from partition functions, as this expression says. Our understanding of equilibrium constants most recently is that it's this product of partition functions raised to their stoichiometric coefficients. So if the reactants and products in our reaction are simple enough that we can understand what their partition functions are based on what we already know about quantum mechanics or statistical mechanics, then we can use this expression to write them down directly. So for example, we know for gas phase molecules, in particular, monatomic and diatomic molecules, we know how to write down a partition function. Let's consider the case of a diatomic molecule that obeys the particle in a box in the harmonic oscillator in the rigid rotor assumptions, as we've talked about previously. That partition function, we can think of that being a product of the translational partition function, the rotational partition function, and the vibrational partition function. And we've talked about this one less, but also we might need to include an electronic partition function. So again, if we know how to write each of these down for a diatomic molecule, then we can just take their product. In fact, we do know how to write these down. If the gas phase molecule behaves like a particle in a box, so behaves like an ideal gas, then the partition function is going to look like 2 pi mass of the molecule kT over h squared raised to the 3 halves multiplied by volume. That's what we've considered previously as the translational partition function for an ideal gas. Vibrational partition function, we've also talked about, that's in the classical limit if the molecule is behaving classically. We write that as a temperature divided by a rotational constant, and then there's also a symmetry number in the denominator. One for a asymmetric heteronuclear diatomic molecule, two for a homonuclear diatomic molecule. The vibrational partition function, the most convenient way when we wrote that down was that's e to the minus vibrational temperature over 2 times the temperature minus e to the minus vibrational temperature over 1 times the temperature. That's the vibrational partition function. Electronic partition function, if we're at a temperature high enough to be exciting electronic states, that's going to depend a lot on the chemistry of this particular molecule. Most often those electronic excited states are very much higher than kT, way out of range. The only thing we need to know about the electronic partition function, the molecules are going to be stuck in the electronic ground state of the molecule, and all we need to know is the degeneracy, the electronic degeneracy of that ground state. That might be a singular or a doublet, there might be some integer number of states in that ground state. That's a fairly complicated expression, but there's nothing in there that we haven't talked about previously. That's how we write down the partition function for a diatomic molecule. There's one slight caveat or complication we need to talk about, which is that when we've written down partition functions for diatomic molecules previously, we haven't had to worry too much about the zero of energy, but now we are going to have to worry about that. Just to remind you what I'm talking about, if I have some potential energy as a function of R for a diatomic molecule, there's some vibrational states and stacked on top of those, there's some rotational states. So these are the energy levels in a diatomic molecule. When we've talked about those previously and said, for example, energy of the ground state is 1 half h nu, that's relative to this being the zero of energy. That the zero of energy is at the bottom of this well. But if we're talking about a reaction like, let's say, our reaction of h2 plus Br2 plus, not plus, becoming two molecules of HBr, then for an H2 molecule, if we draw the diagram for an H2 molecule, we've assumed that the zero of energy is at the bottom of the H2 covalent bonding well. However, if we're also in the same reaction talking about Br2, the zero of energy can't also be at the bottom of the Br2's bonding well. Br2 has a much more shallow bonding well. The bond energy of a Br2 molecule is considerably smaller. So if this is the curve for H2, this might be the curve for Br2. So the zero of energy can't simultaneously be here and at the bottom of this well. And there's nothing more special about the bottom of the H2 well than the bottom of the Br2 well. And we have to be consistent and use the same zero of energy for both systems. So we don't end up using this as our zero of energy. In fact, if I draw an HBr bonding well as a well, that's got yet a different depth for the bottom of its well. What these do all have in common is, at least certainly the way I've drawn them, is they all approach zero at the same level. Remember, these are potential energy curves. If I break the covalent bond and move these two H atoms far apart from each other so they don't have any interaction with each other anymore, their interaction energy has reached no potential energy. So instead of calling this the zero of potential energy, it makes sense to call the dissociated molecules, this dissociation limit, that's the zero of energy. So in that case, the energy at the bottom of the well is a substantially negative number. It's a different negative number for H2 than it is for HBr than it is for Br2. That has an effect on the vibrational energy levels in particular. So instead of saying, so previously we've said the zero point energy, the energy of the ground state, is 1 half h nu, or 1 half k times the vibrational temperature. That's 1 half h nu above this point. Now that we've changed our zero of energy, we'll write the zero point energy is going to be negative d sub b, the depth of this bonding well. Negative d sub b takes us all the way down to here. And then on top of that, I add 1 half h nu to get back up to the ground state. So 1 half k theta. When we use these energies, 1 half h nu or 1 half k theta, in things that become partition functions, when I have terms that look like e to the minus energy over kt, if in my previous case, if the energy was just 1 half k theta, that would look like e to the minus 1 half k theta over kt. If I simplify that a little bit, the k's cancel, and I've got e to the minus theta over 2t, where I've pulled that 2 into the denominator. That's the origin of terms that look like this, e to the minus theta over 2t in the numerator here. Now that I've changed the zero of energy, I have to write this term e to the minus ground state over kt. That's going to look like e to the minus negative d. So minus minus becomes plus over kt. And also, e to the minus 1 half k theta over kt, which is the same as it was before. So the presence of this shift in the zero of energy, this minus d sub e, introduces an extra term in this Boltzmann factor. I get an e to the positive dissociation energy over kt in addition to the previous term I had, e to the minus theta over 2t. So what that means, if I go back to this expression for the partition function, when I'm writing down the partition function, not just of a single molecule in isolation, but a bunch of different molecules where I have to keep the same zero of energy, what I have to be careful to do is, in addition to these terms, also throw in a term that looks like e to the positive dissociation energy from the bottom of the well over kt to account for those differences in the zero of energy. So now that we've made that correction, we can see that all we need to do to calculate an equilibrium constant is to combine a bunch of these partition functions. If I have a bunch of diatomic molecules reacting as reactants and products, I just need to combine partition functions in this way to calculate an equilibrium constant, and that's what we're gonna do next.