 Okay, so now we have an expression for how to calculate the PV work for a gas undergoing some change in its volume. This expression, dW is minus p, external dV. If we want to know more than just the infinitesimally small change in the work, the differential change in the work, we just integrate this process, so here's a more general expression for the finite amount of work for gas changing its volume from some initial volume to some vinyl volume. We just integrate p, external times dV over that change in volume. So let's take a closer look at this and see how that actually works in practice. We can do this for a couple of different types of expansion. In fact, let's consider the same two expansions, the irreversible expansion that we use to illustrate the idea of reversibility and irreversibility. Let's say that we have a gas that is initially, let's say we've got one mole of a gas at 273 Kelvin, initially at two atmospheres, and as I expand the gas, I'm going to let the pressure decrease to one atmosphere. I'm going to make sure and do that, let's see, we'll do that under a couple different circumstances. So I've got N1, P1, T1, if the gas is ideal, we can calculate the initial volume for a gas. I've chosen these values at 273, so if you remember the volume of a gas of mole of gas at STP, we could plug into p equals nRT and what we'd find out is that the volume of one mole of gas at 273 Kelvin and one atmosphere is 22.4 liters. If I double the pressure to two atmospheres, the volume is only 11.2 liters, so I'll skip the calculation of p equals nRT if you trust me that that's the right answer. So we're going to expand from an initial volume of 11.2 liters for this ideal gas to a final volume of 22.4 liters as the pressure drops from two atmospheres inside the box to one atmosphere. So how we do that process, let's say we either do that reversibly, so we can take our pressure of two atmospheres externally that's confining the gas to the box and release it gradually until it drops down to one atmosphere, that would be a reversible process. We all say that this is also an isothermal process, so reversibly and isothermally because we haven't let the temperature change, T1 and T2 are both the same value. That's a reversible and isothermal expansion or we can consider doing it irreversibly again as we did to illustrate the idea of irreversibility, let's say I just release the pressure all at once, let the lid fly up as quickly as it wants to and so that second process is expanding against a constant external pressure of one atmosphere. So two different ways of allowing this gas to expand, let's see what we discover about the work done by the gas in those two cases when we either let the gas expand reversibly and isothermally, nice and slowly, or when we let it again expand irreversibly against a constant external pressure. So let's do those one at a time, we can go back to our definition of PV work. The work done is minus integral of P external DV, so we'll start there, work is minus P external DV. For the reversible and isothermal process that external pressure is always changing, I start out compressing into two atmospheres and I gradually release the pressure dropping it down to one atmosphere. The key thing to notice in this case is that because it's reversible, because the pressure inside the box and the pressure outside the box are always the same, I can replace external pressure with internal pressure because those two numbers are always the same. And since we're dealing with an ideal gas that's doing this expansion, I know something about the pressure of an ideal gas, that's just nRT over P. I'm sorry, pressure is nRT over V. So the reason I've chosen to rewrite P as nRT over V is because I'm doing this integral with respect to volume, I don't know how to integrate P with respect to V because P depends on V, but if I write down exactly how the pressure depends on volume, then the V's are explicit, they show up in the integral. I know how to do an integral of 1 over V DV. So the V dependence in this integral, so the nRT I can pull out of the integral and I've just got an integral of 1 over V DV from V1 to V2. That's an elementary integral, integral of 1 over V is log V, so I've got minus nRT log V evaluated from V1 to V2 or minus nRT log V2 minus log V1. And the difference between two logs, log of V2 minus log of V1, I can write as a log of a ratio, log of V2 over V1. I've done two things. Number one, I haven't yet plugged in any numbers. I haven't used the fact that the temperature is 273 or the volume is doubled or anything. Anytime we have a reversible expansion of a gas, so P external is equal to P, if the gas is ideal and it's isothermal, so I can pull that temperature out of the integral. If I have a reversible isothermal expansion of an ideal gas, this is going to be our expression for the work. So that's going to be true anytime we have a reversible isothermal expansion. For this particular case with these numbers, I can compute the actual value of the work minus 1 mole of gas. Which value of R should I use? The values, you might think since we're dealing with liters and atmospheres, I might want to use the gas constant and units of liter atmospheres, but these units are going to cancel. When I'm talking about work, usually I'm interested in thinking about that in units of energy like joules. So it's going to be more convenient if I use the gas constant in units of joules per mole kelvin, multiplied by my temperature, and then by the log of V2 over V1. The volume changed from 11.2 to 22.4, so the ratio I need is 22.4 over 11.2. And when I plug all those numbers into a calculator, I get a number. So you find that if I let 1 mole of an ideal gas expand reversibly and isothermally, doubling its volume at a temperature of 273 kelvin, doing that reversibly and isothermally, the work is negative 1570 joules. So we'll come back and talk about the size of that number and the sign on that number in just a second. But first let's consider this alternate case where I do the same thing from initial state to final state, but via this irreversible path where I keep the external pressure constant. So let's see what we get in that case. So again, we can start by going back to the original equation. The work is always negative p-external dV, integrated from the initial state to the final state. In this case, I'm not going to do all these steps because, number one, it's not reversible. I can't replace p-external with p. It's irreversible, so I need to keep the p-external around. Luckily, we're doing it under conditions where the external pressure is constant. As soon as I remove my hand and let the gas expand against the external pressure of one atmosphere, the whole way up during the expansion, the external pressure remained constant at one atmosphere. So I can pull that constant p-external out of the integral. And now the integral we have is even simpler. Integral of dV is just V. So I've got minus p-external times V, evaluated from V1 to V2. V at V2 minus V at V1, that's just V2 minus V1. So I could write V2 minus V1, or I'll just write delta V, the change in the volume. So again, that's worth putting in a box. If I'm doing my expansion against constant external pressure, turns out the work is always minus the external pressure times the change in volume. Notice that this expression and this expression are different. I need a different equation to calculate the work for a reversible isothermal expansion of an ideal gas compared to the equation that I need to calculate the work for expanding against constant pressure. So the conditions matter. What condition we do the expansion under affects what equation we're going to use. In this particular case with these numbers, turns out I don't even need to know the temperature or the pressures and so on. I do need the external pressure. The external pressure is one atmosphere. The change in the volume when I go from 11.2 to 22.4 liters, I've increased the volume by 11.2 liters. And now I do get a value of work in units of liters times atmospheres. So I need to convert in order to compare our answer to the one we got before. I need to be able to convert liter atmospheres to joules. So I need to know how many liter atmospheres there are in a joule or vice versa. You can look up a conversion factor. It turns out there's 101.325 joules in a liter atmosphere. That's one the way you could do this or slightly simpler. You can just remember that the gas constant of 8.314 joules per mole Kelvin is the same as the gas constant of 0.08206 liter atmospheres per mole Kelvin. So that ratio of 8.3 over 0.082, that's the same number, 101. So the 101 joules per liter atmosphere is the ratio of these two values of the gas constant. So either way, when I multiply 1 atmosphere by 11 liters by about 100 joules per liter atmosphere, what I end up with is about 1100, exactly 1130 joules with this negative sign. So notice a few things about the answers we've got for these two cases. When I, first of all, both these numbers are negative. The work when I expand reversibly and isothermally, the work when I expand against constant pressure, those are both negative numbers. Remember what the sign convention means when the gas itself is doing the work, pushing back on the lid, the gas is performing the work, then the work is always going to end up negative. So the negative sign is telling us that the gas is performing the work. Notice also that we've got different values for the work done for reversible isothermal expansion compared to the work for a constant pressure expansion. So we get different values of the work depending on what conditions the expansion is done under. So that's going to be a common theme. The work is different depending on the path we take to get from these initial conditions to those final conditions. And in fact, that's what we'll talk about next is, actually what we're going to talk about next is paying a little closer attention to specifically this case of a reversible isothermal expansion. And after that, we'll come back and see what we can understand about the fact that we get different values of the work for different paths.