The previous two lectures have been relatively difficult, filled with quite a bit of mathematics. As we've worked our way through the process of relating the free energy to equilibrium, relating the entropy of the gas to the pressure of that gas. And using these together to determine an equation which relates the vapor pressure of a gas to the temperature of that grass just via thermodynamics. We're going to have some more mathematics in this lecture. But in the end, the payoff is going to be quite significant. Because we're going to be able to use thermodynamics to make a prediction of the conditions under which a reaction comes to equilibrium. Remember, here's our background. The second law of thermodynamics tells us at equilibrium that the entropy of the universe changes are 0. And from that we've actually related this expression to say that delta g is equal to 0 and delta g itself is delta h minus t delta s. So this tells us what the location of equilibrium will be. We now want to apply this to a particular gas phase reaction. This is a very generic gas phase reaction here. Essentially a moles of gas phase reactant a, plus little b moles of gas phase reactant b, produce c moles of gas phase reactant c and d moles of gas phase reactant d. In order to apply our delta g criterion to this particular reaction, we need to remember this expression, that the entropy of each gas. As a function of the pressure of that gas can be written as the entropy of that gas at cont, at pressure one atmosphere, minus R times the logarithm of P. Let's try to calculate delta S for the reaction that we've written here. Delta S then needs to be. C times the entropy of gas c at pressure P c, plus d times the entropy of gas d under pressure P d, minus a times the entropy of gas a, at pressure P a. Minus B times the entropy of gas B at pressure P B. Now we're going to use the expression here on the screen, this one, to substitute in for each of these values. So delta S will now be equal to C multiplied by. The entropy of gas c under standard conditions minus r times the logarithm of the pressure of gas c and then that whole thing multiplied by the stoichiometric of coefficient c plus d times the entropy of gas d under standard conditions minus d. Times R, times the logarithm of pressure D, minus A, times the, oops, minus A, times the entropy of gas A, under standard conditions, minus A times the logarithm of the pressure A, should be actually plus now of course. Minus B times the entropy of gas B under standard conditions plus B times R times the logarithm of PB. Wow. That's a lot of terms. Notice four of these terms simply relate the entropy change under standard conditions. I can aggregate these terms, the ones that I checked. Into, delta S under standard conditions. The remaining terms can all sort of aggregate together as well. I have minus R multiplied by let's see, C times the logarithm of PC plus D times the logarithm of PD. Minus A times the logarithm of p a, minus b times the logarithm of p b. Well now lets use the properties of logarithms. C times the logarithm of the pressure of c is now logarithm of pressure of c to the c. Let's rewrite that. We have delta zero minus R multiply by the logarithm of pressure of C raised to the C power, plus the logarithm of the pressure of D raised to the D power, minus the logarithm of the pressure of P A raised to the A power, minus the logarithm of the pressure of B raised to the B power. Well, we're one step away now. Delta s is delta s zero, minus r times, if I bring all of these logarithm terms together. Remember, the sums of logarithms are the products, or the logarithm of a product, and the difference of logarithms, or the logarithms of a ratio of the, of the arguments. So I can now write this overall as the logarithm of pc raised to the c times pd raised to the d, divided by pa raised to the a times pb raised to the b. That's the general expression, which I will now capture over here on the screen. And it's exactly what I've written here. Notice that we have each of the pressures of the gasses in the overall reaction, you're right, here's our overall reaction. Each gasses pressure has been raised to its own stoichiometric coefficient. Its kind of familiar, that's looking a bit like the equilibrium constant. So we may be on the right track here, because we may be in fact deriving an equation, which will relate the equilibrium pressures of the gases to the equilibrium constant to the Gibbs free energy. To do that, the next step in our process is to use this value of delta S, and plug it into our expression the delta G is equal to delta H. Minus t delta s. So we'll do that here. The only change that I've made along the way. And, and insertive, inserting delta s from the expression that we've derived, is to replace delta h with delta h 0. What that says is that the change in the enthalpy in this reaction is really independent. Of what the pressures are so I can calculate that enthalpy change under standard pressures and that would be the same as the pressures otherwise. So here we have this rather massive expression, but notice an interesting fact here. These first two terms look really familiar. Those are delta G0. So I can now replace those two terms with delta G0, and now I have this aggregation of terms back here at the back, that sure is starting to look like the equilibrium constant expression. Our next step in this process now is to define that last set of terms there, to be equal to what we like to call the reaction quotient, Q. So Q is something that we talked about back when we did equilibrium expressions, as being the reaction quotient. And we can replace that into the previous expression, we have this very general result here, that delta G is equal to delta G0 plus RT times the logarithm of Q. That allows us to now to figure out what the delta g is for this general chemical reaction here by simply taking the pressures that we are given, raising each of them to their own stoichiometric coefficient and pluging it into the previous expression. But the most exciting aspect of that particular equation has to do with what happens at equilibrium, because if I have delta G as equal to delta G0 plus RT of the logarithm of Q, then at equilibrium. I know that delta G0, I'm sorry, delta G is equal to 0 and that must be equal to delta G0, oop, delta G0, plus RT times the logarithm of looking at this expression now for Q and paying close attention to it there. That looks exactly like the equilibrium constant provided that all of those precious are taken at equilibrium. So I am now going to replace Q with KP. This expression can now be written as this final rather triumphant equation here, that relates. The change in the Gibbs free energy under standard conditions, a thermodynamic calculation, to Kp, an equilibrium expression, describing, in fact, the equilibrium pressures as determined, previously, experimentally. Remember earlier, we simply wrote down that Kp was an equilibrium based upon experimental observations. And we justified it on the basis of equal forward and reverse reaction rates. But now we have related to thermodynamic considerations because this equation is based upon our observation that delta G is equal to 0. In other words, it's a thermodynamic argument as to why we get the particular equilibrium constant. This, I think actually, is perhaps the most beautiful equation in all of chemistry, because it relates equilibrium to thermodynamic properties that say, that are consistent with and derive from the second law of thermodynamics. It's rather unexpected result. But it derives out of our observations of when we expect to see a balance in the changes in the entropy of the system with changes in the entropy of the surroundings. We can actually use this equation for a particularly valuable outcome. So we have delta G0, which is delta H0 minus T delta S0, is equal to minus RT times the logarithm of the equilibrium constant. Let's divide this equation by minus RT. Then I have delta H0 over RT negative sign, plus delta S0 over R, is equal to the logarithm of Kp. This is actually an expression which relates the temperature dependence. Of the equilibrium constant expression, two, the changes in the enthalpy of the reaction and the changes in the entropy of the reaction. Lets do this for example, by focusing on two different temperatures. Lets consider temperature T2, with equilibrium constant KP at temperature T2. And let's repeat this for temperature, T1. Then the same equation applies. And we have the logarithm of Kp at temperature T1 on the right side of the equation. This is just what we did with the vapor pressure expression in the previous lecture. Let's take the difference between these two equations. Then we have delta H0, over R, times 1 over T2, minus 1 over T1, notice that the S0 over R terms go away, is equal, to the logarithm of the equilibrium constant at temperature T2. Minus the logarithm of the equilibrium constant at temperature T1. We can rewrite that in a form that is referred to as the Van't Hoff Equation, by simply combining the two equilibrium constant expressions together, and we wind up with the expression that you see on the screen here. This actually allows us to determine how the equilibrium constant will vary as we vary the temperature. Notice that the variation is going to depend upon what the sign of the enthalpy change is for the reaction. That's actually something we've seen before and Le Chatelier's principal. That we saw different changes in the equilibrium constant, dependent upon what the value of delta H0 was, in fact we've visited this equation at the time, and promised ourselves we would derive it from thermodynamic considerations. What this now allows us to do is say for example, lets consider the case where delta H0 is greater than 0. We'll consider that particular set of circumstances. Let's also assume that we've increased the temperature from T1 to T2 and asked what happens to the equilibrium constant. Well, let's see. If T2 is greater than T1, then this whole term expression is negative. Delta H0 is positive but then multiplied by minus 1, the right side of the equation is greater than 0. And if that's the case, then the left side of the equation is greater than 0. Which means since it's the logarithm that K at T2 must be greater. Then K at T1. That means that the equilibrium constant increases where I increase the temperature. That's only true provided that we're dealing with an endothermic reaction. Remember Le Chatelier's principle says if I increase the temperature, the system should shift the equilibrium in the direction that absorbs some of the energy. In other words, in the endothermic direction. And that shift occurs because of an increase in the equilibrium constant expression. The Van't Hoff Equation on your screen here is the manifestation then, or a representation, or a justification of the Le Chatelier's principle for changing the temperature of a reaction. Remember, all of this has been derived from the second law of thermodynamics. The second law of thermodynamics was essentially. That which happens is that which is most probable, that we see increases in entropy because entropy is related to the number of microstates corresponding to a macrostate. At equilibrium, the entropy of the universe stops increasing, and under the circumstances, we've found that delta g was equal to 0. And that led us directly to the equation that you see on the screen ahead of us. In other words, thermodynamics is enormously powerful in making predictions of experimental observations particularly, not just when it comes to making predictions of spontaneity, but even more importantly, when it comes to making predictions about equilibrium.