 All right, so we are making a fair amount of progress at understanding how to understand equilibrium constants for molecular reactions. We know that the equilibrium constant is a product of partition functions, and we've also known for quite a while now that the partition function for a diatomic molecule we can write as the product of a translational piece, a rotational piece, a vibrational piece. We've seen more recently that we have to include a correction for the zero of energy that involves the bond association energy. And lastly, this G term here is the electronic degeneracy of the molecule. So combine all those pieces together, that gives us a partition function for a molecule. So if we now have a reaction that involves diatomic molecules, then we have all the pieces we need to be able to write down what the partition function looks like. So let's go ahead and do that for an actual reaction. So let's take as our reaction this HBr formation reaction, where one hydrogen molecule and one bromine molecule recombine to form two HBr molecules. And we're going to need lots of constants, we're going to need masses and rotational constants and so on for these molecules. So let me go ahead and get those on the board. Masses in grams per mole. I'll just write a little chart of these values for H2 and Br2. Also the rotational constants, those will be in units of Kelvin. Vibrational constants, again in units of Kelvin, bond association energies for these molecules, which I'll write in kilojoules per mole. And lastly, the electronic degeneracies of the ground states of these molecules, those are all just one. Each of these molecules has an electronic ground state that's not degenerate, that just has a single degenerate ground state. So those are the values we're going to need to plug into this equation. The equation that we need to plug into is this expression for the equilibrium constant. So I'm going to take each of these partition functions raised to a stoichiometric coefficient. So my reaction is products or HBr with a stoichiometric coefficient of 2. The reactants are H2 and Br2, each of which has a stoichiometric coefficient of 1 on the reactant side. So that's H2 to the negative 1 and Br2 to the negative 1. So those show up in the denominator. So I'll write this on a new line. So I'm going to take this expression for the partition function for each of these diatomic molecules, plug it in for HBr and the numerator H2 and Br2 in the denominator. The numerator is going to look like this expression for HBr. The partition function, remember, is squared. So instead of taking this to the 3-house power, I'll square it and make it to the third power. Likewise, the volume is going to be V squared. Each of these terms is going to show up squared. I'll go ahead and insert the symmetry number. The symmetry number for HBr is just one symmetry number when I get to it for H2 and Br2 because they have a twofold symmetry. I can rotate them, exchange the two H's, exchange the two Br's, and I have the same molecule. That symmetry number is going to be 2 for the H2 and Br2 molecules. All right, so now we have an expression for the partition function of HBr squared. I'm going to now put in the denominator a very similar looking expression just for H2 and for Br2. And those are not squared, those just show up to the first power. That's the term for H2 in the denominator. I also need in the denominator an entirely similar term for Br2, which I'll run out of room for, so I'll write that. This is still in the denominator. So there's the third of my partition functions now for Br2. So that's a fairly ridiculous looking expression. We can simplify it a little bit. Some of these terms, because I have something squared in the numerator and something very similar times another one very similar in the denominator, terms like this v squared will cancel a v and a v in the denominator. Likewise, 2 pi kT over H squared to the third cancels 2 pi kT over H squared to the 3 halves and another 2 pi kT over H squared to the 3 halves. See, these temperatures will go away. I can't cancel any of the terms that are specific to each molecule, any of these terms that differ for the different molecules. So I can't cancel the masses because the mass of HBr is not the same as the mass of H2. I can't cancel the rotational temperatures and so on. So what I'm left with after that cancellation, so I'll collect the like terms together. So for example, I have mHBr, this is actually cubed, divided by mass of H2 to the 3 halves, mass of Br2 to the 3 halves. Likewise, if I collect these rotational temperatures in similar terms, I have a 1 over 4 from the symmetry numbers for H2 and for Br2. All right, so now I've included the ratios of all these terms in the numerator relative to the denominator segregated by the terms that came from the translational partition function, the terms that came from the rotational, the vibrational partition function, the bond association energies, and the electronic degeneracies. So now it's as simple as I can get it before we plug some numbers in. So if we do the still fairly complicated arithmetic of taking these numbers and plugging them into this expression, it's useful to do that step by step. For example, if I first just take these terms involving the masses, everything that survived from the translational bit of the partition function, this ratio of the mass of HBr squared divided by the mass of H2 and the mass of Br2, each to the 3 halves, that term to a few sig figs ends up being about 20. I'll leave this 1 over 4 term by itself. The rotational term, so 20 times 1 over 4, the rotational term ends up being 0.07. The vibrational term, this long collection of exponentials involving vibrational temperatures, that ends up being 0.23. The term involving the difference in bond association energies, e to the bond association energy of HBr twice in the numerator and then H2 and Br2 in the denominator, those difference of bond association energies in the exponential, that turns out to be roughly 1,400. And then lastly, the electronic degeneracies didn't affect things at all. So we'll do, I'll go ahead and tell you what the result is. If I multiply all these numbers together, the final result is 1,800. So if all we cared about was the partition, I'm sorry, if all we cared about was the equilibrium constant, that's the number, the equilibrium constant for this reaction. And I suppose I needed to have told you, since temperature shows up in this equation all the time, when I did this arithmetic, I had to choose a particular temperature. I did these calculations, these are arithmetic calculations, at a temperature of 1,750 Kelvin. So if the problem was determine the equilibrium constant at a temperature of 1,750 Kelvin for this reaction, we've got an answer. At 1,750 Kelvin, the reaction goes pretty strongly towards products because this equilibrium constant is quite large. But what's even more interesting is now that we know where that number comes from, we can see which of these terms is most responsible for that large equilibrium constant. Why does it go mostly towards product? The largest contribution is from this 1,400 term, which was largely responsible for driving the reaction towards products. That's because the products in this reaction HBr have a bond association energy that's deeper, more negative than the average of the H2 and Br2 reaction molecules. So every time we break an H2 and break a Br2 molecule, which costs energy, we get back more than enough energy to pay for that by forming two HBr molecules. So the decrease in energy pushes the reaction to the product side. Likewise, there's some other terms that push the reaction to the product side. The masses, for example, the reason the translational contribution to the partition function pushes the reaction to the product side is in this case because H2 is such a quantum mechanical molecule that the degeneracy of the translational states, that the contribution from the partition function from HBr is bigger than the product of the two partition functions for H2 and Br2. Because Br2 and HBr are both fairly classical molecules especially at this temperature, H2 is still fairly quantum mechanical. So there's more degeneracy for these classical molecules. The reaction is pushed more towards the product side to convert the quantum mechanical molecules into more classical molecules with higher degeneracy. So those factors are countered by some of these other terms that drive the reaction more towards products. In particular, the symmetry number, the less symmetric, I'm sorry, the more symmetric H2 and Br2 molecules are responsible for this factor of 4. So the reaction is driven toward the degree of higher symmetry of the H2 and Br2. For the rotational and vibrational temperatures, the reason they drive the reaction backwards is because in this case, if we look at these numbers, H2 is certainly a very quantum mechanical molecule with a relatively large rotational and vibrational temperature. But even HBr, because of the presence of the H in that vibrational motion or in the light-reduced mass of that molecule, means that it's also fairly quantum mechanical. So turning HBrs into Br2s and some H2s, which the Br2 is much more classical, that increases the contribution of the partition function at least from the Br2 contribution. So the net result, there's lots of complicated factors pushing the reaction slightly forward, slightly backward, strongly forward, and so on. The net result is this 1800 for our equilibrium constant. So the takeaway after seeing this long-involved calculation, there's a few things to notice. Number one, we can calculate equilibrium constants from scratch. Notice there's nothing here other than fundamental quantum mechanical properties of these molecules from which we can predict equilibrium constants describing how these molecules behave at the macroscopic scale. We can see where that value comes from. In particular, we can see how it depends on temperature. If I were to give you a different temperature than 1750 Kelvin, you could calculate the equilibrium constant and it would turn out different at different temperatures. So the equilibrium constant will depend on the temperature, and now we can see exactly in what way. It's a very complicated temperature dependence, but the temperature dependence is all encapsulated here. This prediction of the equilibrium constant can be quite accurate if we have accurate measurements of these constants, and if we want a really accurate answer if we were to include effects of anharmonicity and other corrections to these idealized harmonic oscillator and rigid rotor versions of the molecules, then we can get quite accurate calculations of the equilibrium constant and how it depends on temperature. And then lastly, some of this cancellation that happened here, this calculation was already bad enough. It would have been a little worse if I didn't have this amount of cancellation that I did have. The reason that cancellation happened, the reason that I had two volumes in the numerator and two of them in the denominator is because I have two molecules on the product side and two molecules on the reactant side. So these coefficients match some of these two coefficients. Not every reaction works that way, so some reactions are a little more complicated than this to deal with, and that brings in some additional complications that we'll talk about next.