 So, next Thursday is a second midterm exam. Who could have thought? It feels like the first one was just yesterday. Yeah, it was much warmer, you know. So, next Thursday, November 5th, right here, for most students, as you know last time, we had an overflow and again, I apologize for this. I apologize to those students who didn't have comfortable seat. So, we'll avoid this situation, this kind of situation this time, we'll have some reading room. And unfortunately, that means that two sections, students from two sections, those which are led by Dario, will meet at a different undisclosed location. No, I just didn't want to write it. You can find it, Dario will tell you. If you are in Dario's section, Dario will tell you. And it's also on the class home page. It's in Barrow's hall. And if you're not in the section of Dario, then you don't need to worry about it. You should just come here, okay? And on the home page, you will find more information, but it's basically the same deal. Someone asked me for the cheat sheet for the page of formulas. Can we use the old one, the one from the first midterm? And the answer is no. You have to make a new one. It will also be on one side of it. It has to be on one side of it, on one side of a standard size sheet of paper, okay? But don't worry, we're not going to test you on the material of the first midterm anyway, so it doesn't really, it doesn't make a difference. The midterm will cover the material after the first midterm, okay? Everything that we've done up to now, since the first midterm up to now, up to this week, including this week. And there are, on this webpage, you will find problems for review, and you will also find a mock midterm. It's not posted yet. I will post it tonight, the mock midterm, okay? Any questions about this, about the exam? Next Tuesday, we'll have a review lecture as before in which I will discuss all this material and kind of try to put it in perspective, and you will have a chance to ask me questions about it also. Yes? Oh, so there will be no quiz next week. So it's the same deal as last time. Mock midterm, the idea is to give you problems which kind of look similar to what you should expect, of course, yes. Well, difficulty is in the eye of the beholder, of the beholder, right? So for some people, it will be more difficult, some people will be less difficult, but it should be in the same ballpark, okay? All right. So let's go back to the material of last week, I mean last week, last Tuesday. We talked about triple integrals, and we talked about special coordinate systems for triple integrals, the cylindrical and spherical coordinate systems, okay? So I wanna say a few words, general words about triple integrals. So when I say triple integral, it means that we have something like this, where E is a region in the three-dimensional space, something we denote by R3. F is a function, and dV is what we can think of as kind of a measure of integration, which we would usually write as dx dy dz, but in some order. But in fact, we know that we can use other coordinates as well, and today we'll talk more about the possibility of using different coordinate systems. So the basic setup for calculating this integral is, as I already explained last time, and as has been explained last week, but I want to repeat it one more time, is that you want to represent this triple integral as an iterated integral. In other words, you want to break it into steps where at each step, you are just evaluating a single integral, an integral in one variable, something which we learned before in one variable calculus. And the way you do it is, first of all, you find the projection of your three-dimensional region. So you have some three-dimensional region here, but the first thing you do is you find its projection on one of the planes, one of the coordinate planes. Let's say xy plane, but it could be xz or yz plane. So that's the projection d. Let's call it d. So this e is three-dimensional. This is three-dimensional, whereas d is two-dimensional. It's a two-dimensional region, which is in the xy plane, okay? So once you do that, you can rewrite your integral as an iterated integral where you have a double integral over d, and here you put dA, which is the measure of integration in the two-dimensional space, which is essentially dx dy. And then you have an integral of f with respect to the remaining variable where you have to put the limits. So there'll be some limits, alpha and beta, which in general will depend on xy. So here xy will be in d, and for each xy, the limits for the single integral will be from some alpha of xy to beta of xy. Now the way we write it is slightly confusing, and you saw that confusion last time at the lecture when we discussed it. It is important to remember that you read the integral from right to left. I mean, that's the way it's done. That's a convention. You read it from right to left, which means that you first do this one. You first, this is the first step. You first evaluate this single integral, okay? And then in the second step, you evaluate the resulting double integral. So once you evaluate this, you will get something which will depend on x and y. This will be an expression depending on x and y, which you then integrate over d in the xy plane. So we break it into two steps. The first step is a single integral with respect to the remaining variable along which you have projected. And the second step is integrating over the image of the projection, which is d. This is the image of the projection. So we can actually write it further, further as a combination of single integrals because this double integral in turn can also be written as an iterated integral, okay? So that means that writing integral over d, dA as an iterated integral with respect to x and y, we actually end up with three single integrals. So here we also have a choice. There is a choice. Which one goes first, x or y? Let's say, and what do we mean by which goes first? Which one will appear first or which one you will integrate first? As I just said, you read it from right to left. So this is actually, these roles are reversed, right? So let's write it like this. Let's say it's dx and then it will be dy and then finally it is dz and then you have your function f. Here I wrote f dz and here I wrote dz f. It doesn't really matter as we discussed last time. It doesn't matter in which order you write f and dz or f and dy and so on. I find this form a little bit more convenient to remember, more intuitive because the variable of integration is written right next to the integral. So you will not forget which one you're integrating. But the important thing to remember when you look at this formula is to read it from right to left. You read it from right to left which means that this is the first step. Integrate over z. I'm skipping the limits. Of course there will be limits. For example, here will be limits alpha of xy and beta of xy like on that blackboard. But let me just skip that. I'm just giving you kind of a schematics of this process. So the first step is integrating f over z. The result will be a function which only depends on x and y because we have integrated out z. Think of it as kind of removing the dependence on z by averaging out over z, over the effect of z. The result is a function of x and y. That function you integrate over y. This is step number two. This is the second step. And finally, you integrate the result which will now be only function of x over x so that the end result is actually a number independent of all of these three variables. So at each of the steps you get rid of one of the variables. You're kind of averaging out over that variable so that the result does not depend on that variable. If you are doing an integral and suddenly you notice that you have integrated over z but the result somehow depends on z. That you carry z somehow to the second or first or third step, you may have made a mistake somewhere. There should not be any dependence on z on the second step. There should not be any dependence on y and z at the third step, you see. So this is a very easy test to see if you are doing things in the right way, okay? Any questions about this? So it's kind of an rotational issue but you just have to remember that you kind of, this is, because it is actually, it is very, it makes sense because you're integrating this expression. Okay, but what is this expression? This expression is obtained by integrating this. I mean integrating respect to y, this expression. So unraveling it, you see that first you have to integrate this and then you integrate this and then you have to integrate this. It makes perfect sense that you go from right to left and not from left to right, okay? Now there is a very special case of a triple integral. There is a special case and that's the case when the function f which in general is just any function of x, y and z. Right, so f is really f of x, y, z and general could be anything, could be, you know, x squared times e to the y times cosine z or whatever, whatever you want. But there's a special case when this function is actually just equal to one. Okay, that's the simplest function you can imagine. Well, save zero perhaps but if the function is zero, the integral is zero so there is nothing to discuss. So let's talk about the case when the function is actually equal to one. And also let's assume in addition that our region in the three-dimensional space, e, is the region above this domain D, domain D in the two-dimensional space under the graph of some function of a function. Let's call this function f capital. Note that this has nothing to do with f small. f small is a function of three variables. It's a function on e which is a region in 3D, on R3, on the three-dimensional space. But let's suppose that the region itself is, there is some function so let's draw a picture like this. So let's say D is a kind of a rectangular region. And here we have some function like this. So we have some, this is a graph of a function. So let's say that this is a graph of a function z equals f capital of xy, this. So this is what we discussed when we talked about double integrals. When we talked about double integrals, we discussed the fact that a double integral represents the volume under the graph. The volume under the graph. So the volume under the graph, I put it in quotations. What I mean is, first of all, that I'm assuming that this function is greater than or equal to zero on D. For otherwise it would not be above the xy plane everywhere on this region D. This is region D, which is now kind of a rectangular region. I have chosen to simplify things. Okay, and also when I say under the graph, I really mean under the graph but above the xy plane. And also on the sides, it's confined by the boundaries of D, which in this case are just vertical planes like this. Okay, so when we talked about double integrals, we discussed the fact that volume is equal to this volume under the graph is equal to the double integral over D of f capital xy da. So now I wanna show that you get exactly this answer if you also by calculating a triple integral but with the function one. You see, so this is one of the points which many people find confusing that the volume under the graph is actually given by double integral but it's also given by triple integral. But in the special case, in the special case is that the function which you integrate, the function of three variables is one. In other words, what I'm integrating now is dv. You see, this is the most general triple integral. It's an integral of f dv over e. But now f is one. So if you want, I can put one times dv but it doesn't matter, one times dv is dv. Okay, so what is it equal to? Let's use this formula. First of all, so I project onto d and in this case I surely can do that because my region has a very nice projection onto the xy plane specifically because it's under the graph of a function. And so I will have here dA and then I will have to put the limits here, alpha and beta and integrate my function. But what are the limits in this situation? In this situation, the lower limit is always zero. I'm always counting z from zero because the bottom lid of this region is just a rectangle on the xy plane. So that means z is equal to zero at the bottom. Here z is equal to zero across the bottom. So that's why here I actually put zero and then I'm integrating z from zero to something which lies on this graph. So that's sort of the top of this region. And so for the top point of that region, what is z equal to? z is equal to f capital of xy, right? So that means that my upper limit is f capital of xy. And then I have to put fdz, but f is one again. So it's one times dz, right? So this is very easy to find, right? This is just a very special case of this general setup. I have to take the anti-derivative to calculate this integral. I simply have to take the anti-derivative of one. An anti-derivative of one is z plus a constant, but anyway, we are going to take the difference of the limits. So it's going to be z with the limits f of xy and zero. So what is that? That's just f of xy. So this inner integral, which as we have agreed should represent the first step of the calculation, this inner integral is simply equal to f of xy, right? Simply because the function is one. This argument would not work necessarily for the general function. For general function, we'll have some f here, which depends on xy, right? And so xyz, in fact. So a general function depends on xyz. So you wouldn't be able to easily find the anti-derivative. But for the function one, the anti-derivative is z. I mean, this for sure we know, right? So that's the answer we get. And once we get this answer, let's substitute it here. So we get double integral of f capital of xy da. So that's the same answer as before, right? The answer before was the integral of f of xy da over d. And that's exactly what we got by integrating the function one over this entire three-dimensional region, okay? Does this make sense? Yeah? Any questions about this? So the conclusion is that this integral is actually equal to the triple integral over E, where E is this region inside. This is E. E is this three-dimensional region, which is drawn here under the graph. So one more time. The volume of this region under the graph can be represented in two ways. One is triple integral, but a very special function, namely function one, okay? And can also be represented as a double integral of the function f capital of which this is the graph over the region D. The reason why the two things are the same just is just the result of calculation of representing the triple integral as an iterated integral where at the first step we very easily evaluate what the result is for this special function one. That's what we get, okay? So now, of course, you can ask if the integral of the function one over this three-dimensional region is nothing but the volume of that region, what about the general case? What about an integral of a general function f of x, y, z? Is this also some sort of a volume? Well, there are two ways to interpret the triple integral for a general function. For a general function, function f of x, y, z. Not necessarily one, not one, but some general function. There are two ways to interpret two ways to interpret the integral. Well, the first way is, let's suppose you want to interpret it as some sort of a volume. And let's argue by analogy, okay? Suppose we have, let's go down one dimension lower and let's look at the integral of this function over the two-dimensional region, double integral. This is a double integral, but we interpreted it as a volume of something three-dimensional, you see. So a double integral of a general function actually corresponds to a volume of something three-dimensional, of dimension greater by one. So you start with a double integral, but you get a volume of something three-dimensional. That's not surprising, because likewise, if you have a single integral of a function one variable, what does this represent? It represents the area of something two-dimensional, namely, the area under the graph of this function F. All right, let's call it, let's choose a different variation for this function so that we don't confuse different things, right? So a single integral corresponds to the volume, but in this case, we call volume area, that's the terminology, proper terminology, area of something under the graph of this function, and this something is actually two-dimensional, even though you start with a single integral. If you start with a double integral, so two is the number of integrations, you get volume of something three-dimensional, right? So what will you get if you take a triple integral? You get a sort of a hyper volume of something four-dimensional, right? So I mean, that's, if you insist on interpreting the integral as a volume of sorts, you have to go to, you have to introduce one extra dimension, and so you will get kind of a hyper volume. I don't know, there is no good term for it. Mathematicians would just call it a volume because you don't care what the dimension is, it's still called a volume, but let's call it hyper volume to emphasize that it is a volume of something not quite, it's not kind of an object that we will meet in real life. Hyper volume of a four-dimensional region, region which is the region under the graph, under the graph, again, quotations of f of x, y, z. So you see there is a complete analogy. A single integral of a function g will be the volume or area under the graph of this function, and a double integral will be the volume, a double integral of a function in two variables will be volume of something in three dimensions under the graph, and the triple integral of a function f is a hyper volume of the four-dimensional region under the graph of this function, so you have to introduce an additional variable u and say that the graph is given by, so you have a four-dimensional space with coordinates x, y, z and u, and you write u is equal to f of x, y, z. Now, of course, we cannot really visualize it because we can only visualize three dimensions. There is time, so you can think of a region in space time if you want, and the extra variable u we can think of as time, but still it's kind of, so if you think about it, you can imagine this because you can just count, you can look at a certain region in three-dimensional space and you can count time from certain point zero to some other point which depends on x, y, z. So that will represent a kind of a region in space time, and what you're calculating is a hyper volume of this region. Now, this is, but still it's a little bit disconcerting because we don't really have good intuition for four-dimensional space, so it is natural to ask, is it possible to give it a three-dimensional interpretation? Well, we can go back to the double integral and ask the same question there. We can ask what if f capital, the general function, we know that this integral can be thought of as a volume of this 3D object, but can it also be interpreted in terms of just two-dimensional geometry? And the answer is yes. It is, if you think of this function as a density function, mass density function, then this will give you the total mass of the laminar or some kind of a plate which occupies this region. So this is something which we discussed last week, the total mass as a double integral. So in other words, you are thinking of, you can think of this calculation where the function is one. You can think of calculating the volume, but you can also think of it as calculating the mass. But in a special case, when the density function is one, if the density function is one, then calculating the mass is the same as calculating the volume. That's why we get the volume. But in general, the density function could be more complicated. Your object may not be homogeneous. It could have some heavier parts and lighter parts. And you want to kind of average out all of them. You want to find the total mass. And the total mass would then be the integral of that function or that density function. So from this perspective, you don't have to introduce an extra dimension. If your object, if you have a double integral, you have region D. You think of this function as a density function and you simply think that you're evaluating the mass of an object occupying this region where this function is a density function. And likewise, if you have a three-dimensional object which occupies some region E, you can think of the triple integral with the general function F as the mass of that object. You see? So that's the way to interpret it. So this is a total mass, total mass of a solid E with mass density function F. Any questions about this? So our last topic in this chapter about integration is about general coordinate systems and the general change of variables. We have already discussed some new coordinate systems in two and three-dimensional spaces. We have talked about the polar coordinate system and we talked about a spherical coordinate system. Also cylindrical, but cylindrical in some sense is not really a new coordinate system. It's really more of a cousin of the polar coordinates. So now we would like to talk more systematically about different coordinate systems in two and two-dimensional space. We can also do it in three-dimensional space, but we'll just focus on the two-dimensional space. And in 3D, the conceptually is the same, but calculations are much more complicated. So we basically will mostly confine ourselves to the two-dimensional case. And as always, when we talk about this conceptual matters, it's always good to look at a simplified version, which in this case would mean just single integrals, integrals in one variable. And see how things work for single integrals. So let's recall how this works. Change of variables. Let's change a variable in a single integral, f of x dx. So we know how it works. We simply write x as a function, let's say g of some new variable u. And then what we do is we substitute this g of u instead of x in the integral. But in addition, we realize that dx is not du, but rather dx is g prime of u. So what it means is that it will be wrong to just write the integral as f times du, but instead there is this additional factor, which is g prime. So we recognize that even in one-dimensional case, there is this additional factor. And this factor actually should be thought of as being conceptually the same kind of object, the same kind of phenomenon as the factors which we discussed in the case of polar coordinates, namely the factor r, and the factor which we discussed in case of spherical coordinates last time, which is rho squared sine phi. So these are all brothers in some sense. So they all appear for the same reason. I mean, although this is in one-dimensional case, this is two-dimensional case, this is three-dimensional case, but all of these factors are essentially, they are the kind of distortion factors, the area or volume distortion factors which happen due to the fact that we introduce a new coordinate system. So our task right now then is to understand what exactly this factor is in the case of a most general coordinate change. Not only in one-dimensional case, but in the case of two and three variables. And like I said, mostly two variables, you see. So we would like to develop a formalism of change of variables, but for double integrals. That's what we like to do. For which this r, this polar coordinate case will be just a special case. So let's try to figure this out to see how this works. So in the one-dimensional case, we have a given variable x and we have a new variable u. And we have a law which allows us to express one of them in terms of the other. And that's this formula x equals g of u. But now we have, now let's try to develop, let's try to think of something similar in R2. So in R2, we have two given variables or coordinates, coordinates x and y. And we would like to introduce two new coordinates. Suppose we introduce new coordinates. Let's call them u and v. So here's an example. Here's an example. Polar coordinates, something we have learned already. UV as this new coordinate system is our old friend polar coordinate system. So u and v are in theta. So when we do that, we should be, when we say that we haven't, we haven't introduced a new coordinate system, what do we mean by that? We mean that we can express each of the old coordinates x and y in terms of this new coordinates in a one-to-one way. In a way that establishes a one-to-one correspondence between points with x, y coordinates and points with u, v or our theta coordinates. In the case of polar coordinates, we know those formulas and we know that for every r and theta, where r is a positive number and theta is between zero and two pi, we have a particular value of x, y, and conversely. So it's a one-to-one correspondence. It's not strictly speaking correct, what I said, because of the special point zero, the origin, point O, the origin, for which if r is equal to zero, then theta is not well-defined. So except for this one point, this is this map which I would like to think, I would like to think of this formulas as giving me a map, a correspondence from between two coordinate systems. This is our true physical coordinate system, x, y. This is what we see. This is a blackboard and this is how we would represent points on this blackboard. And here is a kind of a fake auxiliary, imaginary coordinate system with coordinates r, r, and theta. All right, let me write like this. In fact, many of you will recognize that we have used this before when we tried to draw parametric curves and polar coordinates. We did use this kind of coordinate system. So it has nothing to do immediately with the plane because the way a point here will give us a point on the plane is through this formulas. But I would like to think of this formulas as giving us a map from this auxiliary coordinate system, this imaginary coordinate system, which we have in our head, which doesn't really exist, to the real coordinate system on the physical coordinate system on this physical plane. So for example, let's say I take the region where theta goes from zero to pi and r goes from zero to one. So that's a very simple region on this imaginary plane, right? It's a rectangle. But what does it correspond to in the physical world? What do you think? Circle. Okay, close, warm. So the circle will come if we fix r. If we just look at this interval, this interval will correspond to the part of the circle of radius one, which lies above the x-axis because I set from zero to pi. If I set from zero to two pi, it would be the entire circle. But because I set from zero to pi, it will be half a circle, right? Everyone agrees with that? Okay, but that's not the entire region, right? The entire region is composed not just by this interval, but also by all other intervals which lie beneath it, right? And so those intervals will correspond to circles of smaller radius, right? And so all together, here, they give me this rectangle. But in the physical world, they give me this half a disk, upper half of the disk of radius one. So you see something very interesting happened under this transformation. We started out with the rectangle and we ended up with upper half of the disk. And I would like to say that these formulas give me a transformation from this region to this region. What do I mean by this? I mean that each point here will correspond to a particular point in here. And in fact, this correspondence is one-to-one. In other words, no two points will go to the same point. Right, and like I said, this is almost true. Unfortunately, strictly speaking, it's not true for this interval. This entire interval where r is equal to zero will go to this one point. We'll go to this one point. So there is a subtlety. But the point is that we are studying here two-dimensional region. And something bad happens on this interval, which is one-dimensional. This is what mathematician would call measure zero. It's not measurable. Its measure is negligibly small. It's actually zero. So as far as computation of integrals is concerned, it's not going to change anything, okay? But if I wanted to be more precise, I would take, say, not this rectangle where r goes from zero to one, but I could instead take a rectangle where r goes from one-half to one. Then I would get, instead of upper half of the disk, I would get upper half of the annulus with the shorter radius one-half and the longer, larger radius one. So if I do that, actually, the mystery becomes, the transformation becomes less mysterious. You can certainly believe that I can transform this strip into this. What I do, I kind of twist it. That's what this transformation, given by this two-formal, does. It kind of twists and expands and stretches in a certain very controlled way, the fabric of this original domain, to create a domain in the physical world. That's what this information is, you see. And then if you think about the big one, it's sort of, if you get closer and closer to this red part, it becomes closer. The way I stretch it is I stretch it on this side in the same way, but I stretch it on the lower side, not stretch, but in fact, squeeze to make it shorter and shorter and shorter. And as I approach here, actually, the whole thing opens up into half of the disk. You see what I mean? You guys see what I mean? Yeah? Okay. So this is exactly the kind of formulas I'm talking about. This is a one-to-one transformation, one-to-one. So each point here corresponds to point here and conversely, each point here corresponds to one and only one point here. When I'm in this situation, I would like to be able to write a double integral of a given function f of x, y, d, a, as an integral with respect to u and v. And of course, so I'm kind of in the same situation as I was when I talked about the one-dimensional case. The first step would be to substitute the formula for x and y in terms of the new coordinates. So this would be, let's say, in general, here I have x is r cosine theta. So it is some function of r and theta. But in general, if I have a coordinate system uv, not necessarily polar, but more complicated, I'll give you an example in a minute of another change of variables like this. Let's say this will be some g of uv and this will be some h of uv. So the first step would be to just substitute g of uv and h of uv instead of x and y, right? And then just write du, dv. But this is not enough. The point is that there is always an additional factor. There is always a distortion factor here, which we are now going to calculate. An example of this factor is the factor r, which we have found in the case of polar coordinates. So for polar, we get r and then we get dr, d theta. What we want to do is to have a more conceptual way of deriving this factor, not just for polar coordinate system, but for a more general coordinate system uv as factor. And of course, it's easier to explain having a particular example in mind. Well, here's one example, the polar coordinates, but in polar coordinates, we have already calculated what happens. You have a question? Yes? You are asking, would this have the same area as this? The answer is no. I'm sorry? Very good point. So this is a very good question. So when I say one to one, doesn't it already assume that this will going to have the same area, right? And the answer is no. And it's very easy to see that. If you have, you know, if you buy a garment, which stretches, you can see immediately the answer, right? Unfortunately, none of what I'm wearing today can do the trick, but you can imagine that you have something which is stretchable. Maybe, no. Okay, let's just work with your imagination. You stretch it, right? A stretch is a perfect, a what? This, yeah. But my hands are, I don't want to spoil it. But that's the good one. Can I use yours? No. But you see what I mean, okay. So let's just use our imaginary clothes. So, okay, so when you stretch it, stretch is a perfect example of a change of variables because there is a one to one, each particle, we don't create any new particles, right? Clearly, each point goes to a particular point and it's one to one. It is like, okay, it's even easier to do in one dimensional case. You can stretch an interval and make it, you know, just say a map X goes to two X. You just, everything gets stretched by a factor of two, right? So it is one to one, but when you stretch, the area becomes bigger, right? So just the fact that it's one to one correspondence doesn't mean that the area's state is same. And that's exactly what we are fighting for. This factor is precisely the distortion factor for the area. But the point is, which is maybe not immediately obvious, is that it would not be a good idea to actually measure this area and then measure this area and take the ratio of these two areas, right? Because it would be okay if our function which we were integrating, function F, if we chose the function one, if we chose function one, then we would just be calculating the area itself. And so if the area was something before, the area, the two area would be this and the area which we would naively think is correct in the imaginary R theta coordinate system would be something else and there will be some distortion factor between them, right? But that's not a good way to go because you see the point, when I make this transformation, the distortion factor is not the same everywhere. Because I explained, for example, that on this guy, let's look at this guy, at the top interval. The top interval becomes the part of the circle, segment of the circle of radius one, right? Whereas this guy, which has the same length on the imaginary coordinate system, it becomes part of the circle of radius one half. So certainly this is shorter than this. So our distortion is not like just stretching, but it's kind of stretching in different way at different places. So what we need is a local distortion factor. You see a local distortion factor, which in other words, we want to see not how this entire area gets distorted, but we want to see how this very small area around a particular point gets distorted. And that's the local distortion factor and that's exactly the factor which we will put here. You see? Any other questions? To see how this works, maybe it's better to... Sorry? You have a question? No? All right. So I want to give you another example of coordinate change before we get to calculating this factor, just so that we have sort of a better variety of examples. So here is a second example, which is actually straight from the book. It's... And this I want to use as a kind of a motivation for everything we are doing right now because perhaps for you it's not so clear yet why we are discussing this issue. But, well, polar coordinates is already a good illustration because we know that some of the integrals become much simpler in polar coordinates. But here is another example where the coordinate system of choice is not polar coordinate system. So this is 15.9 number 20. And so let's say you need to calculate this integral over some region D, where D is described as follows. It is bounded by lines, X minus Y equals zero, X minus Y equals two, X plus Y equals zero, and X plus Y equals three. So this is X plus Y equals zero. This is X minus Y equals zero. This is X plus Y equals two, or X minus Y equals two. This is negative two. And then there is another one, which goes like this. This is two, this is three. So it is actually rectangle because these two planes are parallel. Well, my picture is not so great, but they should be parallel and these two should be parallel. Also, right? So it is actually rectangle, but it's a rectangle which is rotated. So first of all, if you try to do this integral in the usual way by projecting onto the X line or projecting onto the Y line, it's going to be difficult because you see that first of all, you have to break it into pieces and then the bounds will be functions, will be some not very complicated linear functions. But then you look at the integrand and you see that it's going to really look awful if you try to do this, okay? So what this picture immediately suggests is that we should try to find another coordinate system in which this integral will simplify. And what is this coordinate system? Well, what if I told you that instead of calculating this integral, you would have to calculate the integral of U times E to the, let's say V, V times U times V, DU, DV, where over some region D prime, where D prime would be simply U going from, so the U going from zero to two, slightly different way, would also be rectangle, but this rectangle would be turned in the right direction. So this would be U and V and this would be two and three. This surely is much easier to calculate, right? Because this immediately breaks into iterated integrals and you find the answer right away. So what have I done? How can I get from this integral to this integral? I simply introduce new variables, U and V, where U is X minus Y and V is X plus Y. If I do that, that my bounds, which were X minus Y equals zero and become just bounds U equals zero and U equals two, which is what I did here, from zero to two and also V from zero to three, which is what I did here. So the region simplifies. It becomes, it kind of turns, we turn it so that it really stands straight like this. And the function simplifies as well because X plus Y becomes V and X squared minus Y squared, I can write as X minus Y times X plus Y, which is U times V, right? But it is not true that this integral is equal to this integral because, as I said, there has to be some factor, which is introduced, some factor introduced here. And to understand why we should introduce this factor, it's very easy to just, so to look at the map, the transformation. So we have here, we have here this rectangle in UV coordinate systems. So see, this is an example also of this kind of transformation, but it's simpler because it's linear. And those of you who have taken or maybe are taking math 54 will recognize a linear transformation. In fact, it is a rotation by 45 degrees coupled with an expansion by a square root of two. So this is two and this is three. And there is, these formulas give me a map because actually here I have expressed U and V in terms of X and Y, but I can also go back and I can express X and Y in terms of U and V. And I will find that X is U plus V over two. How to find this? Well, this is U and this is V. Take the sum. When you take the sum, the Ys will get canceled and you'll get two X. So if you divide by two, you'll get X. And likewise, Y is equal to negative U plus V divided by two. Right? So that's this map. Each point here will correspond to a particular point here. But now, why should there be a factor, a magnifying factor or distortion factor? It looks like, well, this is a rectangle and this is a rectangle. Perhaps we can just get away without any factor. This is actually easy to find out because in this case, the stretching, the stretching that occurs is actually homogeneous. There's the same distortion factor or stretching factor everywhere across the entire region, unlike this case. So in this case, the stretching factor is actually R. So it does depend on the variables, on the polar coordinates, R and theta. In this case, it's going to be constant. And so to find out what it is, we could actually look at this globally. And we can just, in other words, assume that, suppose that instead of this function, I would just take function one. Let's suppose I take function one instead of this. If I take the function one, what I'm calculating is just the area of this guy. And this area is very easy to calculate, in fact. Because, well, you just have to use the Pythagoras theorem. So the point is that here you have three. And so then you can find what this is. This is the right rectangle. And this has 45 degrees. This is 45 degrees and this is 45 degrees, or pi over four. So this length is equal to this length divided by square root of two. So this is three divided by square root of two. Let me use yellow. This is three divided by square root of two. And this comes from a triangle, same kind of triangle, but now the long side is two. So this is going to be square root of two. Two divided by square root of two, maybe. So the area of this guy, the area here, and this is a true area in the physical world, is three over square root of two times two divided by square root of two, which is three. But the area of this guy, and that's the imaginary world, because we are using coordinates which are priori have nothing to do with the real world. We are using them for convenience in order to be able to evaluate the integral. The area here is two times three, so it's six. So you see what happened here is that the true area, if we were calculating the integral with the function f equal one, instead of this complicated function, we would get the answer three. This is a true area. This is a true area. I'm just simplifying the question. Question is to calculate this function, but if the function were actually one, we wouldn't need to make any integral whatsoever. We would just need to calculate the area which we can easily do by basic trigonometry, which I just did. You get three. But if you calculate it the way I'm suggesting now, where you put the U, DV over this imaginary region, D prime, you get six. Now, three is not equal to six. That's how you know that there is a factor. And now we know that this factor is actually one half. So it's actually the stretching factor, but it's really a shrinking factor instead of stretching factor. And we know that indeed it has shrunk. When we made this transformation, this guy has shrunk by a factor of two, if you count the area. I mean, its linear sizes have shrunk by square root of two so that the area, which is the product of the two sides, has shrunk by a factor of two. You see? So in this particular case, because the transformation is linear, the shrinking factor actually is a constant, is one half. In general, it's going to depend on the point where you are making the transformation. And we'll see now the general formula for the shrinking factor. But I want to use this example to illustrate that even in a very simple situation, supposedly, where you can actually draw this quite easily and recognize it as a rectangle and so on, it is much easier to find these new variables, U and V, which you can see, we kind of, they leap in your eyes. You see right away what the appropriate variables are because everything is expressed in terms of x minus y, x plus y. So why not use them as the new variables? The one, when you do that, the only thing you need to remember is a factor to put here. And the factor actually in this particular case, you can guess by measuring the areas. And the factor turns out to be one half. So the upshot of this discussion is that actually this integral is equal to this integral, which you can easily evaluate. And that's a very good illustration of the power of this method of change variables. But now we have to address the question of how to calculate this factor, this factor, question mark factor, in the most general case. So that we will now obtain some universal formula, which will service both this example, this transformation, as well as that example of polar coordinates. And it will give us in this case the distortion factor of one half, and it will give us in this case the distortion factor of r, which we have already calculated before. So how to find the distortion factor? Well, for this, we simply have to compare the areas just the way I have compared here, but locally. Instead of globally, you just look at the areas on a very small scale in a small neighborhood of a point. In other words, instead of this whole thing, this whole image, comparing the area of the whole thing and this whole thing and dividing, you want to take the area here where the sides are some delta u and delta v, so that this area would be delta u times delta v. And you want to compare that to the area which you have in the real world. Which will be the area of the little piece of this region corresponding to this little rectangle. So let's draw this general picture. So we will have a small rectangle here from some u zero to u zero plus delta u. And here from v zero to v zero plus delta v. And then we'll take delta u and delta v to zero, so as we did before. And let's look at the image of this guy under this transformation. And it can become bigger or it can become smaller depending on what the transformation is. So I will draw it as if it becomes bigger just so that it's easier to draw. But in principle, it doesn't have to become bigger, it can become smaller. So in general, this rectangle is not going to be a rectangle, right? Because we know that in the polar coordinate system, a rectangle goes to the annulus or part of the annulus. So there is no reason to expect that even a small rectangle will go to a rectangle. It gets distorted in a certain way. And so it will sort of be close to a rectangle, but it will not be quite the same as a rectangle. So here is what it's going to look like in general. Where, what do I mean by this picture? I mean that say this side goes to this side, right? This side goes to this side, kind of to distinguish between them. And then let's use a different color for the other sides, for the vertical sides. So say this one will go here and this one will go to, will go here. So that's what happens to this rectangle under this transformation. And what we need to do is to calculate the area of this guy. We need to calculate this delta A, the area of this guy. The area here we know, it's delta U times delta V. We'll have to calculate this area as, as delta U times delta V times the factor. And that's exactly what we need. Then this will be the guy which will put, the factor which will put in the integral. So how to do this? Well, here again, we use one of the methods which we developed before, namely cross product. We know that areas can be calculated by using cross product. So what we're going to do is we're actually going to approximate this. I mean there's no way for us to calculate this area exactly. What we'll do is we will shift it slightly, we'll deform it slightly to make it into a parallel ground. By taking the tangent, by taking the tangent vectors here. So the old idea again is at work, which is that you're on a very small scale and we are at a very small scale, which is the point. On a very small scale, you can actually approximate smooth curves by their tangent lines. And so the areas will be very well approximated by the areas enclosed by those tangent lines. So in this, in the case at hand, it simply means that instead of this area of this curvy region, I will take the area of this rectangle. And so what is the area of this rectangle? So delta A will approximate by the area of the rectangle. And I don't want to get into too much detail here. So I will just give you the answer. If you want to trace all the steps, you can look in the book. It's explained in great detail. But basically, basically you need, once you talk about tangents, once you talk about tangents, you talk about derivatives. So what you'll need to do is you need to take derivatives of these functions. You have x is g of u v and y is h of u v. And so what you'll do is you will have r of u v, which would be g of u v, which would be like x times i plus y times j, which is g of u v i plus h of u v j. And this area of the parallelogram will be approximately equal to the following. It will be cross product, it will be the absolute value, the norm, the length of the cross product between r sub u of u zero v zero times delta u and r sub v of u zero v zero times delta u. So why it's exactly this? I will skip because I will not have time to finish. But I think you can see clearly the basic idea, something we've learned before. How do you find tangents? You find tangent by taking derivatives. And so that's, since I have replaced my rectangle, sorry, my kind of curved rectangle by the straight, sorry, my curved parallelogram by straight parallelogram, I use tangent lines. Because I use tangent lines, these vectors can be expressed in terms of partial derivatives of r with respect to u and v. So this is the first vector, this is the second vector, and I take the cross product. So if you want to know more how to get this formula, just look in the book. It's a very simple calculation. But once you get this, you can calculate very quickly the cross product by using the methods which we've developed. So you have this i, j, k. And then you're going to have d, dg, du, dh, du. And then you'll have dg, dv, dg, dv, dg, dv. Sorry, dg, dv, dh, dv. And then you have zero, zero. And then you have to take the absolute value of this. So this, and so you see that the only contribution will come from k, and it will be this determinant. So it's dg, du, this guy times this guy, dh, dv, minus dh, du, dg, dv. So you see, you have g and h, right? You have this formulas. So you kind of know from the beginning that there's a distortion factor will be given by some sort of derivative, or some combination of derivatives. So it's sort of natural to think in the following way. You've got two functions into variables. So you have four possible derivatives you can take. You can take two parts of derivative of this function, two parts of derivatives of this function. And then you have to assemble them in some way into a meaningful quantity. And that's how we assemble them. We assemble them into this two by two matrix and we take its determinant. So it's a really combination of those four partial derivatives. It was a very special combination. And what I claim is that that's exactly the factor. So the factor is sort of the distortion factor, which I denoted by this question mark is equal to this, dg d, well, let me write it. It's a little bit nicer to actually write it like this. dg du, but g is like x, right? So I can just write dx du and then h is like y, right? So I have x is g of uv and y is h of uv. So it's dx du, dy du, dx dv, dy dv. So you kind of assemble them in this way, where this is like x goes along the first column, y along the second column, u is in the first row and v in the second row. You can actually transpose these two factors. If you only can switch rows and columns, it's the same. So in the book, actually, I think it's written the other way, but it doesn't matter. And we will actually have a notation for this. It's like taking d of xy over d of uv. And this is called a Jacobian of this coordinate change. And that's the factor which you need to introduce. That's the distortion factor, because that's the area. You see that the area of this parallelogram, which approximates the physical area of the image of this guy, of this rectangle in the imaginary space, is equal to this factor times du, delta u, delta v. Whereas here, you have delta u, delta v. So what's the difference? What's the ratio between these two? The ratio is this factor. And we find this factor by using cross product, because that's how you find the areas of parallelograms. So you can appreciate again the kind of a nice, this is a nice technical tool. And then we end up with this formula. So let's see if indeed we are going to get what is expected, what we had expected on different grounds, slightly different grounds, in the two cases which we have discussed, the polar coordinates, and this problem which we talked about, the integral we talked about. So in the case of, I made a slight mistake here, which I forgot to write delta u, delta v. Because you had the factor of delta u and the factor of delta v. So I just pulled them out of the cross product. So they will appear here. So let's check. Suppose that you have r and theta. And you have g is r cosine theta, and h is r sine theta. So we have to take this derivative with respect to r. So we've got cosine theta. And then we take the respect to theta. So it's minus r sine theta. And then we've got here the roots of this function with respect to r, that's sine theta. And then the roots of this function with respect to theta. So that's r cosine theta. So we take this, this, minus this, this. So that's r times cosine squared theta plus sine squared theta, which is r, as expected. That's the distortion factor we had found earlier for the polar coordinate system. Right, and finally, let's calculate, and finally let's calculate the other one. So here we have x and y are given by this formulas. So what we need to do is, we need to take the derivative of this, of the first function with respect to u. So it's one half. With respect to v, it's one half. And the second function with respect to u, it's minus one half, with respect to v, one half. You calculate one quarter plus one quarter is one half, as promised, right? So there is one important point which I want to make and we will stop, which is that sometimes you'll get a negative number. So you always take the absolute value. The point is that we are not keeping track of orientation here, which we should have. In other words, you could switch u and v, for example, and this will make the two rows switched. And if you switch the rows, you'll get a negative sign. So in fact, if you're careless, which we are kind of careless, you might get a positive or negative answer. So the cure for this is you always put absolute value. That's the formula. The correct formula is always put absolute value at the end, so that the result is positive. All right, so I'll see you on Tuesday.