 So, we've seen that the Van der Waals equation of state, this expression here that tells us how to calculate the pressure of a Van der Waals gas if what we know is the molar volume and the temperature is useful, but very often we don't know the volume and the temperature. Instead, the properties that are most easily controlled in a lab are certainly the temperature that we can control the temperature of a gas, but it's easier to directly control the pressure we apply to a gas than to directly choose the volume that we have the gas occupy. So, very often what we know is the pressure and the temperature and we'd like to know the molar volume. So, we want to be able to rearrange this expression to solve for V as a function of P and T. So, let's tackle that. So, if I want to isolate the V's, the V bars in this equation, let's first get rid of the fractions. So, if I multiply through all the way through by a V bar minus B and also via V bar squared, that'll get rid of the two denominators. So, on the left I've already multiplied by V bar minus B and by V bar squared. On the right, when I multiply by V bar minus B, that gets rid of the denominator and I have to additionally multiply by V bar squared. In the second term, the V bar squared kills the dominator and I've got a V bar minus B that is introduced. So, I want to simplify this expression. Let me go ahead and do that somewhat slowly so I don't make any algebra mistakes. I've got a P V bar V bar squared. So, that altogether that's a P V bar cubed. I've also got a P minus B V bar squared. That's all equal to RT V bar squared minus AV bar from these two terms and then minus a minus or a plus A times B. So, if I collect all those on one side, P V bar cubed, both of these terms look like V bar squared. So, I can write that as a minus P B and then when I bring the RT over to the other side, it becomes a minus RT. Those both multiply V bar squared. AV bar on the other side becomes positive AV V bar and the AB becomes a negative AB. So, now I've gotten all the terms involving a V bar over on the left hand side and I noticed that what I have is a cubic equation. A V cubed term, V squared, linear term and a constant term. So, that's kind of bad news. It's possible to rearrange and solve a cubic equation analytically but it's not much fun. So, one thing, so what we're interested in doing, we'd like to know if I give the pressure and the temperature enough I know the A and B constants for a particular gas, we want to be able to solve for the V bar. So, we want to solve this polynomial for V bar. One thing we know about polynomials, cubic polynomials is that they have three solutions, right? So, if I solve this equation for V bar, I expect to get three solutions. Maybe I'll get three real solutions or maybe I'll get one real solution and two imaginary solutions depending on how the constants work out in this expression. So, that sounds a little bit confusing but it is in fact the case. So, we can look at a graph to see how that works. So, what I'll show in this graph over here is a graph of how the pressure of a gas depends on its volume. So, let's go ahead and bring up that graph. So, here's a graph that won't surprise you very much. The pressure of a gas decreases as I increase its volume. In fact, for an ideal gas that equation looks like PV bar is RT. So, pressure is inversely proportional to volume and that's pretty much what this graph looks like. I've actually plotted this graph for a Van der Waals gas but at low enough, I'm sorry, at high enough temperatures, it behaves an awful lot like an ideal gas. If I plot that curve for not this temperature but some higher temperatures as well, so let's bring in some additional lines. So, each of these lines is for a different temperature. So, here's a moderate temperature and here's a relatively high temperature. Each of these curves is called an isotherm because at every point along one of these lines, we're at the same temperature. So, I've got an isotherm at a relatively moderate temperature, isotherms at higher temperatures. I can do the same thing for lower temperatures. So, let's bring in a few more curves here at lower temperatures and now we begin to see that the curves for the Van der Waals gas are not behaving like we'd expect for the ideal gas. So, we can see at lower temperatures, instead of behaving just like 1 over R, the curves begin to have some variation in them, not just 1 over R but with some additional variation that looks like these terms. So, these curves are behaving more like we'd expect to see from a cubic equation. Let me stop and point out if what we're doing when we try to solve this expression. If we know V bar and T and we want to calculate the pressure, that corresponds to doing something like this. If we know V bar and I know which of these curves, let's say this isotherm is the one I'm interested in, I just read up from this pressure, this volume until I get to that particular isotherm and then read across in this direction and that tells me P as a function of V bar and T. On the other hand, if I pose the question the other way around, if I'm given the pressure and I want to solve for V bar, we just do that process in reverse. We just read across from the pressure until we get to this isotherm and read down and this tells us the molar volume that's consistent with that temperature and this pressure. Either way, we can do that process relatively simple. Simply, there's only one answer, V bar gives me one pressure, pressure gives me one V bar. But, if we go to progressively lower temperatures, so now let's bring in a few more curves, we see that the cubic equation begins to have that characteristic loopy structure that we expect from a cubic equation and now things do get more complicated. I can get three different solutions to this problem. If I use one of these colder isotherms, let's continue with this pressure. If I'm interested in, let's say, in this particular isotherm, if I read from that volume up to this isotherm and then across, I can, there's only one pressure that's consistent with that temperature and that molar volume. But, if I do the problem the other way around, if I ask, if I know this pressure and I want to read across until I find, until I intersect with one of these isotherms, I intersect with an isotherm here, I intersect with another one here, I intersect with another one here. So, there's three different molar volumes, this one and this one and this one, all of which are consistent with that pressure. So, there's three different molar volumes that are all three different solutions to the question of what molar volume would I get if I have this pressure and this temperature. So, that's what we mean when we say there's three different solutions to this cubic equation. Depending on what our temperature is, maybe there's only one solution and the other two are imaginary and we don't care about them or maybe there's three separate solutions. So, that is certainly interesting, seems a little bit confusing. We'll talk more about what that means to have three different solutions for the pressure or for the molar volume a little bit later in a different lecture. But, for now, we're faced with the problem of how do we in fact solve this cubic equation. Even if there's only one solution, how do I solve a cubic equation? As I mentioned, we can do that analytically with pencil and paper, although that's a little bit difficult. We could also do it computationally. You might use the solver function in Excel or you might use Wolfram Alpha. There's a bunch of different computational tools you can use to do the work for you. So, you can write in this equation and say, please solve it for V bar for me and that works fine. You can also, in fact, solve it graphically like I've been doing here. If you graph this equation and then zoom in to the point where if you're given a pressure, you can find out exactly which volume is consistent with that pressure and that temperature. That's certainly a valid way to solve the problem. Or you can solve the problem numerically yourself, essentially doing what the computational solvers would do for you. So, I'll illustrate an example of how to solve a problem numerically. So, let's stick with our example of solving for the properties of nitrogen. But in this case, I'll say, if I give you a pressure of 50 bar and a temperature of, let me check, but I think we'll do 298 Kelvin this time instead of 273. And if we still know the Van der Waals constants for nitrogen, if that's the problem we have and we want to know what is the molar volume, how do I go about solving this equation for V bar? One way to do that, let's back up to this step. If I rearrange this equation, so if I take this A over V bar squared and I move it over to the left, I can first say pressure plus A over V bar squared is RT over V minus B. If I rearrange that expression, swapping the V bar minus B and the whole left-hand side, I can say V bar minus B is equal to RT over P plus A over V bar squared. Or V bar, if I move the B now over to the right-hand side, is RT over P plus A over V bar squared, all plus a constant B. So, we can think of this as having tried to isolate a V bar, but notice when I isolate a V bar on the left, I've still got some V bars on the right. So, but what this means is if I, let's say I were to guess the right answer to the question. If I am given a pressure, I'm given a temperature that corresponds to one of these isotherms, I know A and I know B. If I were to guess the right answer for V bar and I plug it in here and evaluate this formula, I'll get the same V bar out that I put in. But of course, I don't know the right answer to V bar, I'm unlikely to guess it on the first attempt. But what I do know is a pretty good estimate for the molar volume of this gas. So, if I use the ideal gas law just to come up with a guess for what V bar should be. So, I know R, I know T and OP, I'll skip the math. But if I take the gas constant times 298 Kelvin divided by this pressure, I will get the molar volume of an ideal gas if the gas behaved ideally. So, let's call that our zeroth estimate of the molar volume. If I then stick V naught, that zeroth estimate of the molar volume, if I stick it in this expression, just to see how good a guess it is, calculate RT over P plus A over that volume squared adding in B. Again, if I skip the details of the math, but my next estimate, the first estimate, the first real Van der Waals estimate of the volume is, uses the zeroth estimate, then what I find is, when I crunch the numbers to evaluate that, I get 0.484. So, that's bad news. I didn't guess the right answer. The ideal gas answer wasn't correct. When I plugged 0.495 in here, I got 0.484 out over here. But it's not terrible news because the numbers are not terribly different. And this is, in fact, a better estimate of the molar volume than the ideal gas estimate was. So, the next step I can do is, I can calculate a second estimate of the molar volume. Now that I have an even better estimate for V bar than I did before, I can plug in, instead of plugging in V naught, I can plug in V1 and use that to get a second estimate. And when I do that, do some math, and what I find is, if I start with a guess of 0.484, the new estimate I get is 0.482. So, I'm getting closer and closer. You can probably guess the next step, which is, go ahead and use V2 to evaluate a third one. And when I do that, when I plug a 0.482 in here, I get 0.482 out is the answer. So, finally, I've converged after actually only three different iterations, but I've converged on the right answer. When I plug in V bar equals 0.482, I get V bar equals 0.482 out. So, I know that V bar of 0.482 liters per mole is a solution to this equation. So, that's just an illustration of how, in fact, you can solve this cubic equation without going to the effort of doing it on pencil and paper or without looking up, without having a computer help you solve the problem. So, regardless of whether we want to solve for pressure as a function of V and T, or with a little bit more work, V as a function of pressure and temperature, we can do that using the ideal gas equation of state. So, the next thing we'll tackle is to address the fact that even the Van der Waals model isn't a perfect model for how gases behave. So, we'll consider some other description of how real gases behave beyond just the Van der Waals equation.