 So we have thermodynamic connection formulas for the energy and for the entropy. The next step is to calculate one for the pressure, which is a very useful property to have one available for. So that's our next task. So remember to come up with these thermodynamic connection formulas. We're looking for a connection between the microscopic definition and the microscopic definition of some property. So for the pressure, what that means is we need to understand what it means to talk about the microscopic definition of the pressure. So we're going to have both pressures and probabilities in this lecture, both of which we'll use the variable P for. So I'll use capital P's for the pressure. This is the pressure that we're talking about and the pressure with a subscript on it. We need to be able to talk about what is the pressure of an individual state of the system. A system in energy level one or two or three might have different pressures from each other. So each one of those has its own microscopic definition of the pressure. So in terms of a definition, how we define the pressure at the microscopic level is it's the derivative of the energy with respect to volume with a negative sign because the energy goes down as the volume goes up and vice versa. So you can take that just as a definition of what pressure means at the microscopic scale or if you want a justification for that I can give you an illustration to explain why this definition makes some sense. So let's go back to the macroscopic level and let's say I've got a box that might contain a gas or might contain some other substance and this gas is under some pressure. The gas inside pressures out against the walls that's kept in balance by pressure pushing on the walls of the gas that keeps the volume of the box from either expanding or decreasing. So we know from a more macroscopic point of view that pressure we can think of pressure as force per unit area. So if the surface area of the top of the box is some surface area A then there's some force pushing down on the top of the box that force divided by the area is the pressure on the top of the box. We also know that force is, let's do that the other way around. Energy or work in particular is force times a change in a distance over which that force acts. So a change in energy is equal to a force over the distance across which that force acts. So in this particular case what that means is we allow that pressure to do some work by pushing down on the box. Let's say we decrease the box size by some delta L. The height of the box decreases by delta L. Then the energy of the box is increased because we've done work on the box. That amount of the energy increase is equal to the force being applied on the top of the box multiplied by the distance across which that force acted. So force is equal to change in energy over the change in length. So if I use that F in this expression we can see that the pressure is force or delta E over delta L divided by area. But length times area that's volume. The change in the size of the box multiplied by area of the box that's the change in the volume of the box. But notice the signs. When delta L is a positive number based on the way I've constructed the problem I've decreased the height of the box and that decreases the volume of the box. So change in length times area is equal to negative change in volume and that's where the negative sign comes in. So again this is just a justification in illustration of why this statement makes sense. At the macroscopic level it makes sense. Pressure is the change in energy per change in volume or if I convert those deltas into derivatives for infinitesimally small changes it's the derivative of energy with respect to volume. So that's where we get this microscopic definition. So microscopically at the level of individual quantum energy levels the pressure of an individual state is the derivative of the energy of that state as I change the volume of the system. So we need to make a connection between that and the macroscopic definition of the pressure. So macroscopically the pressure we can think of as the average of all the pressures of all the individual microscopic states of the system weighted by their Boltzmann probabilities. So here's the equation I warned you about that we would have both probabilities and pressures. The average pressure, so these are both capital P's for pressures. The average pressure, the macroscopic thermodynamic pressure is maybe the microscopic pressure of the first state or second state or third state. It's actually the average of all those depending on the weighted by how much each one is occupied. So it's the probabilities multiplied by the pressures summed over all the states the system can occupy and we're used by now to the fact that we can write the probabilities using Boltzmann's probability distribution so those probabilities look like 1 over q e to the minus energy over kT and the microscopic pressures we know are minus derivative of energy with respect to volume. So there's an expression for the macroscopic pressure. It's not quite as convenient yet as we'd like it to be because it's a sum of these derivatives of energies with respect to volume so we can do a little bit more to clean that up. Let me go ahead and take the q out of the sum. So I've got minus dE dV multiplied by Boltzmann's factors. So the next step in order to understand what this summation means we'll make a little mathematical aside and just like earlier when we were deriving the thermodynamic connection formula for the energy we discovered that the summation we were interested in was related to the derivative of q with respect to temperature in that case. Turns out in this case it's going to be related to the derivative of q with respect to volume. So let's figure out what the derivative of the partition function with respect to volume is. It's the volume derivative of the partition function or the sum of all the Boltzmann factors. So that's the derivative we want to take. Again the derivative of this sum, the sum is just first term plus second term plus third term plus fourth term and so on. The derivative is derivative of the first term plus the derivative of the second term plus the derivative of the third term. So it's the sum of each of the derivatives of each of the terms. So we just need to be able to take the volume derivative of e to the minus energy over kT. So you can look at that and ask yourself where is the volume. I'm taking the volume derivative but I haven't written a V on the board anywhere here. But of course the energies of the system do depend on the volume. In general when I change the volume of the system of any type its energy is going to change. We've seen that for a particle in a box when I can find something to a small box. The energy is different than when I can find it to a differently sized box. So the energies do in fact depend on volume and the derivative I need to take, derivative of an exponential is an exponential multiplied by the derivative of the exponent. Or I haven't left myself quite enough room here. Let me say minus 1 over kT, derivative of minus e over kT, and also I need a derivative of e with respect to V. So if I rearrange that expression a little bit more I can pull the k and the t out of the sum. In fact let me pull those out of the sum kT, sorry 1 over kT, times the sum of negative dE dV times Boltzmann factors. And we see now that what I've written right here, sum of minus dE dV times the Boltzmann factors, that's exactly the sum we're looking for over here. So that sum is equal to dQ dV if I pull the kT over to the other side. So kT times dQ dV is equal to the thing I've written above the green brackets here. So that's what we can use to replace the sum to get rid of the sum in this expression here. So we'll do that if I write 1 over Q. We've just figured out that the sum of minus dE dV e to the minus energy over kT is kT dQ dV. I'm sorry dQ dV. And if we rewrite 1 over Q dQ dV as the derivative of log Q with respect to V, again because derivative of log is 1 over and chain rule tells us we need dQ dV, then this expression becomes kT times derivative of log Q with respect to V. And what that's all equal to is the pressure, the macroscopic pressure. So that's worth putting in a box and remembering for later. And that's the result that is our thermodynamic connection formula for the pressure. If we know what the partition function looks like and we want to find the pressure without going to all the effort of doing these infinite sums, we just have to take log of the partition function, take its derivative with respect to volume, multiply by kT, and that'll tell us what the pressure is. So we'll be able to do that soon enough on a problem for which we can calculate the partition function precisely. So we now have thermodynamic connection formulas for three different properties, energy and entropy and pressure. We could continue and calculate more thermodynamic connection formulas. We'll do that eventually, but now would be a good time to move on and start applying these formulas to some problems for which we can calculate the partition function and the first problem that we'll do that for is the particle in a box.