 Hey, how are you guys good? Did you have a good week? I'm good, yeah. But it looks like there are fewer of you. I hope we haven't lost anyone. Or maybe it's just the subject is too easy for some people. Well, we also have this wonderful resource. So for those watching online, welcome. But do come to visit us sometimes. All right, so we are talking about integrals, right? And I know that last week we discussed double integrals and triple integrals. And for double integrals, you talked about integration using polar coordinates. And so this is actually a very useful tool for integration that sometimes things simplify when you use some interesting stuff on the floor. When you use a different coordinate system, we saw that when we talked about as early as like a second, first or second week of the class. Hello. You guys are lacking in discipline after not having me for a week? I hope not. So remember that I'm really strict, but fair. So already at the very beginning we saw that our solutions simplify when we use polar coordinates, for example, in describing curves on the plane. And you saw last week that integration also simplifies. Double integrals simplify if you use polar coordinates. So now the next question is, what about triple integrals? Is there an analog of a polar coordinate system for triple integrals? And how can we use such a coordinate system to effectively evaluate triple integrals? And in fact, because now we are in three dimensions, there is more than one choice to make. There are more options. And there are two particular coordinate systems which are very convenient in three dimensions, which are called cylindrical and spherical coordinate systems. So we will discuss them in turn. First, we'll talk about cylindrical coordinate system. And cylindrical coordinate system is really just an off-shot of the polar coordinate system in two dimensions. In a way, we don't introduce anything new in triple integrals. We use the same tool, which we'll already use effectively in two dimensions. So the way it works is like this. The usual coordinate system, x, y, z, is replaced by another coordinate system where on the x, y plane, you use polar coordinates on the x, y plane. And we just add the z variable, the way we just added z to x and y. So the result is that instead of the x, y, z coordinate system, which we normally use, we pass through the coordinate system in which we have r, theta, and z. So x and y get replaced by r and theta in the same way as for polar coordinates. And z is just thrown in as an extra variable. So the formulas expressing these coordinates in terms of these new coordinates are exactly the same as for polars. They are r cosine theta and r sine theta. And then we have this z. And so z we have on both sides. And it's the same variable. So what is this coordinate system good for? This coordinate system is good for describing objects which are cylindrical. Well, hence the name. What do I mean by cylindrical? A cylinder in general is something which comes from an object on the x, y plane by kind of sweeping a surface by using, let's say, a curve on the x, y plane. So a cylinder itself is like that. We take a circle. And if we just move it up and down vertically, we sweep a surface. And that surface is what we normally call a cylinder. So the equation of the circle on the plane simplifies in polar coordinates. It's r equals r capital, where this is a number. And this is one of the variables, one of the coordinates in the polar coordinate system. And this number is just the radius of the circle. So in other words, it's a circle of radius r. So when we move it upside down, when we move it up and down like this along the z-axis, we create the surface in which the equation is the same in 3D. The same equation means that we also have an arbitrary value of z. And therefore, we get the cylinder, the cylinder of radius r. And so just like integrating on a plane in double integrals, it is beneficial to use polar coordinates in describing things related to the circle, or to the disk, or sectors of the disk, or annuli, and things like that. It is beneficial to use the cylindrical coordinate system for triple integrals in describing things, in integrating things related to cylinders, and various things that you can obtain from the cylinders. So what does the triple integral look like in cylindrical coordinates? There is an important point which we should not forget, which is that when we pass to a new coordinate system, there is some advantage, which is that some of the formulas simplify. But there is a price to pay for, which is that we have to insert an additional factor in the integral. So for polar coordinates, something that was discussed last week, if you have an integral of a function f, dA, you can write it as a double integral in polar coordinates, f of r and theta. But then instead of simply putting dr d theta, which you would normally put, you insert an additional factor, which is r. So you get r dr d theta, instead of the usual dx dy, which we would have in a normal coordinate system. What is the reason for this? Just to go over it one more time, because we will now see how it works for cylindrical and then for spherical coordinates. Everything boils down to the area of an elementary object with respect to this coordinate system. An elementary object is a rectangle, which you obtain by saying that x is, say, in this case, two coordinates, x and y, x between some fixed values, say x0 and x0 plus delta x. And y is between some fixed value and that value plus some increment delta y. For the xy coordinates, for the rectangular coordinate system, this inequalities describe a rectangle in which one of the sides is delta x and the other side is delta y. And so the area of this rectangle is simply delta x times delta y. And this is what gives us the expression for dA as dx dy. And so it leads to a description of the double integral as an iterated integral in x and then y, or first in y and then x by Fubini's theorem. But the key point is the area of the elementary rectangle, which is given by this formula. Now, when we pass to polar coordinates, the analog of this elementary rectangle is the following. We have to look at all points which are given by these inequalities, say r between r0 and r0 plus delta r and theta is between some fixed value, theta zero, and theta zero plus delta theta. And the picture will be different, right? Because this gives us a sector of angle delta theta. And so, and then the condition for r to be between r0 and r0 plus delta r, let's assume that this is r0, right? Just like I am assuming that this is theta zero. Of course, in this calculation, eventually you would like delta r and delta theta to become very small, whereas r0 and theta zero are fixed, right? But I'm just drawing this picture. I kind of magnify everything. So it looks like delta theta looks like as sort of the same magnitude as theta zero, but in fact, it should be much smaller. And so then if this is delta r, this, and this is confined within delta theta and the elementary object instead of this one, we get a kind of, it sort of looks like a rectangle, but not exactly because first of all, there's a certain angle here and these are not straight lines, but these are segments of a circle, right? So what's the area of this? The area of this one, actually we cannot, I mean, it will be, we can, but it will be different. It's not so easy, simple to calculate, give exact answer, but because we're going to take the limit anyway, eventually, we only need a sort of a good approximation to this. And what's the good approximation to this? We can think of this, we can think that when delta r and delta theta are very small, this will look like a rectangle with the sides delta r and what's the other side? Well, this actually has length r zero times delta theta. The segment of a circle of radius r zero confined within the angle delta theta is given by this formula, r zero times delta theta. And so we approximate this by the area of the rectangle with the sides delta r and r zero times delta theta. And the result of this is just a product of this. And we get r zero delta theta delta r. And so that's where, that's the r, which shows up in the formula for the integral. Here, I denote it by r zero because I wanted to emphasize that for calculating this particular area, I fix r zero, I fix this length, but when we do a general calculation, this will just become r and delta theta will get replaced by d theta and delta r by dr in the limit. And so that's how we end up with this formula. So this is the most, this is the only sort of non-trivial thing to remember about polar coordinates. Don't forget to put this factor r, which actually could be a good thing. I made it sound like it's a price to pay that we are being taxed for the convenience of using these coordinates but actually sometimes and oftentimes, this could be a good thing. And the typical example is, let's say you have an integral like this, something like one minus x squared minus y squared dx dy. So you see, this is complicated, right? This is actually something we discussed. It's kind of similar to something we discussed earlier. This is, this will be very difficult to take just as an integral in x and y. But when you pass to polar coordinates, this will become square. I'm not writing the limits, but I'm just sort of giving a rough sketch here. This becomes one minus r squared, right? And now we get this extra factor r and then we get dr d theta. And so you see this actually becomes a much better integral because I can introduce a new variable, let's say t, which is r squared. And if I do that, then dt becomes two times r dr. And then this actually gives me one half of dt. And this becomes a square root of one minus t instead of one minus r squared. And this is much easier to calculate, right? Because the antiderivative of this is just a one minus t to the power three halves times two-third, minus two-third, right? Whereas for this one, it's much more complicated. Well, imagine if it was like exponential function or something, so then it becomes even worse, right? So sometimes actually having this factor actually works to our advantage. But in any case, we have to remember to insert it to get the right answer. Now, so this was all about the polar coordinates. But cylindrical are not that far away, not that far apart because for cylindrical, the only thing that changes is that we now throw in an extra variable, variable z, so we add the variable z. And now instead of a double integral, we have a triple integral over some solid, some region in a three-dimensional space. And so we have some FDA, where this DA usually in the normal, in the Cartesian coordinate system, we simply write as dx, dy, dz, right? But now, if we wanna use polar coordinate system, we'll have to write this function as a function of r theta and z. And then we'll have to write dr, d theta, dz. And the question is what should we put in front? There has to be some factor. And that factor is a factor responsible for the area of the elementary domain like this. In the usual coordinate system, in the three-dimensional space, when I say usual, I mean Cartesian coordinate system. The elementary object is a box of sides delta x, delta y, and delta z, right? So it's, actually no one corrected me. What is it, what is the mistake here? dv, that's right. See, I'm a little rusty after a break, but do correct me when I make these mistakes. So dv, because we emphasize that this is the elementary volume. It's volume, it's not area anymore. The a, of course, was for area, and v is for volume. So the elementary volume for this guy is just delta x, delta y, delta z, which gives rise to dx, dy, dz in the integral and allows us to calculate this integral as an iterative integral, first x, then y, then z, or any other order that you choose. But now we choose this coordinate system, and so we have to be careful. We have to now look at the elementary object in this coordinate system. And what is this elementary object? Well, we just define it in the same way as before, by simply, I shouldn't have done it this way. I'm actually jumping ahead. Let's just do it like this. It really should be cylindrical, so it should be like this. So it is, in a way, it's what you get by combining the two things. In this phase, this side of this object looks like this, why is it called cylindrical? Because this is a cylinder, right? He saved you, by the way, because I was kind of approaching to count how many seconds it will take for you to notice me, but he saved you, so you should thank him. So the cylindrical is called because you see the, you make a change on the x, y plane, and then you just throw in the z variable. In other words, you change the coordinates just on the x, y plane, and then you kind of let the third variable the same as before. So it's the same idea as the idea for, say, taking the circle, and kind of just moving it up and down to get this object. No, no, no, the circle is fixed, right? It doesn't grow. It doesn't, the radius of the circle is fixed. It's this r-capital. Just think of a ring which is made of metal or something, and you just move it up and down vertically along the parallel to the z-axis, right? So what's the result? You sweep a surface which is the surface of the cylinder. You can only use it for cylinders. No, you don't use it only for cylinders, but, well, what's in a name? You know, it's a name, so it is derived from this, right? But it's not supposed to explain everything we can do with these coordinate systems. Any other questions? So what's the elementary volume of this? Well, we already know the approximate area of this that's r dr r delta r delta theta. And we know that this is delta z. And so the volume is r dr delta, sorry, r delta r delta theta delta z. So it's the same r which we had, or maybe if you want r zero, if you want this to be r zero. The same r which we had in the calculation of the polar coordinates. So the bottom line is this factor is exactly the same as in the polar coordinate system. It's not more complicated. Okay, so that's the formula we're going to use. And now let's do an example. Let's do an example. So evaluate triple integral over e of the function e to the z where e is enclosed by the parabola of it. z equals one plus x squared plus y squared. The cylinder x squared plus y squared equals five and the xy plane. So actually let me get, let me draw a bigger picture. So the paraboloid looks, what does the paraboloid look like? It starts at the point one on the z axis and it opens up like this, right? And the cylinder is okay, I just erased it. So that's the cylinder. Let's assume that this is radius. This is going to be radius square root of five, right? Because we have five is the square of the radius, as always. So the radius itself is square root of five. And so that's the circle at the base of the cylinder. And we want the figure which is a solid which is confined by this, by the paraboloid, by the cylinder and by the xy plane. So it is the inside of this. So it's kind of a concave, the surface is kind of concave, it goes inside, right? It's like a fancy glass. So what we need to do is to calculate the integral over this. This is our region, e, all the function e to the z. So when you do triple integrals, you have to, so then you have to write it as an iterated integral, okay? So you have to choose in which order you're going to integrate. So you're going to end up with an integral, so you have e to the z. Here actually z is one of the variables, so we just write it like this, this is good, right? Because z is one of the variables in the new cylindrical system. And then you're going to have the r, let me emphasize this r again. That's the same r as before. And then we have r dr, d theta, and d z. So now you want to write it as an iterated integral. So you have to choose in which order to integrate. So what's the best way to do it? For this cylindrical coordinate system, it's always, you see the point is that you have to choose what the base of this, actually this is a general approach to when you have to choose the order. You have to see whether what's a good projection of your object, is there a good projection on to say x, y plane, or y, z plane, or z, x plane? That's the first question. And once you have a good projection, everything projects onto something nicely, right? So in this particular case, it certainly does project nicely onto the x, y plane. It projects just onto the disk, onto d, which is r less than or equal to square root of five. The disk over radius square root of five, right? So that's this yellow. Let's draw it with yellow. And then for each point in this disk, we'll have to integrate. So first of all, we'll have to integrate over the disk. And this will be the, this is, I'm talking about the outer integration. I'm starting from outside, right? When you project onto this, you are choosing the first two variables, which normally, if we were using x and y and z coordinates, that would be integrating first x and y. It's, then you decide, you decide between x and y later, but first we choose the first two. And then you choose which one goes first, right? So that's the strategy which I proposed that you're going to end up with three different integrations, right? So the last one will be the integration over the remaining variable with respect to this projection. So here I project onto the x, y plane, so this will be d z. But let's now see what happens here. So this is going to be in the usual coordinate system in the Cartesian coordinate system. This would have been just dx dy, which we would then have to decide dx dy or dy dx. And once you decide, then in the last integration, you have the freedom to choose what x and y are. So that means that you have a point here, x, y inside. And then the limits will be, the limits you have to sort of draw the segment starting from the bottom of this, of this object to the top of this object, which in this case, is this which is part of the x, y plane to this paraboloid. And you would have to integrate, in the last integration, you would have to integrate from the bottom value to the top value, which in this particular case, what does it mean? The z goes from zero, right, to this value. But what is this value? This value is going to be one plus, this is going to be the value of z on the paraboloid. So that in the Cartesian coordinate system, this would have been one plus x squared plus y squared. But now we're replacing this with r squared. So because we are doing the integral in the polar coordinate system, we will actually write it as one plus r squared, where it is understood that r squared comprises x squared and y squared. The sum of x squared and y squared. Yes? That's right. Well, up and down because I have chosen the projection onto the xy plane, right? So the way I suggest to the integral is the following. First, let's choose the two outer integrations, the first and the second, right? So geometrically it means that you are projecting your three-dimensional region, three-dimensional solid, onto one of the planes, one of the coordinate planes. I'm talking now about really the Cartesian coordinate system, but the cylindrical coordinate system is not that far away from the Cartesian, so the same analysis sort of applies here. So the projection here is going to be the disk, right? But in general it could be square, it could be something else. So that will be taken care of by these two integrations, by the limits here. That's right, the projection goes in those two. And the inner integral is the remaining variable, which in this case is z. So to put the limits here, you have to take one of the points in the projection, in the image of the projection, which is this point, say, x, y, which actually, because we are doing polar coordinates, or cylindrical coordinates, this would have to be recorded as r theta, right? So this point will be r theta. And we'll have to take the segment along the third variable, which is the z variable going from the bottom to the top, from the bottom lid to the top lid of this figure, of this region, which as I explained, the bottom is on the x, y plane, so the z is equal to zero at the bottom. And at the top, we have to look at the equation of the paraboloid, it's one plus x squared plus y squared, which because we are working with cylindrical coordinates, will be written as one plus r squared, okay? Let me finish the integral, and then you ask me if you have more questions. So then what remains to be done? What remains to be done is that we have to put also here, r and theta. So we have to choose some order in which we will do r and theta. So let's say we put here dr. And put here d theta. Because now we are actually, see, once we are here in these two outer integrals, we are actually doing a double integral. We are deciding how to split the double integral into iterated integral. So, and what we are working with is already the image of this three-dimensional object onto the x, y plane, which is nothing but the disk, right? So for the disk, we know what the limits are. First of all, we know that it doesn't matter in which order to take r and theta. And second of all, we know that r goes from zero to the radius, which is in this case, square root of five, and theta goes from zero to two pi. That's because the disk, this disk is described by, well, I don't even have to write one more time. I just have to add here theta from zero to two pi. And finally, we should not forget to put the function, which is e to the z, and we should not forget to put this factor r. So I'm introducing a slightly different notation from before, right? Normally, we would write this as e to the z times r times dr d theta, and then we put sort of brackets, and we think about integrating first this with respect to r, and then this with respect to theta, and then, sorry, integrating this with respect to z, and this with respect to theta, and this with respect to r. But I'm writing it in this way, which I think is a little bit more suggestive, that you write the dr, the d theta, d z, the d of the variable you're integrating right next to the integral, so you remember which one it is. You see, because in the old way, you would have to put dr the last one, right? So the last one will get paired with the first integral, the next to last will get paired with the second integral, and so on. This way, it's a little bit more intuitive, so I prefer to write it in this way, but you can choose whichever way you like, but I hope that it's clear what I mean. Well, this certainly is not clear, because it says on to, and then it says zero, so let me raise it here, and I write on to, like this. I think now it should be clear. Okay, any questions about this? No? Yes? That's right. So in fact, I could have put r all the way here. Right. Oh yeah, yeah, yeah, yeah, you're right, you're right, you're right, you're right. Right, so I actually did it in the wrong order. So this, did I do it in the wrong order? No, hold on. No, the order of course matters, because see the point is that, no, no, I did it correctly. Who thinks that I did it correctly? Who thinks that I didn't do it correctly? Okay, you guys failed the course, no. No. No. We are here to find the truth, you know? So I, but see, here's the way, I thought about it this afternoon actually, and I convinced myself this is right. But see, here is the point, the point is, so the point is that we are, let me, this is actually a very, it could be very confusing, so let's actually do it slowly. You should not worry so much about the fact that here there is a dependence on r in the inner integral. What you should worry about is the fact that there is a dependence on r in the limit. So you certainly don't want to put this outside. You see, because you want to end up with a number, okay? In other words, we can disagree on many things, but there is one thing we should certainly agree on, which is that the integral is a number, okay? It should not depend on r, it should not depend on theta, it should not depend on anything, it's a number. You cannot possibly get a number if the last integration has a limit which depends on the variable, okay? So it's not gonna work. But more conceptually, the way I'd like to think about this is as follows. And I would like to think maybe in a slightly, you know, it could be some more complicated domain. So what I'm doing is I'm projecting, so there is some E. And let's say I want to project it onto the XY plane. So right now, let's talk about just the Cartesian coordinate system. Let's not worry for now about cylindrical and spherical. Even in the Cartesian coordinate system, the way I would like to think about integration is as follows. That I have a region in a three-dimensional space, right? And what I do is I project it onto the XY variable. So now, if I have a triple integral over E, where I have FdV, first of all, I split it like this. It's going to be a double integral over D, over this D. All of the single integral with respect to the remaining variable. You see, where for each X and Y in D, for each X and Y in D, you will have some lower limit. Let's say it L of XY, and you'll have some upper limit, U of XY. So that's what it's going to look like, yes? So then I would just write like, oh, and here, yeah, that's right. So then here I would put DA, like this. Yes? That's right. In the old way. So you want me to write this in the old way? Okay. So this, in the old way, would be zero to square root of five. Zero to two pi, zero to one plus R squared, right? E to the Z, ZZ, D theta, DR. Oh, I'm sorry, RDR. Yes, very good. Thank you. See, because it's red, so I didn't see it. RDR. Well, usually we'd write RDR, yeah, RDR, okay, fine, whatever, we can put R inside here, maybe it's better to kind of keep track, okay? So then normally we would put brackets like this. Is that okay? Does it make sense? So what I'm doing is just I'm trying to avoid using the brackets and instead just putting the differentials right next to the integral. So it becomes a little bit more clear to me anyway. But you are free to use whichever way you like. So this is sort of a new way to write and the old way to write would be, it's almost the same, DA over D. But the main point which I would like to make is that the first two integrations in the formula. See, it's very confusing because when I say the first integration, do I mean the first integral or do I mean the actual integration you perform? This is the opposite, right? The first integral you write is the last one. It's the last integral you write is the first you calculate. That's right, that's right. So this is the outer, the outer is written first. So that's why it goes last, you see? So you have to figure this out on your own, I guess. At some point you just have to think about it and have a clear picture because like I said, it's very confusing. What do you call first? What do you call second? Who's on first? Right, so the last integration, the last integration is the outer one and the last integration corresponds to the projection of your three dimensional region onto the plane, okay, that's the point. All right, so having established that, let's evaluate finally this integral. So what do we get? We get zero squared five and then here we get r times e to the one plus r squared minus one, right? Then you get dr. This integration just gives you two pi because the integrand does not depend on theta, so you just get two pi times r e to the one plus r squared minus one and finally you integrate over r and so here you want to use, you want to change variables. So I'll just write the answer. So you get two pi is an overall factor and then you get one half e to the one plus r squared minus one half r squared between zero and square root of five, right? And so the answer is two pi times e to the six minus e minus five, one half. Well, because one half and two get canceled, so you get e to the six minus e and this guy gives you five, right? So that's correct, okay? Yes? It's pi, that's right, so like this, thanks. Okay, cool. So we're good with this? Yes? Is it universally accepted that, are you talking about this formula or this formula? This? You mean this integral? Yes? But I'm not sure I understand what the question is. Which line, first of all, this one or this? This one, yes? Here, are you talking about the left-hand side or the right-hand side, sorry? The question is, is it okay to put dr before the function of r? Oh, okay. The answer is yes, it is okay. I am suggesting this notation. In the book, it's not used, right? But as a practicing mathematician, I can assure you that a lot of people use that. It is certainly interchangeable. They do commute, in other words. It doesn't matter in which order you write them. It's a more interesting point whether these guys commute, you know, whether it is important how you write dr d theta or d theta dr. This is a much more subtle point, which I'm not going to get into too much. But certainly dr, you can put on the left or on the right of the function of r. So that's, no worries here. Okay, let's move on. So the next one is called spherical coordinates, and it's a little bit more interesting. Sorry, spherical coordinates. And of course, the question is right away. Why are they called the spherical coordinates? Because they should remind you of a sphere, okay? As you will see. So let me actually keep this, let me keep this picture. So spherical coordinates work in the following way. Suppose you want to invent a coordinate system in which the sphere, it is a sphere which gets the simplest possible equation. You see? So in the cylindrical coordinate system, it is a circle that gets the, say in a polar coordinate system, it is a circle which gets the simplest equation. R equals a constant. That's a circle of a given radius. In the cylindrical coordinate system, the simplest equation is the equation for the cylinder. Okay? R is a circle in polar coordinates because R is a cylinder in the cylindrical coordinate system, cylindrical in 3D, this is in 2D. And now I want to have some variable rho such that this equation will give me a sphere. And that's called a spherical coordinate system. And that's in 3D. So that means that this rho should really be the distance from the origin of my coordinate system to my point because the sphere, well, sphere was the center at the origin. The sphere was the center of the origin of radius R capital, this one, is going to be the set of all points such that the distance from the origin to my point is given by this number R. Let's say square root of five, like in the previous example. Okay? So note that this is not the same as R in the cylindrical coordinate system because R in the cylindrical coordinate system is not the distance from the origin to this, but rather it's a distance from the origin to the projection of my point onto the xy plane. So that's not the same thing, right? So you see right away that this is not the same coordinate system and sure enough, this simplest equation for rho equals a constant describes not a cylinder, but a sphere, okay? But now, so now I got the first variable of my spherical coordinate system, but that's not enough. I need three variables, right? Because I'm in three dimensional space. So I need to complete this rho by two additional variables, two additional degrees of freedom, if you will, so that I could give each point a unique address by using those three coordinates. What are they? So the standard, there are different ways actually to do it but the standard convention which we are using in this class and in this book is the following, that we measure two angles. In addition to rho, we measure two angles and the first angle is exactly the same as before, it's theta. It's the theta of the cylindrical or polar coordinate system, okay? And so we need one more and we find this one more by measuring this angle and we call this phi. So the sphere of the coordinate system is three coordinates, rho, phi and theta, where only one of them is part of the cylindrical coordinate system. This theta is part of the cylindrical coordinate system. But the others are new, okay? So by the way, notationally, phi sometimes is also is written like this. It's the same thing. So I find it easier to write phi like this but when you type, for example, and in the book it's written like this. So you can use whichever notation you like. So rho, phi and theta. The first step, of course, is to express the usual coordinates, the Cartesian coordinates in terms of rho, phi and theta and to see that indeed these coordinates are determined the points in space and also to see what the ranges are. So what is the formula? Well, what we can do is, we can use the old formula, which is r cosine theta and then note that r is equal to rho this is equal to rho times the sine of this angle. See the point is that this has the right angle. This is a triangle. This is a triangle which has the right angle and this is phi. So you can find this distance which is r of the cylindrical coordinate system by taking rho and multiplying by the sine of this angle. So this is rho times sine of phi. And now I substitute this in here and I get rho sine phi cosine theta. Yes. Which axis is phi measured from? It's measured from z, right? So I did not put labels but I should. Yeah, it's x, y, z, standard y. Another question. Rho does not belong to any plane, a priori. It's in space somewhere, right? It's just, I have a point, it kind of, it flows around, like this, right? Wiggles around, it's not, it doesn't belong to any particular plane. It's free to move, right? Because our point is free to move in three space and so the segment connecting our point to the origin, it does not necessarily belong to any plane. Which one? This triangle. It has the right angle here because this is the projection. I don't know if it looks like a projection. It looks a little bit, it's a little bit crooked, I guess. It should be a little bit more parallel to the z plane than what I made it look like. Is that better? Slightly, okay? So this is a perpendicular, which we draw from this point, or our point, this is our point. We drop it onto the x-y plane. So I guess the rest of this should be clear. Any other questions? Yes? That's right, theta always taken from the x-axis. For the projection. Everything is a little bit not straight on this picture. So this is R, this is old R, which is not, this R is not part of the spherical coordinate system, it's part of the cylindrical coordinate system. The reason I have drawn it, I have written it here, put this label, is to make a connection between the spherical and the cylindrical coordinates. And also to simplify the derivation of the formula for x, y, and z, because I do it in two steps. I first recall the formula for the cylindrical coordinates, which is really the same as for polar coordinates, and then I just substitute R equals rho sine phi. And then I do the same for the y variable, and then z is, what is z? To find z, we have to complete this to rectangle. I'm sorry? It should be sine theta, that's right. Thank you. All right, and to find z, I have to use another right triangle, which is this one. Yes, again I didn't draw it very well. Okay, so this is the right triangle, this is phi. So z is rho times cosine phi. So if you visualize this picture, you see that you don't have to memorize or write on your cheat sheet the formulas for the spherical coordinates, very easy. You have to remember the polar coordinates of course, but I mean, if you don't remember polar coordinates, then it's like remembering your phone number in some sense, I think. So if you remember polar coordinates, then the spherical coordinates are very easy just by using, by memorizing this picture, visualizing this picture. Okay, what are the ranges? So rho is like r, rho is a non-negative number. Although for r, if you remember, we had a certain convention in polar coordinates, we sometimes allowed r to be negative, but in the spherical coordinate system, that would make things too complicated, so we don't do that. So rho is non-negative. Theta is just like in a polar coordinate system or in the cylindrical, it's between zero and two pi. And what about phi? What are the ranges for phi? Zero and pi, exactly, because you can go, so if this is a vertical, this is a vertical, the z-axis, you can go all the way down to pi, but if you go more than pi, then you can sort of approach it from a different direction and it will be less, from that direction will be less than pi. So that's what we do. So it's going to be from zero to pi. You see what I mean? Yes? That's right, from the vertical. So in other words, what I'm saying is, let's say, so this is z-axis and this is the origin. So you have a, let's suppose that our point actually lives on the y-z plane. So, and let's start rotating it. So this is phi, for this point. This is phi, for this point. This is phi, for this point. Still less than pi, right? So we get here, it's still, I mean, what I'm trying to say is this, this, this, this, right? We measure angle from here. But finally, when we go like this, we should not measure it like this, but we should measure it this way. You see what I mean? So this is wrong, and this is right. This is phi. So you choose whichever is shorter, which is smaller, and that's going to always be between zero and pi. So pi would be this. This is pi, which is points on the negative. Phi equals pi corresponds to points on the negative part of the z-axis. Did you have a question? Now, what are these coordinates good for? Well, the first answer has already been given in this coordinate system. It's much easier to describe the sphere. So the sphere is now given by the equation rho equals r. Instead of x squared plus y squared plus z squared equals r squared of the Cartesian coordinate system, or r squared plus z squared equals r squared of the cylindrical coordinates. It's just as simple as possible equation, rho equals the constant. So that's in a way justification for using this coordinate system and for the name. But that's not the only object which has a nice representation in this coordinate system. We can also represent a cone by the equation phi equals some fixed angle phi zero. So that's the cone. Let's look at this picture again. So let's suppose I fix some phi. I fix phi and I look at all the points which have a given angle like this, phi zero fixed to the z axis. So then it's like, this is a z axis and my point is like this. I don't know. I don't have enough visual aids. So I have to trust your imagination and your intuition. Maybe like this is better. I don't know. So the point is that this is the angle. So the angle is fixed. So it has to be the same angle between your points and the same z axis. So the result is a cone. And because I don't specify what rho is, I don't specify the distance. It can go as far away as I want. So it's an infinite cone, kind of upper cone going to infinity, right? So it's not bounded, unbounded cone. So don't think that I just drew one level curve for it but it goes to infinity. So the cone is given by this formula which is again much simpler than z equals square root of x squared plus y squared of the Cartesian coordinate system or z equals r of the cylindrical coordinate system, which is not so bad, but this is better. This is easier to handle. So these are the things you should remember. The cone and the sphere have a very nice expression in terms of this coordinate system. Now what about integration? What about integration in the spherical coordinate system? So once again, we have to figure out what is the volume of the elementary object with respect to the spherical coordinate system, we see. So these are the elementary objects for the Cartesian and the cylindrical coordinate systems which give us the usual form of dx, dy, dz and r dr, d theta, dz. So now we have to do exactly the same for the spherical coordinate system. So what is the elementary object now? And again, by elementary object, I mean simply that you impose the condition that rho is between some rho zero and rho zero plus delta rho. And what was my second variable, phi. Phi is between phi zero and phi zero plus delta phi and theta is between some theta zero and theta zero plus delta theta. So let's draw this, an object which corresponds to this inequalities. Like this, like this, like this, like this. Well, this whole thing should be kind of dotted line. Okay, and like this, and like this. Okay, you see what I mean? This, well, in fact, I can do it like this. Maybe it's better. So here, what happens here? First of all, this is delta phi, right? This is my, this is rho zero. So this thing is actually between two spheres. Imagine two spheres which have very close radii, very similar radii. So this is something which is between those spheres. And it's, first of all, we cut it by saying that the angle goes between, you know, is confined within delta phi. And also, when we project this down onto the xy plane, when we project this down onto the xy plane, this angle, I'm not going to draw it all the way for the projection is going to be delta theta. So this is a projection onto xy plane, you see? So now I have to evaluate the volume of this, just like I have to evaluate the volume of this and of this in my other coordinate systems. So what is it like? What is this volume equal to? Well, we don't calculate it exactly, we approximate it, and we approximate it by the volume of the cube, sorry, not the cube, but a box, a box whose sides are given by the lengths of this, this kind of circular segments. There are going to be all circular segments, okay? So this one is very easy to find. Well, first of all, this one is very easy to find. This is just delta rho. This is just delta rho. That's one side, okay? Now this one, this one is also easy to find. This is, you see, this is rho zero, and the angle here is delta phi. So this is rho times delta phi. It's similar to the way we found that to be r zero times delta theta. So it remains to find this one, which I guess you cannot see this color, right? Actually it's better than the one, it's kind of greenish. Can you see this one? Yeah, all good. Okay, so this one is a tricky one because it would be tempted to take rho zero times delta theta, but this is not correct. So this is only one, there is only one subtle point here. The point is that this is the same as this. In other words, this actually is not, this is not part of a circle of radius rho zero and confined within the angle delta theta. On the contrary, it is actually part of a circle on the xy plane, but the radius is not, the radius of that circle is this, which is not rho zero, but it is r. It is rho zero times sine phi. So that's the only point that you have to realize to get the right answer. And so, and then you've got delta theta, trying to draw this, like this. This is on the xy plane. And so this segment is actually, its length is rho zero times sine phi delta theta, okay? So the answer is, for the volume, it's approximated by rho zero sine phi delta theta times delta rho times delta, times rho zero again, this is rho zero really, and times delta phi, yes? I'm trying to calculate the volume of this, right? And I am approximating it by the volume of a box, like this, which has the following sides. This side is rho zero sine phi delta theta, that's this. Times delta rho, which is this side, times rho zero times delta phi is the yellow side. So the end result is rho zero squared sine phi times delta rho delta phi delta theta, okay? So the upshot of this is that when you compute a triple integral in spherical coordinates, you have to introduce the factor rho squared times sine phi. So it's a little bit more complicated than for cylindrical and polar coordinates. So the triple integral over some solid is theta rho times, let's write it, rho squared sine phi, well, since I wrote it in red before, let me write it in red again. A rho squared sine phi, that's the factor to remember, d rho d phi d theta. Okay? So we do this calculation once and for all, then we just memorize it, rho squared times sine phi. And after that, we can do this triple integrals by using iterated integrals for these three variables, rho, phi, and theta. Let's see how it works in practice. So here's an example. Compute the integral of x squared plus y squared plus z squared dv where e, the region, e is bounded by the xz plane and the spheres. x squared plus y squared plus z squared equals nine and x squared plus y squared plus z squared equals 16. So between two spheres and also the xz plane. So first of all, I have to say, it's a general comment. I often say on the next week we'll have a midterm. On the midterm, I will not tell you which coordinate system to use, right? You have to decide yourself. So the question is, you have to look for clues. Which coordinate system? Spherical, cylindrical. You have to remember one thing, that this expression x squared plus y squared plus z squared simplifies in the spherical coordinate system. So if you see x squared plus y squared plus z squared, how many times? One, two, three times chances are it's best to use in this case a spherical coordinate system. You see what I mean? Because this is rho squared, right? This is rho squared. If you see x squared plus y squared, that's r squared, r being the r of the polar or cylindrical coordinates. That's how you know that you probably should do use polar coordinates or cylindrical coordinates, depending whether you are doing a two-dimensional, double integral or three-dimensional, triple integral. But in this case it's fairly clear that you'd be better off using spherical coordinates. Now, we can try to visualize this. We can try to visualize this. Think of a sphere, first of all. Let me draw just a quarter of this picture. Actually, yeah, about a quarter. So that's a part of the sphere. This is a sphere of radius three, because nine is three squared, right? And this is a sphere of radius four, because 16 is four squared. So let's say this is a sphere of radius three. And then this is the inner sphere. And then there is an outer sphere, which has radius four. So see, this one is inside the other. And what you are looking for is, what you want to look at is the three-dimensional shell, which is in between the two, in between these two spheres. It's like an analyst, but three-dimensional. Analyst is between two circles, and this is between two spheres. And also you have to bind, the other bound is the XZ plane. So this is the XZ plane. So actually, that's not the whole thing. This is one quarter of the whole thing, because you will also have something in this quadrant, and in those two quadrants, which are behind the ZY plane. So this is one quarter, so to speak, of the picture. But if I try to draw the whole picture, it will be more confusing. So you just have to draw the same thing, but three more times. And that's what you need to calculate. Now, actually here, the way it's phrased, it sounds almost as though it is ambiguously defined, because it doesn't say on which side of the XZ plane. It could be on this, I draw it on this side, where Y is positive, but it doesn't say that. So in principle, I could also look at the other half. But the point is that the answer does not depend on which half you choose. Because the function which you use, the function that you use, does not change if you flip Y, if you replace Y by negative Y. So if that were not the case, the problem would not be well-defined, would not have been well-defined. But actually it is well-defined because the answer is the same, no matter on which side of the XZ plane you look. Okay? Now, to compute this, you write, see, this is one case, this is one coordinate system where you cannot so easily visualize the way I explained in the previous discussion for cylindrical and Cartesian coordinates, where I was talking about projection. Because these coordinates do not involve any of the variables of the Cartesian coordinate system. It does not involve X, it does not involve Y, it does not involve Z. So you have to be a little bit, use your imagination, and you have to just try to describe this by inequalities in the coordinate of the spherical coordinate system. So the inequalities will be in this case rho is between three and four, we know this, right? Then what about phi? Well, phi actually can be anything from zero to pi. Takes the maximum range. And then you have to, the condition is on theta. If there was no condition about the XZ plane, if we didn't say that, if the problem didn't say that one of the bounds was the ZX plane, we would write that theta is between zero and two pi, which is the maximum possible value, right? This is the total range of theta. But because we are bounded by XZ plane, that means that theta can go from zero to only up to here, but it cannot go further because we are on this side. You see what I mean? So that means that theta actually goes from zero to pi. And that's what this extra bound gives you, right? So these are the ranges. And so actually in the spherical coordinate system, this very complicated domain looks very simple, right? It looks like a box. It looks like a box. And so the integral that you get describing this triple integral is actually going to be the simplest possible triple integral with respect to this coordinate system. And you can choose any order you like for the integration because the bounds do not depend on other variables. You see, they are fixed. So it is like the basic integral, yes? Very good question. Is it going to be like this in all coordinates, in all, for all problems for spherical coordinate system or just for this one? Just for this one, of course, because you can imagine more complicated domains in which the bounds will depend on other variables, right? So I'm just giving the simplest possible example, okay? So here you're going to have say rho from three to four and then phi from zero to pi and theta from zero to pi. And then you don't forget your function, which is rho squared. And don't forget the extra factor, which is rho squared, this one, rho squared sine phi. So times rho squared sine phi, d theta d phi d rho, rho squared sine phi. Huh, sorry? Why is it rho squared times rho squared? It's called rho. So that's actually a good question on the midterm would be, what is this variable called? You know? And so if you write for p for this, then you get the point deducted. So this is rho, right? Anyway, so this rho squared comes from the integrand, which is x squared plus y squared plus z squared, which is rho squared. And this rho squared comes from the extra factor. So the net effect is that you got rho to the fourth, sine phi. So then you get a very simple manageable integral, okay? I'm sorry? Hold on, hold on, there's one minute left. Yes, one again? Rho squared sine phi is always there and then you have the function, okay? So we'll continue on Thursday.