 So we've seen a couple of different equations for PV work so far and one of the things that might be perhaps a little confusing is use different equations for different conditions for different types of processes. So for example we've seen, and we'll draw these graphically this time because it'll help them make a little more sense, when I'm doing an expansion of a gas from some initial volume to some final volume, so the final volume is larger than the initial volume, and I'm dropping from some initial pressure down to some final pressure, so P1 and P2. So point number one, the initial conditions at P1 and V1, and I've got another point at lower pressure and larger volume, that's the final conditions point number two. So what we've seen is that if we reversibly and isothermally expand this gas, then the work required, the work performed by the gas can be calculated with this expression, minus nRT log V2 over V1 if it's an ideal gas, because we use PV equals nRT in deriving that equation. So on the graph what happens for this reversible and isothermal expansion, remember we have a gas confined to a small volume with large pressure of two atmospheres, if I gradually reduce the pressure, the inside pressure and the outside pressure are always equal, P equals nRT over V, so this graph of P versus V has the shape of any PV equals nRT graph, pressure is inversely proportional to the volume, so the whole way down from the expansion from state one to state two, the pressure is proportional to one over V, and remember even more generally than this expression, work is minus PV, so what that means is the work is an integral, an integral is just the area under a curve, so in that sense all we've done when we calculate the work is calculate the area under this curve and throw a negative sign in front of it, so whatever the area under this curve is, that's proportional to the amount of work done by the gas as it lifts the lid of the container and does its PV work. In contrast, for the second case we've considered so far, for expansion against a constant external pressure, it turned out the work was just the external pressure times the change in volume with a negative sign, so in that case what we're doing instead of releasing the pressure slowly, the pressure got released immediately and the gas expanded against this constant external pressure, the final pressure and the external pressure are the same thing, so in this case we dropped the pressure immediately down to this value and then let it expand against a constant pressure the whole way from V1 across to V2, so in this case we're still calculating the area under this curve, but now the area is the area under this pink curve rather than the green curve, so in that sense it's not surprising that we get a different answer for process A and process B, let me label those, process A is the reversible and isothermal expansion, process B is this expansion, drop the pressure and then expand against constant pressure, it's not surprising that we get different answers because the two curves that we're calculating the area of are different from each other, so what that means is properties like the work where we use different equations because we're calculating the area under different paths, different curves that we calculate the areas underneath, those types of properties like the work are referred to as path functions, which just means that we get a different value depending on the path, if I hadn't taken this reversible isothermal path or this constant external pressure path, if I had taken, in fact we can draw, I could draw any arbitrarily complicated path I want, so if I take some completely different path from state 1 to state 2 then the work is going to be the area underneath that curve which will be a different value than either one of these, so in principle for every one of an infinite number of different paths I can take I'm going to get a different value for the work, so that's kind of inconvenient and something we want to avoid in general but the good news is many properties are not like the work and are not path functions, so to give you an example of something that works differently let's consider one of the only other variables we know how to calculate right now the internal energy, so for our ideal gases for anything that obeys the 3D particle in a box model under classical conditions we know that the internal energy is three halves nRT, so turns out in order to calculate the energy all we need to know is the temperature and how many moles there are, so if I want to calculate the difference in energy when I go from state 1 to state 2 that difference is just internal energy of state 2 minus the internal energy of state 1, so it's three halves nRT2 minus three halves nRT1 or three halves nR delta T, so this expression change in the energy if I know what the change in the temperature is I can immediately use that to calculate the change in the energy. Notice that it doesn't have anything to do with whether I've taken a reversible isothermopath or constant pressure path whether it's path A or path B or this blue path or any other path all I need to know is the temperature difference between the final state and the initial state and that temperature difference is enough to tell me the change in the energy, so functions like this are called not path functions but state functions because all I need to know is the states if I know state 2 and state 1 don't have to know anything about the path that connects them all I have to know is the beginning and ending states if I know those states then I have enough information to calculate the change in the energy likewise we could call you a state variable because again if I know the state of the system whether I'm at one or two or somewhere else if I know the state of the system including the temperature of that state that's enough information for me to calculate the energy of the state so whether I'm talking about a variable just the value of you or change in that variable all I need to know is the the states perhaps two states the starting and ending points I don't have to know anything about the path so there's a big difference between a state function where I don't care what path I took and a path function where I do need to know what path I took in order to calculate the work this might seem a little bit confusing because of course we know a connection between energy and work we know that the first law tells us that the change in energy is equal to some amount of heat plus some amount of work so if the energy doesn't depend on the path that I take and the work does depend on the path that I take how can those both be true of course that's because both q and w are path functions so any variability in the path any variability in the work due to the path that I take ends up being cancelled out by an equal amount of variability in the opposite direction in the heat so for example if we recall the values that we've seen let's say so we've been calling path a reversible isothermal path we've seen for that reversible isothermal process because it's isothermal there was no change in the energy the work done for the reversible path was negative 1570 joules and the heat was positive 1570 joules so again work plus heat add up to give me the change in the energy for a different path for the constant pressure path for this particular expansion we've been talking about of letting one mole of an ideal gas double in volume for the constant external path the work was a different value negative 1130 joules again it was isothermal so the total change in the energy was zero and the heat must have been positive 1130 joules so that's what I mean when I say all I need to know is the initial and final state doesn't matter what what path I take delta u is the same in either case the work is different depending on what path I take but also the heat is different depending on what path I take and and the variability in the work is canceled by the variability in the heat so that the sum of these two path functions is equal to the state function so that tells us the difference between path functions and state functions and and in general we're going to much prefer to deal with state functions where we only have to know the starting and the ending point of some process without having to pay too much attention to the path I take to get between them in fact very often what I'll do what we'll do is to calculate something like a state function we can choose any path if we're able to calculate the change in a state variable from state one to state two via one path it doesn't matter what path we actually take in the real world all the changes from initial to final are going to be the same value so for that reason state functions are going to be far more convenient to deal with