 I think on the exam I saw people counting digits with their finger to determine the power of 10. That's crazy. Put your calculator on scientific notation and never take it off scientific notation unless you're going to be coming at countant. Leave it on that and let the calculator do the figuring. Counting digits is very prone to error. If you get the wrong power of 10, you've made a mistake. That's way off. It's a small mistake counting, but it's way off in terms of the answer. Okay, we had a problem to do in which we had a Van der Waals gas and instead of solving for V like on the first midterm, we had P, V, and T and we were asked to estimate how many moles of gas were in there. And of course, we can get our first estimate from the ideal gas equation, but we don't expect that to solve the Van der Waals gas equation because the whole point of the Van der Waals gas equation is it takes into account attraction and repulsion and because the constants A and B have been obtained by looking at the actual performance of the gas, it's going to be more accurate than the ideal gas equation. The price we pay is A and B are different for every material. Okay, so let's have a look at this problem and make sure we all know how to guesstimate for lack of a better term to two digits, the value of N. You could actually solve this, but solving an equation symbolically is usually far, far too much work if you only want one answer. If you want to keep changing P, V, and T and figuring N over and over, yes, it's probably worth the time to sit down and solve the thing and say N equals some gigantic thing. Put that in a spreadsheet and then plot it, do what you like. But if you're just getting one value, it's way, way too much work and the other thing about it is that symbolically solving things is also prone to error, you can make a slip up and it could be that the number of calculator strokes in the exact solution is about 10 or 20 times the number of calculator strokes to just get the answer. And in that case, it's going to be far faster to just guess the answer. Okay, here's our equation and before, and I did an example before, we had a fixed value of the number of moles and the pressure and we were trying to get V. We had A and B, of course, and the temperature and we could take the same approach here but it's no good if when you guess, both sides change because when both sides change, it's hard to figure out what's going on. It's like a target that keeps moving around. It's much easier to shoot at a target that's still than to shoot at an animal that's running around, much harder to hit it. And so to get rid of this, I want to somehow set this up so that one side doesn't change and the other side has N. That's the idea and I can do that any way I want but the simplest way that I can see to do it here is to divide both sides by N and since N is not zero, I'm okay doing that. Whenever I take an equation and I divide both sides of the equation by anything, I make a note in the margin. Whatever I just divided by, better not later turn out to be zero or then I've made a real mess out of things and sometimes that does happen. You forget and the answer is zero but you've solved the wrong equation then. So we'll divide by N on both sides of this. This N will go away and we'll have a 1 over N out here and then we've got a bunch of stuff that depends on N and we've got RT and RT, well, R is a constant and T was specified so that means that we now get this nice equation to solve for N. It's a fixed target and we can home in on it quickly. So let's put in the numbers. On the exam at least in one version we had 0.7 liters for the volume, 50.5 degrees C for the temperature which we immediately convert to Kelvin, two atmospheres, 20.4 for A in the appropriate units and 0.138 liters per mole for B. We just put in every single number that we've got into this side and then we end up with a strictly numerical equation to solve which is this following equation. On the left hand side we have 1 over N times quantity 2 plus 41.63265 N squared times 0.7 minus 0.138 N equals 26.55791. I tend to put a lot of digits because I want to make sure that I'm not inadvertently getting a poor result because I rounded the target off. And usually it's okay but I'm in a habit of writing down a lot of digits just to make sure it's okay and then putting in our guess. Now if we only need N to two digits it's not too bad. We have a guess for N but if we don't have a guess put in some guess and just don't put in N equals 0. That's a bad guess, it's too small. Our first guess in this case since we know P, V and T we just guess, I guess that it's probably pretty close to ideal let's say and so I'm going to guess the number of moles is P, V over R, T. And once I have that then I set up this function and if I have a calculator that will set up a function so that it's one keystroke I use that feature of the calculator because I'm going to be hitting this function over and over and that's going to be much more efficient. Okay, let's have a look. Our first guess if we take P, V over R, T is 0.0527 moles and because it has 1 over N leading when I increase N it's going to make the function smaller but I don't need to know that in advance. In other words if I have a complicated equation lots of things with some variable X equals 2. I take a guess and I increase X, I decrease X and I see how it behaves and I'll figure out whether I should go up or down if I make a table. If I don't make a table then I might get lost and that's why I always like to make a table when I'm doing this because I found out with experience that it's quicker. If I set up what I'm going to guess for N, what I'm going to get for the function and I usually divide by the units so that I just write a number then I have a target value which is R times T and then I have a comment in case the phone rings or something happens and I have to go back to this, I like to have the comment or if I go back to it weeks later and I have to redo it again for a report the comments tell me what I was thinking at the time so I guess the ideal gas value of 0.0527 moles and I find the function comes out to the number 29.0642. What I want to get is 26 and so the function is too big. When I say too big I'm referring to the value that I got not the guess for N, just the function value. Now since it's too big that means that N is probably too small and one good way to do it is say well how too big and too small is it? It came out to be 29 over 26 about so therefore if I increase N by about 29 over 26 it might be pretty close. It turns out that's a little bit too big and with some experience I say well I'm not going to go all that way because I see the minus N squared and the other things and I then if you take 29 over 26 you get about 0.057. I guessed about half way and this was just pretty lucky. I got 0.055 I tried, I increased it and yes it went down 26.6146, I want 26.5579 so this is just blind luck. This is what I really did and it's just lucky that it's that close but it is quite close and I only need two digits so if I were in a rush I'd say wow I'm going to guess 0.55 as my two digits 5.5 times 10 and the minus 2 but since I have a little bit of time I'm going to bump it up a little bit to see if I can lower this down and I just tried putting another digit here because I saw when I went up 0.03 it went down by 3 so I'm just going to bump it up just a little bit and I tried 0.551 and now I get 26.5102. I want 26.5579 so I'm just below. Here's what I've got here. When I guess 0.055 I'm a little bit high. When I guess 0.551 I'm a little bit low. Therefore the answer is between 0.055 and 0.0551 while I only need two digits so I'm done. I quit it's between these two if it were between 0.055 and 0.05549 it would still be 0.055 and so I'm done. Now it can be that fast if you practice a little bit or it can be like a game of hide and seek where you punch a wrong button one time and you get a dud answer for F and then you kind of get lost or mixed up that can happen. You can just make a mistake on the calculator and then one of these values you get is way off but if it's not behaving stop for a second and try that again and make sure that you didn't punch a wrong button and then you'll home in on it. Okay it has to make sense because these equations are not that complicated some equations can be tricky because they have a lot of wiggles in them and they may come down near the answer and go up and then really hit the answer. And those kinds of equations can be very tricky for anybody to solve including a computer. Then you may have to graph the whole thing and look at it and try to zoom in on where you need to be. Okay so that's the comment on that type of problem. Now let's get back to free energy where we left off. We had a summary and here is the summary. We considered exothermic reactions, reactions that disordered the system, endothermic reactions, reactions that ordered the system and we came to the following conclusion. If the reaction is exothermic so it dumps heat into the environment and disorders the environment and in addition if it disorders the system because the entropy of the system increases for example by making a lot of gas then such a reaction is always spontaneous at all temperatures. Those kinds of reactions are considered winners. They always work, you always get a high yield of products. If on the other hand it's exothermic, it disorders the environment but the system orders for example like ice freezing then in that case it's spontaneous at low temperatures, low enough temperatures. If it's endothermic and the system becomes more disordered then I can overcome the endothermic part of it by making minus T delta S big and negative and that means making T big since delta S is positive and that means that this kind of reaction will be spontaneous at high temperatures and then we have some that we get stuck with that are endothermic plus we're making it more ordered and such a reaction is not spontaneous. That doesn't mean we can't do it. That means that in order to do that reaction we have to couple it with some other reaction we run in a different beaker that's wildly favorable so that overall putting everything together the whole nine yards is favorable. That's what chemists do. Oftentimes reactions aren't favorable. We put in energy, we beat on it, we put pressure on it, we make it happen anyhow but it means it's going to cost more to do that. Somebody's going to be paying for that whereas the top one I just mix and schmix the stuff up and it just goes perfect, okay? I don't have to do anything and the way we figure this out in every case at constant temperature and pressure is we just look at delta G and we say delta G for whatever change we're writing whether it's a phase transition or chemical reaction or a nuclear reaction or anything delta G has to be negative and so either delta H is negative or this thing's negative or both are or the sum of them is negative and that's how we come to these conditions on when the reaction is going to occur. If just because the reaction is spontaneous however that doesn't mean it's going to happen fast. It is spontaneous for us to burst into flames. We write down all the materials we're made out of plus oxygen and we work out delta G. It's big, huge and negative but we still live a rather long time because the reactions are slow. On the other hand if we heat a person up enough they get caught in a burning building then they will light on fire and they will burn and that reaction then is happening too quickly and that's extremely dangerous. Okay. Now gases always have higher entropy than solids or liquids. That just makes sense because they're far, far more disordered. So if we have a chemical reaction of any kind that produces a gas or if it produces more moles of gas than it uses then we can predict that reaction will have positive delta S without doing anything else. Just without knowing anything we'll assume it has positive delta S and therefore any reaction that produces a gas will become more and more favorable at higher and higher temperatures because the minus T delta S term will take over. And finally no matter how endothermic the reaction is or how positive delta H is if we heat it high enough the minus T delta S term becomes big and negative if the reaction is producing gases and that term takes over and that's why if we heat up molecules enough they'll break apart because when they break apart we take let's say one mole of material as a gas and we convert it to several moles by making them all atoms then that will be favorable at high enough temperatures. Sometimes that temperature is very high but it means you can eventually break things apart by heating them up. And finally you can actually boil the electrons themselves off the atoms. You can heat them up they become more disordered and they sail off and now we have kind of a sea of ions that's a very, very high temperature. That material is called a plasma and the study of it is called plasma physics because there's not that much chemistry that can occur in a plasma in the traditional sense that a chemist talks about making complex molecules like drugs or materials. And we can do this as it stands now. We can actually by brute force we can run water backwards and we can take a nuclear reactor and we can heat water itself up so hot that we can thermalize it, bust it apart into H2O2. You need a lot of muscle to do that but you've got a factor of 10 million in a nuclear reaction so you've got the muscle and you can make hydrogen that way if you want to and it works. Hydrogen is extremely useful because you can use it in lots of other reactions and as we saw it might be useful one day as a fuel because it is very, very green in the sense that it doesn't produce any carbon dioxide because it doesn't have any carbon. Okay, let's take a look then at the ammonia synthesis which is a very, very central reaction to our well-being as we'll go into here in a second. The synthesis of ammonia from hydrogen and nitrogen is an exothermic process, good, delta H is negative, we aren't dead yet. And we know that because if we make ammonia from elemental molecular hydrogen and molecular nitrogen, we're making it out of the elements. If we make it out of the elements in the standard state, delta H of formation, we can look up at 298.15 Kelvin is minus 45.9 kilojoules per mole and of course that's per mole of ammonia, so therefore the balanced reaction we have to write has fractions in it. We write down formally half a mole of molecular nitrogen plus three halves of a mole of molecular hydrogen and we get one mole of ammonia in age three. Well, let's look at this then and see what we can ascertain. So, based on what we know and the reaction written, should we carry out this reaction at high temperature or low temperature and then looking at it further, should we carry out the reaction at high pressure or low pressure? Well, here's what we know. There's a half a mole of gas here and three halves mole gas here and therefore there's two moles of gas on this side. There's one mole of gas on this side so there's more moles of gas in the reactants than the products. It's exothermic, it's dumping heat into the environment but it's becoming more ordered because we're producing fewer moles of gas than we start out with. That should tell us what to do. So, here's what I said. We've got more moles of gas for the reactants than products so delta S is negative. Delta H is also negative and therefore minus T delta S is positive because delta S is negative and T is always positive. Therefore, I don't want the T delta S to be too big I in fact want to make the reaction spontaneous by keeping T small enough. If I heated up too much, what I do is I break the ammonia back apart into the starting materials in fact. So thermodynamically we should use low temperature rather than high temperature and with respect to pressure, we'll come back to this in a little bit, there are more moles of gas for the reactants than for the products and so if we apply pressure to this, we'll literally squeeze the reactants into the products because the system will try to contract as we squeeze on it, it'll get smaller. It's not going to try to get bigger when we squeeze on it. It'll try to get smaller and by squeezing on it we can try to force the formation of ammonia and therefore what we would predict just from this analysis is that we should use low temperature and high pressure in order to get the best yield of ammonia. Make sure that the reaction is spontaneous and we're going to have more products than reactants at equilibrium. Now in fact, ammonia is synthesized by the Haber process, I'll show you what that is in a second and in practice, high temperatures are used, really hot. 450 Celsius is hot, very hot and people are not in the habit of wanting to heat stuff up for fun because it requires a ton of money to heat stuff up. It requires even more money it turns out to cool stuff down. If you talk to a chemical engineer and you say, I've got a process and it involves heating stuff up like crazy and then we get the product, they won't be that pleased, they'll want to know how much energy you're going to be paying for and how you're going to produce the heat but they won't say no, no, no, that's a non-starter. But if you say, well, I've got to cool the stuff down, very, very cold, that's also extremely expensive to do because now I've got to pump the heat out of everything to keep it cold and they're much less comfortable with that for most industrial processes. So most industrial processes try to heat stuff up, it's just simpler than to have a giant refrigerator and all the maintenance and everything else to cool stuff down. The question is why on earth do they in fact heat the stuff up? It costs a ton of money and it should give a low yield. And the answer is they aren't in the business of getting the best yield, they're in the business of getting something done before they go out of business and that means they have to get the reaction to run quickly enough. They don't want to be in the position of waiting for somebody like me to die. I'm unstable but you have to wait too long. And so if you're trying to make money on me dying and I live a long time because I'm kinetically stable, you don't make much money and if you're trying to make ammonia and you put it at low temperature and the nitrogen and hydrogen just sit there and stare at you for hours and hours and hours and you say come on, come on, give me the product. I know eventually you have to give me the product, eventually it's too long. So to get the reaction to run at a reasonable rate, we're forced to heat it up. And this is why a catalyst would be extremely important for this reaction. In fact, a lot of research has been put into all kinds of catalysts for this kind of reaction. There are some really, really good ones. The problem is we run this reaction at such a huge scale, hundreds of millions of tons of ammonia that we cannot afford to use a catalyst that uses something like platinum because it's just too expensive to have enough catalyst to be able to run the reaction. So we have to use something that's abundant and what they typically use is specially treated iron to get the material to form. But if we could find something cheap that allowed, let's say, this reaction to run at 200 Celsius or 100 Celsius, we'd win all the way around. We'd get much more ammonia, yield and it would cost much less money because we wouldn't have to heat everything up to such an enormous temperature. Why are we worried about ammonia? And the reason we're worried about ammonia is that we like to eat and if we stop producing ammonia, then we will surely starve. Here's the way it's done. This is kind of a schematic. No particular plant, but just generic. I have to get the hydrogen first and the way I get the hydrogen is pretty much hammer and tongs. I bring in methane and water and I heat it up like crazy and I get carbon monoxide and H2. This is what the English used to use for natural gas. In fact, that's what they call water gas. It had a lot of problems because carbon monoxide is poisonous. So if your gas flame went off, you actually flooded the kitchen with carbon monoxide and that was the way a lot of people committed suicide. You read accounts now where Sylvia Plath stuck her head in the oven and Americans tend to think you stuck your head in the oven and fried your head or blew yourself up or something. But you didn't have to do anything like that. You stuck your head in the oven in a closed space and the carbon monoxide killed you. And so it was nothing so violent as that. And then we let in air which has the oxygen and nitrogen. And down we go here with nitrogen, hydrogen, and CO. And then we heat it up to 500 Celsius and we get CO2. The CO2 goes off eventually and we end up finally over here with nitrogen and hydrogen which we then heat like crazy and then compress like crazy to 4,300 PSI, 300 bar. And then we produce ammonia and then the way we get it to run is we then cool it and the ammonia condenses out eventually as a liquid which we take away and then we recycle the hydrogen and nitrogen that didn't react and round and round and round we go. And we have to keep putting in a lot of energy because we have to keep compressing it and then we have to heat it and then we have to cool it and then we drain off the ammonia. But in the end we get what we want. We produce ammonia at a reasonable rate. And all this ammonia then gets put into usually artificial fertilizers. Sometimes they just simply use ammonia. In the Midwest you can find places where they have, they take V-shaped divots in the ground that a plow creates and they have a jet and they just stick in ammonia and you don't want to be anywhere around there when they're doing that because the ammonia is very, very powerful smell and you won't like it. Why do we have to do this? Well, here's the reason. One out of two of the nitrogen atoms in your body and my body came from this. One out of two was done by chemists. If you rely on organic farming, you're either going to be half as big or they're going to be half as many people. Okay, let's go back to standard free energy. The standard free energy of formation is just like the standard enthalpy of formation. It's whatever the value of delta G is when we make a compound from the elements in their standard states at one atmosphere or sometimes updated to one bar but we'll just assume one atmosphere, their close pressure and the quoted temperature. And the quoted temperature is usually, quote, room temperature 25 degrees Celsius, which is a bit warm actually for room temperature but that's the standard. And we reserve the special symbol delta G with a subscript F to mean formation and with a superscript zero to mean the standard state. And just like Hess's law, we can figure out the standard change in free energy for any reaction if we have the standard free energy of formation of the products and we have the standard free energy of formation of all the reactants, then we just take products minus reactants and we get a number and if that number is negative then that means that standard conditions, it's favorable for the reaction to go to the right. For an ideal gas, the standard state is one atmosphere, pressure and the quoted temperature, which is usually 298.15 Kelvin. If we have an ion in solution, our standard state is going to be one molar concentration and in more advanced courses you have to make corrections for non-ideal behavior but in freshman chemistry, we ignore all those. We wait until you decide to major in chemistry and then we say, oh, it's way, way more complicated than it was in the first year, but by then it's too late so you've already taken organic. For an ideal gas, we know the molar volume, that's V over N is RT over P. In the standard state then at the standard pressure, the molar volume is just RT over P standard and then if we know delta G standard, we can figure out delta G at some other pressure. The reason I want to do this is to eventually show you why it is that when we apply pressure to the ammonia synthesis, we're going to get much higher yield. We probably won't get to that today but I want to lay the groundwork. So remember the definition of G, G is H minus TS, H and S are state functions, T is obviously dependent on the state and nothing else so G is a state function and if we do it per mole, I tend to like to put a little subscript M which means G per mole of material. Same thing for H per mole and S per mole. If I want to make a small change in free energy, I can do it by just putting the magic little D in front of things and taking the derivative. As I think I've said before, if you don't like using just DG, you can say DG DX, it doesn't matter. The X will go away at the end. So a small change in the molar free energy is equal to a small change in H molar minus TS molar. Small change in H molar is just DH molar. Small change in a product bring out the minus sign is TDS molar plus S molar DT molar. That's just the rule for taking the derivative of a product of two things and now I can look at this and I can say wait a minute, I know what H was. We invented H because we didn't like the internal energy. We said we want to know the heat at constant pressure, not the heat at constant volume because we don't do chemical reactions at constant volume and so for H, I'm going to substitute in U plus PV molar and this part here I'm just going to keep the same. Now I've got this thing and then I can take the derivative of that, that's DU plus PDV plus VDP minus TDS minus SDT and it looks like this is getting more and more complicated. So I said here this looks like a mess but the mess fortunately is going to get simpler because we're going to use the first law and second law of thermodynamics. The first law says that basically heat plus work is the internal energy so for a small change in U, DU is DQ molar plus DW molar, that's always true and it's also true if I do it reversibly because reversibly is just a special case of the other and if I do it reversibly the reason I like that is when I do it reversibly I can say aha the reversible heat upon the temperature is the change in entropy or DQ reversible molar is equal to TDS molar and then finally if we don't allow any kind of work except pressure volume work, in other words we're running the reaction and we are definitely not doing any kind of electric chemistry or something else where we're taking off a current. The only kind of work we're allowing is pressure volume expansion then the reversible work remember is when the external pressure is equal to the internal pressure which is just P and there's a minus sign because as the gas expands its internal energy goes down so the work is negative. If we then insert those guys PDV and TDS up here into DU we then get the following which is this big long thing there's the DU and then there was the PDV and VDP and TDS and SDT and what I now notice is that I can get rid of this TDS with that TDS because they're the same and I see the two PDVs and so I go aha I'll get rid of that one and I'll get rid of this one. Now they're gone well now it's starting to look like something that means now for a small change in free energy it's equal to the molar volume times the small change in pressure minus the molar entropy times the small change in temperature and now if I'm willing to fix the temperature let's say at the standard then DT is zero because I fixed the temperature so T is a constant there is no change in T and we finally get this simple formula that the change the small change in molar free energy is equal to the molar volume times DP and for an ideal gas we know the molar volume because we know the ideal gas equation so now we have a little equation here DG is RT upon P times DP and that's nice because that's a separated equation and so this formula lets us figure a finite change in pressure from P standard to some other pressure P and let's us figure out how G is going to change so let's do that you don't have to know how the integrals work but the integral of DX is just X and when you have an upper limit and a lower limit you just subtract the two so the integral of DG from G standard to some other value G is just G top minus G bottom on the integral and the integral of this side RT upon P, T is fixed, R is fixed, those are constants that come out, the integral of DP over P is the natural log and I take the natural log at the top minus the bottom and I usually write that as one fraction by knowing how logs work when you subtract logs you can do it as one term by dividing and so I end up with this equation here G at some other pressure minus G at the standard pressure is equal to RT times the natural log of P at the other pressure divided by P at the standard pressure and usually then I write this so that everything I want is on the right hand side I write the molar Gibbs function at some other pressure is equal to the molar Gibbs function at the standard pressure plus RT log P over P standard and if I've got a bunch of gases in a mixture this equation applies to each gas so suppose we have some reaction like this we'll get back to ammonia in a second but let's just say I've got A moles of compound A which is a gas plus B moles of compound big B which is a gas gives C moles of compound big C plus D moles of compound big D unless suppose these are all gases A, B, C and D the little ones are numbers and the other ones are going to be molecular formulas for some things or they could be elements like xenon if that's a gas in the reaction then we just for each one of them we just use this formula so we get this big mess and we say G we would know what the Gibbs function is at the standard state and now we have to use the partial pressure of A because only the partial pressure of A changes the molar Gibbs function of A. It doesn't care about the other ones because they are not A and the partial pressure of B changes the molar Gibbs function of B and so forth for C and D. They're all separate. They have nothing to do with each other. You treat them all separately. They're all minding their own business. My bank account depends on how much I got in checking, how much I got in savings but not on somebody else's bank account who's not me. Kind of the way to think about it. Okay, if we want to figure out the change in G we're going to take G of the products multiplied by the numbers because we always do that, subtract G of the reactants multiplied by the numbers and that should tell us what we need and since we have a formula for G of the reactants and the products we can smush all this together and get what we want and we get the following. We first write down what we mean C times the molar Gibbs function of C plus D times the molar Gibbs function of D. I apologize for using little D here as a number when slightly earlier in this lecture I used it to mean the derivative. And then A here and then B subtract the sum of those. And I know that these things break apart into two terms each and I'm going to write them separately. C times the standard for C plus D times the standard for D minus A times the standard for A plus B times the standard molar Gibbs function for B and then I have these other four terms plus C times RT log PC over P standard, DRT log PD over P standard minus the sum of the reactants A and B, same thing. And this is just then an exercise in bookkeeping. We want to simplify what this means. The first line is what we're just going to call delta G standard for the reaction and the second line we're going to see how to simplify that so first we agree what delta G standard means for the reaction it means the difference in the standard Gibbs functions multiplied by the stoichiometric coefficients that's what it means and for the other part we like to make it a little bit simpler and the way we do that is we just follow our usual trick for logs in this case we leave the RT. We could put CRT up here if we wanted but we leave the RT. That's common to all the reactants and products and instead we put the C up here in the exponent as up here because the natural log of something to a power is the power times the natural log of the something. That's how the natural log works. And if I want to use Dalton's law of partial pressures I can say G, the partial pressure of C in this equation is equal to the mole fraction of C times the total pressure and I have to divide by the standard pressure and notice that we can't have any units here so whatever the units of the standard pressure are if it's one atmosphere then all the pressures have to be in atmospheres because I cannot take the log of something with units and I switched to XC because I was getting carpal tunnel syndrome from switching back and forth in this clunky program from symbol to non-symbol fonts and so while I should use the nice chi for the mole fraction if I were doing that I'd be dead. I'd have my arm in a sling and so I've just decided to use X for the mole fraction, close enough. All right now let's condense then all those four terms with RT log P into this form and if we put it all together we get this thing, we get delta G for the reaction is delta G standard plus RT natural log and then we have the ratio of the partial pressures of the products raised to their powers divided by the ratio of the partial pressures of the reactants raised to their powers. That chemistry work this way actually took people a very, very long time to work out why it was equilibrium behaved like it did. It now seems pretty obvious to us but it was actually a total mystery for a long time until this kind of law was discovered. Now we usually write this like this since we have a ratio or a quotient we write it as capital Q and we call that the reaction quotient and all it is is the ratio of the products raised to various powers divided by the ratio of the reactants raised to the various powers and that lets us then finally get a very nice formula which is very, very, very important. That's delta G for reaction at some other condition is equal to delta G standard plus RT log Q and this is just what I said, the definition of the reaction quotient. These things here for gases are going to turn out to be basically measures of concentration. Pressures of gases tell you what the concentration of the gas is but pressures of gases are very easy to measure because I just have a pressure gauge and so I usually like to express concentrations of gases in terms of pressures and not in terms of moles per liter for gas I don't like that so much because the gas gets everywhere and it can be a little bit hard to figure out what the volume is and I don't want to try to weigh the gas because it doesn't weigh that much but I can measure its pressure easily with a pressure gauge. If we have solutions though then instead of measuring the concentration of the solution by pressure which would make any sense we just use a standard concentration one molar as the standard and then we measure all the concentrations in molar or molarity moles per liter and that we can do for solution and Q itself doesn't have any units all the units in Q are divided out by whatever the standard state is and I have to know what the standard state is to know what the numbers mean. So as I said for gases often we'll express the concentration as pressure partial pressure. We can also use molarity if we like and freshman chemistry books seem to have a B and they're bonded about converting back and forth between Kp and Kc. I don't think it's that important. At equilibrium whenever the thing settles down and it's made all the reactants it's going to make or all the products is going to make excuse me and used up all the reactants it's going to use up the reason why the reaction stops is because the Gibbs function for the reactants and products is the same. The way to imagine a chemical reaction is to imagine having a bunch of buckets with hoses and you pour in water somewhere and if this one's lower then most of the water falls out of this tank and fills up this one if they're connected by a hose. If they aren't connected by a hose if there's no pathway then it's going to take a long time. If it's a pinhole but if we have a catalyst and there's a great big hose and we pour stuff in and one's higher than the other all the reactants are going to run downhill delta G's negative and make products but sometimes the bottom of the reactants is not higher than the top of the products and in that case I'm going to have a little bit of stuff like the ketchup left behind in this tank it's not all going to go most of it will and in fact for any reaction in one phase in theory not all of it can go although in practice sometimes the concentration we predict is so small that it might as well be zero but this is just a very important point at constant temperature and pressure things run down hill in any way they can until the Gibbs function is equalized. The Gibbs function is like the water level for chemical reactions it's what tells you how it's going to work and that's why we want to figure out what it is so we can predict whether we're going to get a lot of products or a little products and or whatever we're trying to do. Okay usually we want to get the yield we want to know well we always want to know what yield of products we can get and how much of the reactants will be left because if there are too much reactants left over that's a purification headache sometimes I could be making a very useful medicine out of poison it often happens that that's exactly what you're doing if the yield of the reaction is extremely high I don't have to worry too much about the reactants that are left over that are coating the tablets and stuff but if the yield is not so great and I have one percent of the original scorpion toxin left over it's a big headache now I have to do something to purify it whenever I have to purify things it costs money a lot of it sometimes depending how pure I need to get it so I'd like to try to run reactions that are so-called quantitative that give essentially a hundred percent yield oftentimes we can't do that the equilibrium value of Q is so important that we give it a special symbol called the equilibrium constant Q itself just depends on whatever the concentrations are but Q at equilibrium says okay take the concentration of C at equilibrium concentration of D at equilibrium divided by the concentration of A, concentration of B when all the smoke is cleared that's some number and that number we call KC if we express it in molar for concentration in molarity and for gases to keep them separate we express it in terms of partial pressures and then the constant is K with a sub P for pressure and for us it doesn't really matter we just have to keep them straight but they're both equilibrium constants that's the most important thing they're equilibrium constants that means that they don't change there are constant once we know the constant we know how much we're going to get and here's the formula then for KP if everything's a gas we just use the partial pressures and we remove the units by dividing by the standard state let's say one atmosphere and three lines just means I'm telling you it's not just equal it's I'm telling you what it is it's defining what it is okay so this is defining what the symbol KP means here's the important point if we know the standard free energy which we can get by just leafing through tables or looking them up online then we also know the equilibrium constant because at equilibrium delta G is zero and so instead of delta G here for the reaction at equilibrium there is no change in G that's why it's all settled down so delta G is zero they've settled and that means I can substitute in zero and at equilibrium Q is K and I won't put a subscript on it so it can be either one but delta G itself is zero delta G standard is not zero because delta G standard refers to the temperature quoted in the table and everything in their standard state like one molar well at equilibrium it's not going to be one molar we hope it's all going to be products for example since this is zero we know this this is RT Lin K that means if we look up delta G standard we know K because we have a formula for it we certainly know what R and T are and that's really the most important thing about looking at free energy is when we look at free energy we can predict if we're going to get more products than reactants and we can predict exactly how much more which is important this is a very very very I should have put four very important formula delta G standard is equal to minus RT natural log K because now all the tables that were putting me to sleep when I was a student I just couldn't see the point of all these tables tables and tables of tables of delta H of formation delta G of formation this and that what was the point of it suddenly they become very interesting because now all I have to do it's it's duck soup I just look up the delta G of formation of every single thing in the reaction then I subtract the products times their stoichiometric coefficients minus the reactants times their stoichiometric coefficients and now I know delta G standard for that reaction magic I know how much yield of products I'm going to get without doing anything else and that's for any reaction I write down I know what the theoretical yield can be usually I'm going to get less than that because why my reactants aren't 100% pure I can't wait long enough for equilibrium blah blah blah but I know what I can possibly get and if what I can possibly get is not good enough then as is usual I have to do something else usually what we want is a high yield like about 100% of something that's much more valuable than what I start with I'd like to be able to take a barrel of oil and turn it all into gasoline because gasoline is worth a lot more than the barrel of oil but I can't get 100% yield of gasoline because of the way the reactions work and so I have to use the leftover to pave the roads and do other stuff and you can be assured that every part of every barrel of oil is used up the sad thing is that most of it is eventually just burned and in fact we need all the fossil fuels not to burn them up but we need them to be able to make things like drugs like fertilizer like plastics like all the fine chemical industry we need to have them around because all those materials come from these things so if we just take every single barrel that we can pump out and burn it that's good for energy but then the CO2 is far less useful than the actual oil was in the first place when it comes to synthesizing other chemicals because Delta G for CO2 going back to what we want to get is positive and that means to get it to go back we've got to put energy in and where do we get the energy from we just burned everything up that could be a big problem in the future okay let's do one more problem we probably won't have time to do the whole thing but let's start let's go back to our our Haber synthesis of ammonia and now I've looked up the free energy of formation of ammonia because the table was interesting I started leafing through it avidly and it's minus 16.6 kilojoules per mole what's the equilibrium constant in terms of partial pressures Kp at 298 Kelvin at 598.15 Kelvin and at 798.15 Kelvin well we'll just do the first temperature today we'll do the other two starting on Thursday well first of all if I see a state function if I see Delta something I write the reaction whenever I see Delta H Delta G anything I say what's the reaction before I do anything and the reaction is to make one mole of ammonia which means I need these fractional coefficients again and the quoted free energy refers to exactly this reaction because this happens to be the free energy of formation because I'm using nitrogen and hydrogen and therefore at 298 Kelvin I can take Delta G is minus RT log K and I can say K is minus Delta G over RT log K and then I can take the exponential function of both sides log K goes away the exponential gives me this I get rid of the kilojoules by writing 16600 joules I put an R in joules not point oh eight two I put in the temperature and I get e to some positive number and at 298 the equilibrium constant is 730 that means this is a winner I get gangbusters of ammonia and only a few percent of the reactants left over now and we'll see what happens at higher temperature next time