 So, so far for the harmonic oscillator, here's what we've managed to do. We started with our assumption for what the potential energy is for our harmonic oscillator, quadratic function, 1 half kx squared. Quantum mechanics allowed us to solve for the wave functions of particles that obey the Schrodinger equation with that potential energy and also the energies of the functions that have those wave functions. And then as we've done before for both the particle in a box and for the rigid rotor, now that we know those energies, we can use those to obtain the partition function and also the probability of occupying any particular energy level. And once we have the partition function, then we'll be able to do a lot of things like calculating energies and entropies and heat capacities and pressures and so on. So, start with quantum mechanics, then do some statistical mechanics, which is our link to get to thermodynamics. So if we want to be able to talk about energies and pressures of vibrating diatomic gaseous molecules, the partition function needs to be our next step. So, with these energies, how do we find the partition function for a vibrating diatomic molecule, the partition function for a harmonic oscillator? As always, that's the sum of the Boltzmann factors. Sum of the eta minus energy over kT's for all the different energies that the system can have. But we know exactly what the energies are for a harmonic oscillator. Each of those energies, e sub n, that number n, that vibrational quantum number can range anywhere from zero all the way up to infinity. So we just need to complete that sum. If I substitute this expression for e sub n, I'll get e to the minus this energy, n plus a half h nu, all divided by kT. So, that can simplify a little bit and eventually turn into something useful. So, first of all, n plus a half, I've got a sum inside the exponent of this exponential, so I'm going to break that up into two different exponentials. So, inside the sum, I've got e to the minus n h nu over kT, and e to the minus one-half h nu over kT. So, I've just broken up this exponential into the product of two different exponentials, and the reason I've done that is because one of these two, the second one that I've written down, e to the minus one-half h nu over kT, that doesn't have any n's in it. The summation variable n doesn't appear anywhere in this term, so this term doesn't depend on the value of n, and I can pull it outside of the sum. So, I've got e to the minus, and let me go ahead and write that as h nu over 2 kT, bringing the factor of one-half as a factor of two in the denominator. All this is still multiplying the sum of e to the minus n h nu over kT. I'll go ahead and write that the same way for now. And I can't pull that out of the sum, obviously, because it has this n in it. So, let's think about what this sum means, so that the first term is still e to the minus h nu over 2 kT. What it's multiplying is the sum of these Boltzmann factors. Boltzmann factor with n equals zero, Boltzmann factor with n equals one, Boltzmann factor with n equals two, and so on. So, when n equals zero, I've got e to the zero. That one's easy enough. I'm adding the term when n equals one, e to the negative one h nu over kT. And I need the term with n equals two, so that's e to the minus twice h nu over kT. And so on, the next one would be e to the minus three h nu over kT, e to the minus four h nu over kT, and so on. So that's just what our infinite sum means is this sum of terms. But notice now, e to the minus two h nu over kT, that's the same thing as e to the minus h nu over kT twice. e to the minus h nu over kT squared. e to the minus two x is like e to the minus x times e to the minus x. In fact, every one of these terms is going to be this basic Boltzmann factor, e to the minus h nu over kT raised to some power. I've got one, e to the minus h nu over kT, e to the minus h nu over kT squared, e to the minus h nu over kT cubed, to the fourth power, and so on. So if I say this is, if I rewrite this more simply, if I let x be e to the minus h nu over kT, this looks like, term in parentheses looks like one, and an x, and an x squared, and an x cubed, and so on. Or I'll just let x be short for this Boltzmann factor e to the minus h nu over kT. Next step is to recognize that that sum, one plus x plus x squared plus x cubed, and so on. That's a Taylor series for, the quantity in parentheses is a Taylor series for one over one minus x, or a Maclaurin series if we want to be technical. So if we do that in reverse, if you take the function one over one minus x and obtain the Taylor series for it, the Taylor series you'll end up with is this Taylor series, one plus x plus x squared, and x cubed, and so on. So that's this term in parentheses. So if I rewrite everything now using that Taylor series, collapsing this infinite sum of an infinite number of terms down to this simple more compact term and remembering that x is equal to this Boltzmann factor, e to the minus h nu over kT. My partition function has now become this first factor, e to the minus h nu over 2kT times one over. So in the denominator, I'll put one minus x or one minus this Boltzmann factor, one minus e to the minus h nu over kT. So I'll go ahead and put that in a box. Cuz that's our final result for the partition function. This is the partition function, the sum of all the Boltzmann factors for harmonic oscillator which has these energy levels. And notice importantly what we've done is this is no longer an infinite sum. I don't have to sum up an infinite number of terms. If I know the values of these various constants, I just put them in a couple of exponentials, combine them together, and I can calculate the partition function directly. So notice also, I didn't make any approximations in obtaining this partition function. If you think back to what we did to calculate the partition functions for the particle in a box or the rigid rotor, they involved partition functions. They involved taking the classical limit. They involved converting sums to integrals and things like that. So we didn't end up having to take any shortcuts like that in this particular case, it's just happens to be the case that the infinite sum, the full infinite sum that we're interested in, happens to be the Taylor series for a more compact form. And so that allows us to write it in this form. So we didn't have to make any approximations for this partition function. The next thing we can discuss about the partition function is what it means. We can plug some values in and obtain numbers and we'll do that. But really what we're after is the question, is this partition function large or is it small? And thinking back to what the partition means physically, that's telling us if partition function is large, that means many, many of the states on this energy ladder are occupied. Quite a few of the excited states for the harmonic oscillator are occupied. But if q is small, that means very few of the states are occupied, maybe just the ground state is occupied. And the reason that would be true is if the gap between the, let's see, let's draw a real quick energy ladder, 1 1⁄2 H new, 3 1⁄2 H new, 5 1⁄2 H new, if the difference in energies between these states is large or small compared to kT, that'll tell us whether we're occupying just the bottom few states or lots and lots of excited states. And again, that energy difference compared to kT is going to be what determines the size of this partition function. So that's our next task is to figure out which of those two cases is true.