 So, we have an expression for calculating the work in a circumstance where the type of work we're doing is PV work, pressure volume work, meaning that under some pressure we're changing the volume of a system. But there's one important caveat to be aware of about this equation. When we derive this equation, when we obtain this equation, we made reference to variables like the microscopic energies, the energies that the system can have, and the Boltzmann probabilities. Remember what these Boltzmann probabilities are. They say that higher energy states with larger energies are less populated according to this Boltzmann distribution. So we, by using probabilities in deriving this equation, we've been assuming that every state is populated according to its Boltzmann probability. And very often that's true, but specifically for the case of expanding and contracting gases, that's not necessarily true. So when we make this assumption, we're assuming that the system is at equilibrium. What that word means in a chemistry context is when the system is at equilibrium, every state is occupied at the level that Boltzmann says it should be. So to illustrate why this isn't necessarily true, why we're not always at equilibrium when a system is changing, specifically when we're compressing or expanding a gas, let's consider a couple of examples. Let's say we've got a gas with an initial volume that, let's say the gas is at a pressure of two atmospheres inside this container, and let me make this like a piston. So the lid of this box can go up and down. The external pressure is also two atmospheres. So initially, I've got a box compressed to two atmospheres, and what I'm going to do is I'm going to release that pressure. So the final state of the system is going to have an external pressure of only one atmosphere. So of course, if it's an ideal gas, then when I cut the pressure in half, the volume is going to double, but that's not the important part of this calculation. What I'm going to see, let's say that we do this reduction in pressure very gradually. So I've got the gas compressed to add a pressure of two atmospheres externally. I'm going to very slowly and gently release the pressure until I've released the pressure outside, and it's only one atmosphere. And as I do that, the volume of the box is going to expand. The gas is going to expand to fill the larger volume. So this is an example of what we call a reversible process. Specifically, what we mean by reversible is that it's slow, gradual. It remains in equilibrium the whole time. So usually the word reversible and the word equilibrium have the same meaning in a physical chemistry context. Because I'm doing it nice and slowly, at every step along the way, the energy levels change in response to the change in volume. And we've given the system enough time to adjust the probabilities so that every change in energy results in a change in the probabilities as well. So that's for a reversible process that we do very slowly. The opposite of that would be an irreversible process. So to illustrate what that would be like, let's take the same initial and final conditions. So initially the gas is at two atmospheres, external pressure is two atmospheres. The final state is going to be the same as before. I'm going to allow the volume to increase because I've decreased the pressure to one atmosphere externally. The difference is going to be instead of doing that decrease in pressure slowly and gradually, I'm going to decrease the pressure very quickly. So one way I could do that, let's say the external pressure is two atmospheres. I'm compressing the box with a total pressure of two atmospheres. Let's put some pins in the piston holding the box closed. So I've got it compressed. The pins are holding the box closed so I can release the pressure and drop the pressure down to one atmosphere and the box lid doesn't move anywhere because I've got it pinned in place and now that I've decreased the pressure to one atmosphere, what I'm going to do is I'm going to remove the pins and what's going to happen is that the lid of the box will fly up very quickly because as soon as I remove the pins, the internal pressure of two atmospheres and the external pressure of one atmospheres are not in equilibrium with each other. This is a very non-equilibrium process. So the lid's going to fly up very quickly. The volume of the box is going to change very quickly and it's going to change so quickly that as the energy levels change, the populations of those energy levels can't keep up. So the system is not going to obey the Boltzmann distribution as the lid expands only after it's reached the final volume and sits there for a minute will the molecules decide what state they should be in and eventually reach the Boltzmann equilibrium. So that's the difference between a reversible process and an irreversible process or equivalently a process that remains in equilibrium and a process that is not at equilibrium or non-equilibrium process. So what does any of this have to do with PV work or this equation that we've derived for calculating PV work? The difference is that this pressure in this equation here, we've assumed for an equilibrium process, a process that obeys Boltzmann distribution, that during the whole process of the expansion, it doesn't matter whether we use the external pressure or the internal pressure because those two things remain in equilibrium during the whole expansion. So halfway through this expansion, when the external pressure has dropped to only one and a half atmospheres, the internal pressure has also dropped to one and a half atmospheres. The internal and external pressure are the same. For the non-equilibrium process, those two quantities are not the same. So for a non-equilibrium process, when this gas is expanding, the pressure that it's pushing against to do this PV work, remember work is a force applied for some distance, the pressure that this box-late is pushing against isn't the same as the internal pressure anymore, it's always pushing against this external pressure of one atmosphere. So what that means for this non-equilibrium expansion is that the pressure is not always the same as the external pressure. For the equilibrium case, it is always equal to the external pressure. And what that means is when I'm calculating how much work is being done by a system or being done on a system, what I really need to do is calculate negative times the external pressure multiplied by the change in volume. This equation is always true, regardless of whether we're talking about an irreversible system or a reversible system or process. This equation that we've had before turns out is only true for a reversible process. So this is the one that I'll put in a box that we can come back to and use whenever we want. That one's always going to be true. That's essentially our definition of the work for a process that involves PV work. If we have the special case where we're doing a reversible process where P and P external are the same thing, it's fine if we replace the external pressure with the internal pressure. And this equation is fine for a reversible case. But for the general case where we may be doing something irreversibly, we need to remember to use this expression. So let me point out also that this idea of reversibility and irreversibility applies not just to gases expanding. It could also apply to gases being compressed. We can compress slowly and reversibly. Or we can compress irreversibly, if we do it very quickly, by dropping a heavy weight on the lid, for example. But it's also not just confined to the idea of PV work. We can also talk about heating an object reversibly or irreversibly or cooling an object down reversibly or irreversibly. Any process that we can subject a chemical system to, we could do it reversibly so that Boltzmann equilibrium is maintained the whole time throughout the process or irreversibly where that's not true. So we will continue, though, talking about PV work. And so the next thing we'll do is do some examples calculating what the PV work actually is for a few cases of gases expanding and contracting.