 Okay, it's almost the last time that I say, you know, it is the last official lecture. But of course, we'll also have one more lecture on Tuesday, which may or may not be televised. So make sure that you come, you don't want to miss that one. It's going to be the best one so far, okay? Come on, just, you've been the best audience, I have to say, first of all. So I really enjoyed teaching you, but let's keep it up one more time. So today we will talk about divergence theorem, which is the last in the series of results that we've been studying for the last months or so. And finally, today we'll be able to look at all of these results in a kind of a unified way and really appreciate the sort of the strength and beauty of these results, okay? So before I explain divergence theorem, I would like to one more time to summarize and revisit the stuff that we have learned up to now, okay? And I want to do it by way of analogy again. So by the way, some reading material is now available on the class homepage about differential forms and general stock theorem. I will talk about some of it today, but if you want to read about it in more detail, you can find it here. This is something which will not be required on the final exam. This is something that I would like to explain to you so that you can, I think, will give you the opportunity to really appreciate and to see this material the way mathematicians look at it and the way sort of the right way, the best possible conceptual way, okay? Now all the formulas that we have studied so far have the same general form, of the same general shape, okay? We are integrating over some domains, we are integrating over some domains, which I'll call y for now as a kind of a neutral notation which we'll then specialize in various cases. So we integrate over y and this y is embedded into a vector space, into a vector space Rn, where n is one, two, or three. Because in this course we only talk about three-dimensional space, the plane, and the line, okay? But this domain itself has its own intrinsic dimension and that's something which we'll denote by d. So d can also be one, two, or three, but in any case d is going to be less than or equal to n. So now I would like to summarize all the formulas that we have learned as depending on d and n, okay? Something we've done before, but I want to do it one more time because today we'll be able to have sort of a complete list of all of them, okay? So the first case is when d is one and n is one. In this case, the ambient space, the ambient space is just R, which is a real line. And so our domain of integration is going to be an interval on this line, or it's going to be a union of several intervals. But if it is a union of intervals, the integral will be just a sum of the integrals over each of those intervals. So we might as well think that it is a single interval. So let's, let me draw it like this, or maybe let me use a different color for it. Let's say that it's red. And then it has two boundary points, which we'll call as before, as a and b. So the domain y is here, that's the interval. And the boundary of this domain consists of two points. I'll call it b of y as before. So it will just be two points. And actually this boundary will be oriented in a following way. We'll assign, assign plus and sign minus. Sine plus to this one, sine minus to this one. Because the interval is actually oriented as well, given the orientation of this line. And so the end point will have, will come with plus and the initial point will come with coefficient minus one, negative one. And the formula is the familiar formula from one variable calculus, the fundamental theorem of calculus. Where on the left we take f prime of x dx. And we integrate over this interval from a to b. Well, usually we write just from a to b like this, but I would like to say that we are integrating over this interval. So that all the formulas look more similar to each other. And on the right-hand side, we take the difference between the values of f at b and a. So that's the simplest case. That's the simplest possible case. Okay, the next case, which will be just below it. So in this leftmost column, in this leftmost column, I will have the d will be fixed and n will be growing, okay? Yes, I'm looking at you. And n will be growing. So here n is equal to one and here n will be equal to two. Okay, so here we are talking about a curve which is embedded into a plane. So again, a picture which is familiar by now. So this is a curve and this are the endpoints. This will be our y and this will be the boundary b of y. And we'll denote them by a and b. Capitalized because these are not numbers anymore, but points. And also we'll have the signs as before, like this. And the formula takes the following shape. It's the line integral here of nabla f dr over this curve. Let's keep calling, well, usually we call a curve. If it's a curve, we call it c. So let's just call it c as before. And then here will be f of b minus f of a. That's the fundamental theorem for line integrals. It goes here. In fact, I can now make one more square down below in which d would still be one, but n would be three. The ambient space will be the three dimensional space. But actually the formula would look exactly the same. So there is no need. I might just as well put here n equal two or three. I would just have to copy and paste the same picture just down below. And that takes care of the leftmost column, where the domain is one dimensional. One dimensional domain can be in one dimensional space, in two dimensional space, or in three dimensional space. But the formula is for two dimensional and three dimensional spaces are identical, exactly the same. So we just keep the same picture. Okay, now we move to the next column. And here we take d equal two. And if d is equal to two, the minimal value of n is also two. We cannot fit a two dimensional domain into line. The smallest space we can, ambient space we can have is r two, so n is equal to two. So in this case, we are dealing with a two dimensional region on the plane, which has a boundary. Again, a boundary will be, I draw the boundary in yellow and the domain in red. So this is a domain. This is our y, which is something, which we normally call d, the two dimensional region. And we have the boundary of this domain, which is drawn in yellow. Okay. So what happens in this case? In this case, on the left, on the left, we have a double integral over d of a certain expression. And on the right, we have a line integral over vector field, which we write like this, p dx plus q dy. So this is a line integral. This is a line integral over vector field, p i plus q j, right? But I would like to write it like this to emphasize the components, p and q, because I'm going to use them now on the left. So on the left, we have this strange looking at first. Anyway, expression dq dx minus dp dy. And this is a standard double integral over this flat region, a kind of double integral that we studied more than a month ago before the second exam, okay? So clearly there is an analogy between these two, right? Because here's a simplest region on the line, which has the same dimension, which is one with its boundary. Here's a simplest region of the same dimension as the ambient space on the plane, namely two. And here we integrate on the left over that region some expression which involves derivatives of the object on the right-hand side, and here as well. Okay. So next, we look at, we raise the dimension of the ambient space from n equal to two to n equal to three. So now our domain is two-dimensional, but it's embedded in a three-dimensional space, right? So there's a much more variety of such domains or regions, surfaces we call them, right? And so this region is going to look like this. Let me, one example we have studied is upper hemisphere. So let's stick to that example. So we have its boundary will be something like this, and then region domain itself is like this. So this is y, and we'll call it m in this case, it's like a membrane, and this is the boundary. So now on the left, we are integrating over the boundary, on the boundary of this region, which would be in this case a circle, and we are taking the line integral of a vector field. So it will be f dr, and on the left, we have a double integral over the surface itself. And last time, we learned what should go here, well, over the course of the last three lectures, I should say, we learned what should go here, and what should go here is the surface integral of another vector field, which we call curl. This is curl f surface integral, which we did not like this. And this is what we call Stokes' theorem, just like we call that Green's theorem. So again, I've drawn this picture before, and in fact, this picture was three lectures, three or four lectures ago, was the motivation for our search, our quest for Stokes' theorem, because we clearly have an analogy going this way. Here is a one-dimensional curved object in the two-dimensional ambient space. Here is a two-dimensional curved object in the three-dimensional ambient space. There is clearly, likewise, analogy going this way from here to here, but there's also a vertical analogy, because they're all on the right colon, in the right colon, we have two-dimensional objects. In the left colon, we have one-dimensional objects, that we are integrating over. So this already covers four different cases, or actually to be more precise, five different cases, because there should actually be one more corner here, one more box here, where n is equal to three, but I kind of, to simplify the picture, I combine them into one. So five different corners. But the picture is not yet complete, because we have not yet talked about what happens when d is equal to three, and d equals three is also possible, right? So there is one box with d equals three, because if d is equal to three, n has to be three, because n has to be at least d, and we don't allow n to be greater than three, so the only possibility is three. And that's what we're going to talk about today. The analog of those formulas, in the case when d is equal to three, and then actually n is equal to three. So what should this formula look like? What should be the general shape of this formula? Well, let's try to draw a picture. And I would like to, so what I need to do is I need to have a three-dimensional region. I have to have a three-dimensional region, and it will have a two-dimensional boundary. So I will draw it like this. So the region that I will draw will be a box, will be a box like this. So the yellow, yellow should, I should color in yellow, not just the edges of the box, but also all the sides of this box, right? So there are six sides, and should all be covered in yellow. So the boundary, this box, the sides of the box, let's say it's a carton box. So the carton things will be the boundary, and the interior of the box will be the object itself. So the red, the red, it's kind of difficult, it starts, it gets more difficult to draw, because now I also want to kind of say that the interior is red. But since I'm drawing on a two-dimensional board, it looks confusing, right? So I'll kind of do it like this. So the y will be, let's call it b, b for the box. And the yellow will be the boundary. So you see, it's very important to separate what are we talking about? Because sometimes when I say sphere, I know that some of you are thinking about the surface of the sphere, and some of you could be thinking about the interior of the sphere. So you have to separate those things, you see? There is a sphere, and there is an interior of the sphere, also known as a ball. One is two-dimensional, the other one is three-dimensional. Likewise here, the interior of this box is three-dimensional, and that will be our domain. That's why I wrote n equals three. But the boundary of this domain consists of all of these six sides. Each side is two-dimensional square, or maybe a rectangle. And that's the part of the boundary, okay? Note that here is different. Here the domain is the surface of this upper hemisphere. And so the domain itself is already two-dimensional. So its boundary is one-dimensional. That should not be confused with this picture, okay? So this is an important point. So because now I'm in this case, on the left you will see, on the left-hand side of the formula in this column, I have a double integral in both cases. On the left-hand side of this formula, in this column I have a single integral. So on the left-hand side, I integrate over the domain, which was a curve here and a surface here. And now I'm going to integrate over this three-dimensional box or ball. Well, I could take a ball instead of the box. It's just more difficult to draw. And also I thought it would be a little more confusing for you because here's how upper hemisphere. If I draw a ball, it might look too similar. That's why I kind of insisted on drawing it in this shape. So on the left, in other words, we should have a triple integral over D. Of something which should be related to some sort of derivative of the integrand on the right-hand side. But what should we take on the right-hand side? Well, first of all, on the right-hand side, we should definitely integrate over the boundary, which means in this case, actually going to be the sum of six different integrals over each of those six faces, six sides of this box. But what should we integrate? Well, notice one thing in all of these formulas on the right-hand side, we are integrating an arbitrary object of a certain kind. In the left column, it's a function. We're integrating a function. It's kind of silly to call this an integral of a function. But it is, it's an integral over zero-dimensional region consisting of these two points. An integral of a function over a point by definition is just the value of the function at this point. So the only thing that we can sort of play with is the orientation, the sign, plus and minus. But in any case, it's like the integral of a general function. Here, the function is general. On the left, it's not general. It's a derivative of something from the right. Likewise here, we look at the line integral of a general vector field. General vector field. Whereas here we have the derivative. You have a question. So the question is about the boundary of this box. Of this box, right? The boundary consists of six sides of this box. So here is a piece of the boundary. Here's one piece of the boundary. Then there's another piece of the boundary and so on. So let's think of six carton squares or rectangles. That's right. This is two-dimensional, right? This is two-dimensional. So, okay, maybe general comment. If you have a domain whose dimension is D, then the dimension of its boundary is what? What is it? D minus one. That's right. So when you take the boundary, the dimension always drops by one. This is general fact. You can observe it in all of these cases. So here the domain is three-dimensional. It's the interior of the box. And the boundary is two-dimensional. It consists of six sides of the box. But what I was saying earlier is on the right-hand side, you should do the most general integral. Or integral of the most general object that is allowed here, so to speak. So here we're talking about double integral over the boundary. But we should integrate the most general thing. And the most general thing that we'll integrate is a vector field. It's a general vector field, right? So in this new formula, which we are building now, it is clear by analogy with all the previous cases that what we should put is a general vector field and take its surface integral. I denote it by E because I don't want to clash with notation on this corner. But it is an object of the same kind. It's a vector field. So here E is a vector field. So E is going to be P, we'll have three components. Also P, Q, R, say, or let's actually, let's also denote them in a different way. Let's say A, B, C, it's a vector field. We have learned how to integrate a general vector field over a general two-dimensional surface in the three-dimensional space, right? So let's do that. Let's do that here. However, we will not be integrating over a general surface. We'll be integrating over the boundary of something which appears on the left-hand side. So the question now is, what is a derivative? What kind of derivative should we put here? What kind of derivative should we integrate here? Okay? That would be the analog of curl, of that expression, of nublaf, or f prime of X, you see. So that's what we need to find out. And I will, so what I'm going to do is I will give you the answer. I will give you the answer and then I will explain in a more conceptual way how all of these formulas come from one and only formula. There's a single formula, which I kind of partly explained last time. There is a single formula, which by very basic and elementary algorithm gives you each of these six formulas that we have now on the blackboard. So the key to writing this formula is we need to remember an operation on vector fields, which we call divergence. And this is something we learned a couple of weeks ago. So that if you have a vector field, we have notion of divergence over this vector field, which has three components again, A, B, C. And this divergence is defined by this formula, by this strange looking formula. And that's what we should put here. That's just the way, it just happens this way for now. When we take divergence, what is a divergence? E is a vector field, but what is divergence? Divergence is a function. It's not a vector field, right? It's a function. It doesn't have three components like a vector field. It has only one component. It's just this component is the sum of three functions because you have a vector field. So each of its components is a function. A, B, and C, each of them is a function, right? So you take the derivative of A with respect to X. Here's another function. Here's another function. Here's another function. Take the sum. And we know how to integrate functions over three-dimensional regions. We just call it integral. We put dv here. It's a triple integral. It's a standard triple integral. So again, something we learned before the second exam. We know this. We know how to integrate this. See, the difficulty with Stokes formula was to properly formulate Stokes formula. We had to make sense of this expression. So we had to go over the entire definition of surface integrals. We did not know what surface integrals were for general surfaces before we encountered this formula. That's why we spent two or three lectures studying this surface integrals of different kinds and what does it mean, how to compute them, and so on. Now, in a sense, we are in better shape because we actually don't need to learn any more technique. We already know all the necessary formalism. The new, what could be a new kind of integration is actually an old integration because we are integrating just a function over three-dimensional region, okay? So that's the formula. That is the third formula that completes now this picture. And this is called Divergence Theorem, okay? So now you kind of look at this. Now you look at this and admire it for a few seconds. And I don't mean my handwriting, which is not bad. But I mean the actual content. So clearly there is an analogy between all of them, but if you look at it, all of them at the same time, it looks really strange. Why, in one case, you take this weird expression with the dq dx minus dp dy. Why in this case you take this weird expression? And I'm not even talking about the curl, which is like the worst of all of them, right? So you have to ask the question, what does this all mean? And this is what, you become a mathematician when you ask this question. This is how you become a mathematician. When you say, what does this all mean? Is there some reason for all of this? What is it? Can you express this in a, is there one formula which gives you all of them in the special circumstances? And the answer to this is yes. There is in fact one beautiful formula which gives all of this in the special cases. And we are almost, we almost know how to derive it. We almost know all the ingredients necessary to understand it. I have explained most of them. But now I can actually give you full disclosure, okay? And demystify all of these formulas. So here it goes. This is that general principle which I have been promising you from the beginning. The general principle I've been promising you from the beginning looks like this. But up to now I was just saying it in a kind of a figurative way, sort of as a guiding principle, as a rough outline. Because I never explained what kind of object this omega is. What is D omega? What does it mean to integrate over Y or B of Y and so on? Also technically speaking, I should put several integration signs on both sides. The number of integration signs should be the dimension of Y here. And number of integration signs should be the dimension of this one. But I will ignore that issue for now, okay? And so now finally we can say what these objects are, okay? And what these objects are, this omega is what my mathematicians call differential forms. Omega is a differential form. And this D is an operation on differential forms which I explained last time. I explained in several examples on differential forms. And so now what I wanna do is I wanna explain one more time how you get all of these formulas from this single one, a very simple general formula, okay? So the way it works is like this. Let me start in the case where in the left, I will explain it by example. So I will start with the leftmost colon. In the leftmost colon, omega, so D equal one. And so D minus one is zero, right? We are integrating omega over the boundary. So the omega should be an object that we want to integrate over a D minus one, D minus one, D minus one dimensional domain. So in this case, omega is just a function. And in this case, this mysterious operation D is nothing mysterious. It's just a differential which we learned a long time ago. So that's, so what is it? Well, let's do different sub cases. If n is equal to one, it means it's a function in one variable. In this case, the differential is just f prime of x dx. And that's exactly what you put, what you integrate in the left upper corner right there, f prime of x dx, right? Let me show it. This is exactly integral of Df over this interval. And this you can think of as the integral over the boundary of this interval. So this formula works out. It does indeed look like a special case of this general principle, right? So we can check this box. The next case is when n is equal to two or let's do both two and three. In this case, it's going to be Df dx dx. Let's do it for n equal to, just to simplify matters. It's going to be Df dx partial derivative with respect to x dx plus partial derivative with respect to y dy. And so we will be integrating, so here we will be integrating this, here we will be integrating this. But this is exactly, this is exactly the integral of nabla f dot dr, which we have in the formula for D equal one n equal two. Right? Because what is nabla f? Nabla f is a vector field which has components derivative with respect to x, derivative with respect to y and dr is also a vector which has components dx and dy. When I take line integral, I take the dot product, when I take this line integral, I have to take the dot product between this and this, right? What's the dot product between this and this? It's just this expression, which is nothing but the differential of f. So instead of writing this, instead of writing this, we might as well write integral of Df. So again, in this case, we can rewrite this formula in a new way. We can write it as integral of Df is equal to integral of f. Here over this curve, which by the way I should say that, here we have this orientation. And here we take it over the boundary of this. Again, where this integral is understood, it's just the difference of the values. Are you with me on this? Do you see what I mean? That this formula gives you this? Ask me if it's not clear, okay? So next, so that's D equal one. So D equal one, we have now explained how to get from this general principle by making sense of this operation D. Here D is just differential of a function. Okay, so let's now go back to, let's go to the second colon and let's look at this example. D equal two and equal two. So in this case, D minus one is one. The domain has dimension two. The boundary has dimension one. And let's look at the case when n is equal to two first. That's the case of Green's theorem, which is the upper corner over there. In this case, omega is going to be the following expression. PDX plus QDY, which is exactly what's written here. PDX plus QDY. Again, you could think of this as a line integral of the vector field with components P and Q. But actually, when I wrote this down, I already wrote it in a way which we need, PDX plus QDY. So what is D omega in this case? So this is something I already explained in this case and I also explained on Tuesday, I explained how to calculate this. But let's do it one more time to convince ourselves that this will give us that result. So by definition, you apply this in the same way as you apply to functions. Because this is a function and this is DX. So you just apply it to this function and then you multiply by DX. So by definition, D omega is DPDX plus DQDY. Let's write it in more detail. What is DP? That's DPDX DX plus DPDY DY. And then we have DX, you have to remember. Let me open the brackets and multiply them. I have to put DY here, DX here. So that's this term is given by the sum of these two plus I have DQDX DX plus DQDY DY DY. And again, let me open the brackets, multiplying them out. So I get DY. Okay, so that's D omega. But we have to remember the rules and the rules are, the first rule is that if you have the same variable twice, DX DX or DY DY, this is the first rule is that if you have twice DX DX or DY DY, this is just plain zero for an obvious reason, because what this should represent, what this kind of expression should represent is an elementary area. And if you take the area of a parallel gram where both sides go along the X direction, it means the parallel gram has collapsed and its area is zero. So that means that we have to get rid of this and we have to get rid of this, which leaves us with two terms. But there is a second rule. The second rule is DX, let's write it like this. DY DX is equal to negative of DX DY. And I'll explain now in more detail what this means. We already talked about this, but I will explain one more time. If we do that, you see this comes with DX DY. So we get DQ DX times DX DY. But this one comes with DY DX. And DY DX is negative of DX DY. So it's going to be minus DP DY. That's exactly the expression that we get in Green's theorem. So I can rewrite this formula as integral of D omega over D equals integral of omega over B. Well, this is just what's written here because omega by definition is PDX plus Q DY. And I have just explained that D omega is this. So that's why it's the same formula. So I have also fit now this formula in this general principle, in the framework of this general principle. Let me comment now on this rule. Why DY DX is negative DX DY? In fact, the answer is best understood, this is best understood from in the framework of our calculation last time, last time on Tuesday. On Tuesday we talked about this and we saw in a more general context of Stokes theorem and we saw that DX DY was by definition the Jacobian of X, Y over UV DU DD. So DU of X, Y, for more general surfaces, the meaning of DX DY is just that it's you parameterize your surface. So X and Y become functions of some auxiliary parameters, U and V. And then by definition DX DY is just this Jacobian of this change of variables times DU, DV. But Jacobian is something we learned. Jacobian is given by some simple formula involving partial derivative. I'm not going to recall what the formula is. What I need to recall is the fact that if you switch X and Y, just by looking at the formula, you see right away that this is negative of D of Y X over UV, right? Because the Jacobian is given by determinant of a two by two matrix. When you switch X and Y, you switch the columns or the rows depending on how you write it. When you do that, you get a minus sign. That's just the way it is. The Jacobian has this property that if you switch the two variables, you get a minus sign. That's just the way it is, okay? And that's the reason why, since DX DY is this, so DY DX would be the same thing, but with this letter switched, that's why I get that DX DY is negative DY DX. So this might look a little strange. We are much more used to formulas like A B equals B A, rather than A B equals negative of B A. But in a sense, this is just as natural. This kind of formula is just as natural. This is a rule, for example, with which we can find in many instances like multiplication of numbers. We know that if you multiply two numbers, you get, it doesn't matter in which order you multiply them, you get the same answer, right? So that's called, we can say that the product, this product is symmetric or commutative. Here's a slightly more non-trivial example. Suppose that A and B are vectors and we are taking the dot product. Then we've learned, and it's obvious from the formulas, that the dot product in this order is the same as the dot product in this order. So the dot product is symmetric, right? The dot product is symmetric. But we've learned also another operation on vectors, namely the cross product. And the cross product, for cross product, it's not true that A cross B is equal to B cross A. Instead, A cross B is minus B cross A. So if you know what cross product is, it shouldn't come as a surprise that sometimes operations that we do could be anti-symmetrical like this. And in fact, the reason why we get minus sign here, you can trace it all the way back to this anti-symmetricity property of the cross product. Because here we talk about elementary areas, and cross product has to do with such, right? Cross product has to do with areas. The magnitude of the cross product is the area. So it's actually very closely related. This minus sign is very closely related, this minus sign. It is just an illusion that in nature, commutativity or symmetry property like this appears more often than this anti-symmetry property. In fact, physicists learned a long time ago that amongst elementary particles, you have what's called bosons and fermions. And bosons are like, obey the rule like the dot product. They commute. But fermions obey this rule. Fermions, anti-commute, fermionic fields, anti-commute. And fermions are very important. If we see fermions, fermions are all over the place. An electron is a fermion. So don't tell an electron that the way it behaves is unnatural. He'll laugh back at you. Because if it were not like this, the atoms and matter would not be stable. This property is just as important as the commutativity property that we also observe for bosons like photons, for example. In fact, there is a higher type of symmetry which physicists study, which is called a mathematician study, which is called supersymmetry. And supersymmetry has to do with objects which obey both symmetry and anti-symmetry properties like this. So you may have heard about the super collider which just started, you know, went back online like a week ago, which some people think is going to create some antimatter and destroy the world. To which I'm sure some physicists say, I wish, I mean, that would be really cool. But it's not going to happen. But the question is, what can we find? And so one of the things which people hope they'll find is supersymmetry, which is a kind of higher type of symmetry mixing bosons and fermions. So, and this, when you analyze mathematically the equations which physicists would like to have confirmed or disproved, the kind of formulas that you see are precisely formulas like this. This kind of anti-commutativity formulas. So this formulas, what I'm trying to say is that these formulas are built in in the very foundations of nature. So it's very natural. And it really comes up, most naturally, when you study integrals. When you study integrals, the rule is that, the rule is that dx dy is negative of dy dx. And this is the reason why in Green's theorem you actually get this minus sign, dq dx minus dp dy and not the sum, you see. This is the reason, we've traced it back to this anti-commutativity property. Okay, so now this we've done. This confirms to this general principle. What about this, Stokes' theorem? These two, and this I explained last time. So I'm not going to do this calculation one more time, but let me just write it down for d equal two. For d equal two, so we still have d equal two for y and d minus one equal one for the boundary. But now n is equal to three. So we are in the realm of Stokes' theorem. In this case, omega will have an extra coefficient, which will be p dx plus q dy plus r dz. And this integral could be written as the integral of this omega. I didn't write this over b of m, okay? For the same reason, I already explained it for integral in two-dimensional space, f dot dr is just p dx plus q dy plus r dz. The integral of this is the same as f dot dr, where f has components p q r. This is just a simple dot product. That's what the dot product gives you. It gives you this formula. What about d omega? d omega, we calculated last time. Remember, it was a long and excruciating calculation, but it gave us precisely the curl, right? It gave us precisely the curl. So d omega is actually going to be precisely the curl. Well, the integral of d omega, double integral of d omega, is precisely the double integral of curl last time. This is what we did last time. This is what we did last time. I'm not going to repeat this. And so, again, this formula, Stokes formula, is a special case of the general principle, okay? Any questions so far? And now, we want to cast this last formula, this divergence theorem, also in the same way. So let's do that. Let me erase here. In the case of divergence theorem, we have d equal three so that the domain is three-dimensional and the boundary of the domain is two-dimensional. So what could it be? So the E ds, what does this look like? Well, in this case, omega is going to look like this. It's going to be A times dy dz plus B dz dx plus C dx dy. And last time, I explained that this is precisely E dot ds last time, where E is a vector field with components A, B, C. In other words, you remember this definition, E dot ds is, with integrals, we, you know, it was kind of a painful definition. I was very involved. And we had to do, it was a complicated formula which included this r u cross r v. At last time, I wrote out what r u cross r v is. I explained this in great detail. And when we looked at what we got, and we used that formula for the Jacobians, for the involving Jacobians, then we actually ended up with this. I remember I was writing it right here, okay? Just two days ago. So this we did, this we explained. So you see, and now we can actually appreciate this more. You see, a general omega is going to be a combination of all possible terms that you can write involving these letters, d x, d y, d z. Except, well, in this case, we should only have one of them for each summand. Only one, why only one? Because we are going to integrate here over the boundary of a two-dimensional domain. So this had to be, we integrate that over one-dimensional boundary, one-dimensional object. And so d x, d y, d z should only occur once each time. What are the possibilities? Well, there is d x, there is d y, and there is d z. And we are allowed to multiply each of them by a function. That's how we get this expression, p d x plus q d y plus r d z. There's nothing else. But now we are integrating, we are supposed to be integrating this over two-dimensional object, over two-dimensional. So we should have two of those. We should have d x. What are the possibilities? There are nine of them. There's like d x, d x, d x, d y, d x, d z. There is d y, d x, d y, d y. You see what I mean? There are nine possibilities because you have three choices for the first one, three choices for the second one. But in reality, there are only three choices, not nine. Why? Because first of all, d x, d x doesn't make sense. Well, it doesn't make sense, it's just zero. This is zero, d z, d z is zero. So three are gone. There are six remaining. But because of this property, anti-symmetricity property, d y, d x is the same as negative of d x, d y. So we shouldn't write it twice. That's why we only have d x, d y here. If we had d y, d x, we would just put it with negative sign and convert it into d x, d y. So that's why those remaining six actually collapsed to three. d y, d z, d z, d x, and d x, d y. So this is the most general expression which you can integrate over two-dimensional domain. You can multiply each of those three guys by a function. And there you go. That's what you get. And I claim that actually the way we set everything up, integrating this object is the same as doing a surface integral of this vector field. It's just that we defined it as an integral of a vector field because it made sense for us because if you think about the flow where e is actually velocity vector field, and the rate of flow is given by such an integral, the rate of flow through a membrane would be given by this integral. But we could have set it up in a more abstract way by saying what could we possibly be integrating? And then you would see that what you could possibly be integrating is an expression like this. So there are different ways to define double integrals, but the result you get is the same. You either think about it as a flux or surface integral of a vector field with such components, or you simply say that this is an integral of this quantity which is understood in the same way as before. For example, if you have this term, oh, let's talk about this term. If you have this term, you just write for dx dy, you just write this expression. In other words, you parameterize your surface by auxiliary variables u and v, and you write dx dy like this, okay? So that's what goes here, this expression. And now, to understand the left-hand side, we need to take the differential of this expression because we always, when we go from the right-hand side to the left-hand side, we always take the differential. We already did it twice. We've talked about the left-most column where we took the differential of a function. That was the easiest one. We did it here where we took the differential of this expression like this, p dx plus q dy. We're slightly more complicated, but we got the right answer also. So let's see how we can possibly get the divergence, and this will find and demystify this last formula as well. So all we need to do is to apply the differential to this guy, okay? Let's do that. Apply the differential to this guy, following the same rule as before, nothing more, nothing less. What is d omega? It's going to be dA dy dz plus dB dz dx plus dC dx dy. Okay, good. So what is dA? dA is the derivative with respect to x dx plus derivative with respect to y dy plus derivative with respect to z dz. And then I put brackets, and I don't forget those guys, dy dz. Is that clear? That formula clear where it comes from? Okay? Ask me if it's not clear. This is our last lecture, so might as well. Well, not really last lecture, it will be one more. Okay? But it's really simple. I just take dA, that's dA, multiply by dy and dz. So let's open the brackets and put this guys inside. We get this expression. Okay, so this is a good one. You have dx, dy, dz, they're all distinct. We'll keep this. But this one has twice dy. And we know that dy dy is zero. There's nothing we can do about it. It is zero. It's a lost cause, okay? It's gone. What about this one? Well, this is slightly more tricky. dz, dy, dz, but dz, dy, dz. First of all, we can switch dy and dz by using the rule, the anti-symmetry rule. So this is the same, we'll put an active sign, dz, dz, dy. You see? We switch these two guys, so it comes out as dz, dy, and we put a minus sign, so it's the same. But now we've got dz next to dz. That's again zero. So this is zero as well. So out of these three terms, only one survives. And that's dA dx times dx, dy, dz. Let's now look at the second one. In the second one, I will be taking derivatives of B with respect to x, y, and z. But each time I take derivatives with respect to x, say, I spit out dx. Each time I take derivatives with respect to y, I spit out dy, and same for z. But I already have dz dx. So I don't want to spit out any more dz's or dx's. So when I differentiate with respect to z or x, I will get zero, for the same reason for which this is zero and this is zero. That means the only non-trivial term, the only non-zero term I get out of this guy, it's when I differentiate with respect to the variable, which is not yet here. And there is only one such variable, y, right? It's not a question, it's a statement. It's a variable y. I already explained y. So I just say cross, when I do respect to x is zero. With respect to y, I'm going to get dy, dz, dx. This is what I get from here when I differentiate with respect to y. I get this term times what I already had. That's how I get this. And the last one will also disappear because, again, there will be dz twice up here. And then we do the last one. For the last one, the first two terms will disappear. The only non-trivial term which I'll get will correspond to differentiating with respect to a variable that's not already there. Which variable is not already there? It's the variable z. So you have to differentiate back to z. So you get dc, dz, dz, dx, dy. Okay, almost there. Let me summarize. Let me summarize. The answer has three terms. There is da, dx, dx, dy, dz. There is db, dy, dy, dz, dx. And there is dc, dz, dz, dx, dy. But now I have to follow my rules. And my rules tell me that dy, dz, dx. First of all, I can switch these two guys. I get a minus sign. And then I switch them again. I get two minus signs. But two minus signs is a plus. So I actually, I get back the expression dx, dy, dz without a sign. Because I had to jump twice. If I jump just only once over dz, I get a minus sign. But if I jump twice, there is no price to pay. You see? So, well, you shouldn't generalize that last statement. It applies when you study fermions and differential forms. So actually, this is the same as, I could just put dx in front, which would be the same expression as here. And likewise, for this expression, look, you got dz, dx, dy. You can jump, dz can jump over dx once, negative sign. And then over dy, second time, no sign. So again, you get back dc, dz, with the usual product dx, dy, dz. So the end result is, it is just da dx plus db dy plus dc dz, dx, dy, dz. And that's the divergence of my vector field e, dv. This is dv, remember? Which is exactly what I get in this formula. Right? So, if somebody asks you, why do you get a minus sign here? And you get a lot of minuses here. But in divergence theorem, you don't get any minus signs. Divergence is the sum. The respect to x, the respect to y, the respect to z, the sum. Now you can see, you can give a very clear answer because when I calculate the derivative, the differential of that expression, I need to jump twice over those things. And when you jump twice, you get two minus signs. That's why there are no signs showing up. Whereas when you apply the differential, this guy, which has, which is a one form, so it has, it's like this, dx or dy. A single dx or a single dy, and not two dx's, or dx, dy, or dy, dz, and so on. Then actually, you have to switch them sometimes, switch once, and that's what gives you the sign. So you see now all these formulas, which look really bizarre if you just take them as face value, and don't try to see an underlying pattern, they now start to make sense. These signs are there for a reason. And you can say in a way that the reason is that rule, that anti, anti-symmetry rule. That's where the signs come from, or don't. Because sometimes you have to do it twice, and then the sign disappears. Questions? Yes? That's right. So you're saying that we also have this formula for the cross product, that A cross B is equal to negative B cross A for the cross product. Right? So the question is how exactly you get this out of this? Right. So the point is that when we're actually doing the integral, we're also in the setup of the integral, we also use orientation. So in fact, it's not just the area, but it's a oriented area in some sense. An oriented area is just the cross product, you see? So that's why when you switch, you get the same area, but with different orientation, right? And that's the sign. The sign is not because the area is always positive, of course. The area is positive. But here we are talking not just about the area, but the area times the normal vector. And the normal vector can point one way or the opposite way. And that's determined by this right hand rule or the core screw rule, whichever you like, right? And so if you switch then the order, you get no negative sign. Very good, very good. I'm very glad that you asked me this. That's right. So there is one thing which I have not told you, right? So I gave you 99% of the truth, or maybe 95%, right? And I'm glad that you asked me this. So that was exactly the question. Which orientation should I take on the right hand side? So let's talk about orientations. In all of these formulas, orientation is very important. You can already see it here. We take F of B minus F of A, and not F of A minus F of B. And that's because we use this orientation on the left hand side. If we were using the opposite orientation, we would have to take F of A minus F of B to get the right formula, right? And then we talked a lot about orientation last time for Stokes' theorem. And also Green's theorem is just a special case of that. So in fact, to be absolutely precise here, I have to say, I have to draw the picture, that I have to choose orientations on both sides in a compatible way. Compatible way means that if I look at this orientation, then if I walk my head up on the boundary, the orientation should be such that as I walk, my head up with respect to this orientation on the surface, the surface should be to my left, which means in this particular case that it should go like this. This is orientation. Only if I make compatible choice of orientations do I get this formula and not minus sign, not left hand side equal to right hand side up to a sign. But likewise, in this formula, I should also specify which orientation I choose. So let's talk about orientations in this formula. So here we have a left hand side and a right hand side. And on the left, everything is already oriented. You see, this is why this formula appears in the same row as those two formulas. We never talk about orientation here. We never talk about orientation here. That's because the regions in this case have the same dimension as the dimension of the ambient space. Here it's an interval on the line. Here it's a two-dimensional region on the plane. And here is a three-dimensional box and a three-dimensional space. These are what we call flat regions. They're not curved. Let's contrast this region to this two-dimensional region to this upper hemisphere. Upper hemisphere is curved. That is not curved. When you talk about the three-dimensional object, you may think that it is curved, but that's a misperception, misunderstanding. So the point is not, the boundary of it could be curved. Just like the boundary of this one is curved. I'm not saying the boundary is not curved. The boundary is curved, fine. What I'm talking about the region itself. When I talk about the region itself, it means I take a point in the interior. I take a point in the interior, not on the boundary. And I observe that the small neighborhood of this point is just a piece of this plane. It's not curved in any way, right? Of course, on the boundary, that's not the case. But I'm talking about the interior. I'm talking about this two-dimensional region, not about the boundary. Likewise, if I take a point in this box, a small neighborhood of this point is flat. In fact, we cannot really imagine a curved three-dimensional object. It would be very difficult, you see? Because a curved three-dimensional object would have to live in a four-dimensional space just like a curved two-dimensional object would have to live in a three-dimensional space. So since we are not going to the four-dimensional space, all our three-dimensional objects are flat. And for a flat object, there is a canonical orientation. That's this coordinate system, X, Y, Z. We know which coordinates, first, which coordinates, second, which coordinates, third. That's the orientation. Or more precisely, we have fixed the cyclic order of the coordinates. So the left-hand side does not require any additional information. That's just our familiar triple integral. When we talked about triple integrals, we do not talk about orientation because there was no need to talk about orientation. They are well-defined. Once we choose the orientation of the three-dimensional space. But the double integral on the right-hand side requires orientation because that's a surface integral. And surface integral depends on the choice of the orientation of the normal vector. In this particular case, for example, giving it orientation, giving the boundary orientation would mean on each of the sides to say the vector sticks out or goes inside. Likewise, on the bottom goes down or goes inside. Likewise, at the top goes, so there are two choices. Either they all stick out, they all go outward, or they all go inside or inward. So for a region which is a boundary over three-dimensional domain, there are two possible orientations, inward and outward. And we have to say which one we should use here so as to have this equality and not this equal to negative that. I mean, there are two choices. It could be this or it could be negative that. And the correct statement of the divergence theorem is that you have to take this with outward orientation. Outward orientation. So now everything is correct. Now it's 100%, I give you 100% of the truth. And we have a little time to do a couple of examples. So how can we use divergence theorem? We'll talk some more about this general pattern on Tuesday. But now I just wanna give you a couple of examples just to illustrate the applications of this formula. How can we use divergence theorem? Well, basically in the same way in which we use those formulas. Sometimes it's much easier to calculate the left-hand side and the right-hand side or the other way around. Usually it's this way, not the other way. So for example, suppose you have a vector field which is X cubed I plus Y cubed J plus Z cubed K and B is a unit ball. Well, let's just say M is a unit sphere. And so you're asked to calculate to calculate the double integral of E dot DS over M. So it's not impossible to do. You have to parameterize the sphere by using spherical coordinates and then you'll get some formula. But it's rather complicated. So actually in this case, it is worthwhile to apply this theorem. In fact, the best example to illustrate this would be, I could choose a vector field E for which divergence is equal to zero. If the divergence of a vector field is equal to zero, it could be some really bizarre vector field. But its divergence could be zero. In other words, I could take a vector field. So this is sort of a digression. I could take a vector field where here I would have some function, E to the tangent of Z cosine Y I plus sine of cosine. Just imagine the most bizarre function you can construct. I guess my imagination is not that wild. But I'm just trying to emphasize, I'm just trying to give you some weird functions. But you have to be careful. You have to make sure that the divergence is zero, something like this. And suppose you get a problem like this. So nobody in their right mind will give you such a vector field unless there was some drastic simplification that could happen, right? So in this particular case, the simplification is obvious. If you take the divergence, the divergence takes the derivative of the first guy with respect to X and you notice that this does not depend on X at all. So this will be zero. The derivative of this with respect to X is zero. The derivative of this with respect to Y is zero. The derivative of this with respect to Z is zero. So divergence is zero. So usually, so if you look at the homework, you might see some really bizarre vector fields. Apply the divergence theorem. We will not regret it. Okay? You might actually get zero. And then that's the end of the calculation, right? Because if it's zero, that means this integral is equal to this, is equal to zero. What I'm giving you is not quite as obvious, sort of, not quite as obvious a gimmick, but it's a more realistic situation where the divergence is not zero. But it's very close. It's very simple because, so what do I get in this case? In this case, the divergence of E is three X squared. That's what I get by differentiating this. Plus three Y squared. That's what I get by differentiating this with respect to Y. Plus three Z squared. So it's actually three times X squared plus Y squared plus Z squared. And that means that my integral, my surface integral can be written as an integral over the interior of this sphere, over the unit ball. So it's a triple integral of the function which is three X squared plus Y squared plus Z squared. But of course here I pass to the spherical coordinates. So this is actually three rho squared. And I end up with the following thing. I get three rho squared. Then I have to remember the Jacobian. Rho squared sine phi. And then I have d rho, d phi, d theta, which is very easy to compute. So that's a good illustration of how you could apply divergent theorem. We will talk about, I will give you more examples and talk more about how to give you tips for the exam problems on Tuesday. And remember that the lecture may not be televised. So you wanna be here on Tuesday. I want to see you all on Tuesday, okay? And thank you for being such a great audience. It's been a lot of fun.