 with the max min stuff. So I'll remind you that last time when we have some functions, r in to r, I want to find the max min, and that tells us that points for the gradient is just zero vector, right? So here are critical points. This is what we did last time. That might be, they might, so those are our extremities. If we're over a finite range, then we have to look at the edges too. And if we have, if we have some strings, like so, g, let's just say, from r in to rm, then we can either solve some of the variables and plug in or use the run. This is what I did last time. It's used in your homework. That's where it's at. So, right? We're okay with this? If anybody has any clue what I'm talking about, no clue. Some clue, some variation. Okay, so that's what we did last time. And the one thing if you think back to, so usually in, well, you actually, in single variable calculus, you have a few problems like this sometimes where you want to make a box with a square of, you know, blah, blah, blah, blah, and you could do those kind of functions. And you just do this method. And really what we're saying, I'll draw any variables. What this is saying, I have some function f and then my constraints g may be correspond to some other function g. And g equals a constant means I'm looking at a level set of this. And so either I solve and I get instead this curve and I try and maximize that's supposed to be this. I try and find the highest point on this curve here. Or I can use Lagrange multipliers which is telling me that I want to look at the gradient of f where the gradient of f and the gradient of g align corresponds to looking at the level curves of g along f and finding the maximum that way. Right? They're sort of the same but there are two different ways of looking at the same problem. Anyway, we did that. I'm putting it away. So then one other thing that, so in one variable, we have the question say when I want to find critical points of some function f, or maybe there's one here. That one doesn't look critical so I guess it's not here, here. Then we have a second derivative test. So we can find this where f prime is zero and then either we can determine whether it's a max or a min by saying well at this point everything's lower or at this point everything's higher or at this point it goes up and down. Right? This is sort of a first derivative test or just a local analysis. So one way to classify our critical points, let's call it x naught, x1, x2, here either we look at, look at, it's no better, f near one of these guys to decide whether it's going up or down or we can use the second derivative test to classify as to whether they're local min or max. So let me remind you of the second derivative test. It says that if f prime of x naught is zero then we have three possibilities and f is nice. Then we have this case, f double prime of x naught is positive. This means it's a local min. We have this case of f double. Can you even see this? I can see it in here. F double prime of x naught negative. This means we have a local max and then you have f double prime of x naught equal to zero. Right? If you remember this from single variable calculus, no. Many people have never seen these little faces before. Yeah, the little faces. See, this guy is a local min and he's happy. This guy is a local max and he's sad. This guy, he doesn't know what's going on. Okay, so anyway, this is how I remember the second derivative test. Little faces. But you know what you think about this. Concave up, concave down, can't really tell. I mean, I suppose instead of drawing a sprinkling thing. Okay, so I want to talk about an analog of the second derivative test for a function of several variables. So now we have some function a, a good one. Some function f from r, n, r. And we have a critical point. So let's say this has come continuously differentiable with a twice. So the derivatives are differentiable continuously. And I have a critical point, gradient of f at some point x naught is a zero vector. So I have a critical point there. So I want to think about, you know, what is the analog of the second derivative test? And let's, let me just draw it into variables, but it works in higher variables. Well, the second derivative test looks at the concavity. And so if I have a local min, then I concave up no matter how I slice this thing open. So if I slice it anywhere, there's no color there, okay? So if I slice this bowl shape anywhere in any direction or in every direction, then near x naught, I should see something that is concave up. And so, so in any direction u, so this is my direction u, then it should be concave up. So then if I have, so if the slice is concave up, then this should mean I have a min. And if the slice is concave down, then I should have a max. And it's, so this is not just this slice, but all slices are, all slices are. And if the slice changes, so if some are concave up, some concave down, then I have a set. So that is I have something that goes up this way and down this way here. If I slice it this way, I get something like that, but if I slice it this way, I get something like that, then I have a set. Right? So this is sort of second derivative test in many ways. But the thing to notice is who we do is we slice the thing open and we look at all the possible ways of slicing. Now this is NRN, so maybe if I'm looking at a function of three variables, right? I have to slice it in all the various different directions that I can go. But every time I slice it, I'm really looking at f restricted to that direction. So now let's, is this clear? And if some slices go up and some slices go down, then we know we have a saddle type thing. If they all go up, then we know we have a minimum. I guess I didn't draw this case. If they all go down, then we know we have a maximum. There's another situation where maybe somewhere it's flat, then we just don't know. Right? So we have these three cases, and if some slices, okay, yeah, you have a question. So what do I mean by a slice? Right. I mean, this is just a, this is not, I mean, this is math, but this is not formal yet. This is not something you can actually do until you take this idea, oh, and now we want to put it into practice. But this is how you can think about the idea, and now you need to make the idea right. So back in taking a step back from the course, this is usually how people how mathematicians think of math. You get some geometric idea in your head of work, maybe not necessarily geometric, but you get some intuition about the problem. And now we codify this intuition into something that we can actually do. So let's have different kinds of saddles. Yeah, sure. So suppose I take something like x squared plus y squared minus z squared. This is my function f of x, y, z. Well, I can't draw a picture of it because it's a function of three variables to graph. If I'm going to draw it, it lives in R4. But if I fix one of the variables, so for example if I fix, well, so consider some of the slices here. So if I fix x and y, so let's just look at three slices. I'm going to slice, I'm going to look at the z function. So f of 0, 0, z looks like this, right? I mean, this is now a graph where this is z this way and this is f this way and this is actually the origin, but okay. f of 0, 0, z goes down. It's concave down. But f of x, 0, 0 is a parabola that looks like this. It's concave up. And similarly f of 0, y, 0 is also concave up. So this is a saddle in some sense in that it increases in some ways but decreases in other ways. So there are directions that I can perturb from the origin that make it bigger and other directions that make it smaller. So this is a saddle for a four dimensional rider, right? Or if you want to think of one of the three dimensions at this time, then you know this is a saddle but the saddle is moving down and it's up and down. So you have an actual saddle that you're sitting on but it's on a merry-go-round so you're going anywhere. Okay, so it's just a generalization of the notion of the saddle. So we'll call this a saddle because it increases in some ways and decreases in other ways. But this is exactly the idea. I can also slice it f of x, y, 0 where I'm going to denote, sorry, x, x, 0. I'm going to move it x and y in the same way but that will be 2x squared which again will go up like that. But I want to consider all of these variations all at once. We have some machinery to do this but maybe you forgot what it is. So what am I doing? Let me restrict the two dimensions again so that I can draw but it should work in three dimensions. So now, suppose I have my surface here. I have my, let's just make this hole here. I have this hole here sitting over at this point and I want to slice it open in this direction. That is, it's like the line, I don't know x equals 2y or something. Right, so this is x, this is y, this is some direction. How can I codify this slicing? Yeah, I consider a vector in this direction. I consider a unit vector u pointing this way. We know how to take a directional derivative. We didn't just do that for the hell of it, it was a useful thing to do. Right, so here we want to say what happens, I'm going to move back down here in a second, what happens to f in the u direction? Well if I cut it open in the u direction then let's put u here. I get some picture that looks like that. Now that's a function of one variable. Right, this is f of t times u. I get something like that, that's a function of one variable. I can do one variable calculus. So I can just take the second derivative and the first derivative there is now I can take the second one. So let me move back down here, this is why I hate that. So I have some function and if I look at the partial of f with respect to some vector u at some point x naught, so I fixed some unit vector u which is the direction that I want to cut it open. Right, this is the derivative with respect to t of f of t times u. That's just slicing it up. Okay, add x zero. Yeah. Yeah. Just slicing the thing open in the u direction. So now that's a single variable object. This is my u axis. I take t times u, here's x zero. I just do the thing. But I guess it seems like that. And so now I can do single variable calculus. So I can apply the regular second derivative test to this. So that is I can look at derivative with respect to u and then take the derivative with respect to u again. Which we can denote as the second derivative with respect to this. And this is the second derivative in the u direction. Now you have a homework problem like this, but maybe you hated it too much or something. It's kind of messy. So let me just take an example just to emphasize what this is. Say we have f of x, y and x squared y minus y cubed minus y. Okay, and now I'm just going to let u be some arbitrary vector. Let's call it hk. Okay. And here I'm assuming u is a unit vector. So h squared plus k squared is one. Now I just compute the f, the u, which is just the gradient of f. So that will be obtained with respect to x. So that's 2x, y in the x direction. And with respect to y, it's x squared minus 3y squared minus 1. And then I have to dot it with u. Then u, just hk. So this gives me an expression in, well I'm thinking of h and k as fixed. So this is 2x, y, h plus x squared k minus 3y squared k minus k. And this is a new function. Again, thinking of h and k as like, I don't know, 1, 0, or 1 over root 2, 1 over root 2, or any numbers which were on the unit circle. So this is some new function, which is a function of x and 1. So I can take the derivative again. Right? So I can take the partial again. So if I take the partial again, take this partial. I'm going to take the derivative with respect to x, gives me 2yh plus 2xk. And that's gone. Taking the y partial, I get 2xh. That's gone. 1, minus 6, y, k. And that's gone. And I dot this again with hk. So that'll be 1 over root 2yh squared plus 2xhk plus 2xh squared minus 2xhk minus 6y. Yes, that's right. 2yh squared plus 4xhk minus 6y. So what does he say? Well, now I can read off all of the second derivatives in all of the directions. Right? If, for example, I want to move along parallel to the x axis, the k is 0 and h is 1. And my derivative is 2y plus 4x and so on. Again, remember, hk lives here somewhere. Choosing a direction to move. So this is capturing how the function changes at every point xy if I move in some combination of h and k. So if, so then now to, well I've erased it already, to recast the second derivative test here, if for every combination, so now I have to be at a certain point in order to check, right? I should really find the critical points of f before I do this game. But if every combination here gives me a positive number, then the thing is concave up and I have a minimum. If every combination gives me a negative number, then I'm concave down, I have a max. If some are positive and some are negative, then I have a set. If lots of them are 0, then I don't. Does this make sense? Yeah. All right. So let me finish this problem. I sort of got my cart ahead of my horse here. So let's find the critical point. So let's now have a problem. I just wanted to, the reason I started with this is I just wanted to remind you how you would calculate the second partial directional derivative, the second directional derivative. There it is. It depends on the vector in a quadratic way, but also on the point x, y. So let's change this problem, but really the same problem. So for, so I want to, how about we just phrase it this way. Find and classify all relative, extreme of this function. x squared y minus y equals y. So certainly the origin is one of them, but so what I did is I did the work to classify, but I didn't find it yet. So to find it, so I'll have a relative extreme, which is saying while the gradient is somewhere, here it is. So that's i e 2 x y is 0 and x square minus 3 y square minus 1 is 0. Those simultaneously. So I just want to solve those simultaneously. They're not linear, but they're not too hard to solve. So here I certainly get critical points, but just looking I can see if x and y are, I'm quite, I shouldn't have 0, 0. Why didn't I have 0, 0? Did I make a mistake? I thought I had 0, 0, but I guess I don't. Oh no, I didn't have 0, 0. Right. That was a different example that I decided not to do. So certainly they're not both 0. So if x is not 0, well let's see if x is, well okay. Either x is 0 or y is 0. Or maybe both. But both doesn't work. So I have either x equals 0 or y equals 0. But it won't be both because if they're both 0, then negative 1 is 0 and that doesn't happen a lot. So I am not both from this first equation. Either x is 0 or y is 0. So now if x is 0, then I have 3 y square plus 1 is 0. Okay, so I think in terms of the one that I did in my office, I transposed a plus and a y. So that doesn't happen much. Right? Negative 3 y square minus y 1 is 0. So that means so y square is 1 over 3 negative, which means that I have a complex group. Right? So there's no reals. So apparently I mis-transcribed the problem because I think I needed a plus here in the original problem. But I was doing good, okay. So there's no real solution. So we just have 2 extreme. The other case is y is 0, then x square minus 1 is 0. So x is plus or minus 1. So I just have 2 critical points to deal with. x is plus 1 and x is minus 1. So my critical points are 1, 0, and 1 is 1, 0. And now I need to decide whether their maxes are measured or needed. And this is not the problem that I worked out before. So we'll see where I go. So I think the problem that I worked out before had a plus here. But I don't want to change the problem. Why? Okay. So what about 1, 0? So at 1, 0, we have the second derivative form here. It's h square, no, 0. All the y's are gone. So I just have 4hk. Second derivative is 4hk. Right? Because y is 0. So I only look at the x term. And so this is sort of a stupid, well, it's a sad thing. So this guy, since I can move around the circle, I could choose, wait a minute, this is 0. This is meaning 4hk. Yeah, x is 1. It's 4xhk, x is 1, so that's 4hk. And unfortunately, this example isn't a good one because, well, sometimes, well, okay, so sometimes this is positive, sometimes it's negative. If h and k are the same sign, it's positive. If they're different signs, it's negative. So some directions, so I have a 7. And the other one is the same. So it was too bad that I made my mistake. The whole point of that example was to have something useful to me. So these are both saddles. Okay? You just have it on here. Okay. So it makes a graph of it, it's nice. If you flip, but if I change one of the signs. If you flip y, it's positive, it's got a min, x, and a 0. Yeah, right. That was the example that I meant, but not the example that I did. If you want, we can flip y cubed to a positive and get everything, which was what I meant. So if we change this to, so should I, the red pin seems to be gone. Okay, so I'll leave it to you. So if I look at the g of x, y is x square y plus y cubed minus y. Then I get four critical points, and I have some already. Are we okay with that? We're good with that. I don't need to beat this horse until it bleeds. It's already dead, so it doesn't matter. Okay. Let me, I guess I already wrote it out. It's sort of obvious. It's not written down, but let me write it down. So the second original test sets. Suppose you have f from r and r, twice differentiable, and you have a critical point x naught, and we have three possibilities. If the second partial with respect to you is always positive for all unit vectors u, then it's always positive. So we have a little bit of nid. If the second partial at x naught is negative for all unit vectors u, then we have a local max. And if the second partial is zero for some, is negative for some, positive for others, you have a set. And then, of course, there's, well, if it's zero for a lot, then the test fails. Right? If it's zero along one line, we're okay, but if it's always zero or something like that, so this doesn't cover all possibilities. Right? We can have it's always positive and sometimes zero, and then we don't know because maybe it flattens out. Right? Does everybody understand that? Yeah, sure. So for example, a function like, I don't know, if I change all of these, if I make that x to the 20th and write it before there, then all of the partials are going to be zero. And there's nothing interesting going on. If I change, if I leave that as a y, then I'm flat in the x direction. I don't know quite what's going on there because I need to take 19 partials as far as I can figure something out. I don't want to take that. Okay? So I want to, so a little time. Now we can sort of specialize this. It's common, right? This theorem works R3, R10, whatever. We have 10 variables, we have two variables, whatever. But we can specialize it to the functions R2 to R. And then we get something a little more calculable. So if we take, we have a function from R2 to R, that is I have f of x, y, z. Then I don't have as many partials to deal with. Right? The gradient only has two vectors like in this case. The gradient either three or more. And so I really only have, so this guy is twice continuously differentiable to the critical point at some point x, y not. Then, well, I can just calculate the second partial. And I have, if you remember, I just have the partial, the two partial with respect to x. I have the mixed partial of the two partial with respect to y. And so, and these are equal because the functions continuously differential. So that means that the mixed partials are equal because the function is nice-ish. And so this is just, since I get two of those, that's the second derivative. I just take all of the partials and I dot it with my u. And so those are just my, my partials there. I miss something. But yeah, I need my u, so I'm sorry. I let it off when I'm dotting. Let me try this again. So my gradient vector is going to be f x x at my point. I'm going to get a u from that. It's called an h and k, so I'm going to get an h squared term out of that. Then I will get f x y. And I'll get an h k term here. So this is from the second partial in the x's and the y's. And then I'll get another one of these with a mixed. And then I will get the last one in the k squared. So that's what the second partial of f is always going to be, something like that. And so now, sort of narrow down what we do to look at this. So we can write a second derivative test just for degree two. So in this case, explain why in a second, you look at the discriminant, which is the product of the xx and the xy, and you subtract off. So f x x, I'm going to leave off the times f y y minus the product of the mixed partials. Look at that number. Yep. I'll explain in a second. It's from, if you solve the quadratic equation, this is b squared minus 4ac. There's b squared and there's 4ac. I'll write it in just a second. So I look at that. So this is just some number. It's not a derivative. It's discriminant. It's called a deltas. Okay. So I look at that and then I have some possibility. So if delta is positive and either one of these, one of these things is positive, f x x is bigger than zero, or f y y is bigger than zero, then I am in. It's positive and both are negative, right? I just want to make sure I didn't do something wrong. No. Either is negative. Yeah. How can that be either, though? What does it mean? Yeah, I know. They're not disjoint cases. So something's through here. I'm going to assume that they're both negative. I think they're both negative. I'm going to check it when we do the program. So we got to check these conditions. So if both are negative, then I have a max. And then another case is if the discriminant is negative, then I have the discriminant zero out of five. Okay. If the discriminant is zero, then so let's, since something is wrong with what is written in the book, let's figure out one's right. So the book says, or here. And I don't remember, so I have to check it. Again. The both are negative or both are positive. They are the same thing. If they, they both are negative or they both are positive, they are the same thing. What do you mean the same thing? No, they do apply the word, the first, the, whatever it was. They don't apply the word. He might mean that they're product. I mean, either way, they're product. Well, if their product comes out negative, okay. This has to be n, right? Because if one of them's negative and one of them's positive, then the discriminant is negative. And the book says, it has to be n. So either. Right. Either means, check either one. If it's positive, you're cool. Right? Because if this one's positive and the discriminant is positive, it's positive done. Right? Because if this one's negative and the discriminant's positive, then you have some rather interesting arithmetic that you add a negative number and a negative number and somehow you get a positive number. I do that a lot, but something's wrong there. And here if they're both negative, which means you can check either one. Okay. Yes. So he's right. But he's right in a weird way. If either one of them is positive, you're fine. If either one of them is negative, you're fine. Because the other one is also negative for free. As long as the discriminant is positive. So these guys have to, so let's try it this way. Delta bigger than zero means fxx and fyy have the same sign. So this can be an or. Because or means and. You only have to check one of them because they have the same sign. Okay. So let's, so just check. So I could just erase one of these conditions. But it doesn't work. Because one you get for free. Okay. So let's think about how the proof of this is going to go. So if I look at this, well, so because otherwise it just looks like it fell out of the sky. So the proof actually explains where this came from. So if I look at that quantity, I know that since my unit vector is a unit vector, I don't have, I can't, one of them has to be nonzero. So I could pick one of them. So let's look at this quantity. And let's factor out, I don't know, let's say h. So if h is nonzero, h squared, so my second partial is h squared, fxx, I'm going to stop writing the of plus 2 fxy of k over h, not of, that's times plus fyy times, I'm pulling out k over h quantity squared. This is a polynomial in k over h. Right? H squared isn't zero, so it doesn't affect. And now I'm left with this polynomial in k over h. And my question is, what I need to know is, is this always positive? Or is it always negative? Or does it sometimes change sign? Right? I have a possibility, if I think of, these are numbers. Right? So I have a plus 2b, let's call it z plus, let's call it, let's call this c. And let's call this b. And let's call this a z squared, where z is k over h. And either this thing looks like up here, and three possibilities. Either this thing is up here somewhere, or it's down here somewhere, or it crosses. But three cases. Either this has a real root, or it doesn't. Well, so we just used the quadratic formula. So if this doesn't have a real root, so the roots here, so the roots, the roots, fxx plus 2fxy, let me just call it z plus fyyz squared equal to zero. The solutions to this are from the, you know, we applied the quadratic formula. Negative 2fxy plus or minus the square root of 4fxy quantity squared minus 4 times this product, those are my solutions. Again, remember these things are numbers. We calculate them, they're numbers. So those are the roots of this equation. And I don't want it happening. So that means having fxy squared minus fyy is negative. So if delta is positive, then I don't have any roots to this equation. And we just need to check whether for any one value of z, like z equals zero, the thing is positive or the thing is negative. So if this thing's positive, all this thing's positive too. So it's always positive, so we're cool. So that's this condition right here. If on the other hand fxx is negative, then it's always negative, and this guy's negative, so we're below, and again we don't have a root, so okay. And if this number delta is not positive, well then it's negative, which means that I have two solutions to this equation over k over h, which means it changes sign, which means I have a sign. So the only case that's a problem for me is if this discriminant here is completely zero. There's lots of this. So then we're okay. So quite creative. All right, so I didn't write out all the words, and you also have to deal with the case where maybe h is zero, then just change all the h's for k and k's for h's. Then we're okay too. All right? Is that good enough to convince you that this proof is okay? And that's where this funny condition comes from. We look at the difference between the product of the second derivative in x, second derivative in y, and the mixed derivative. And if this is a lot bigger than that, we have either a max or a min, but depending on whose positive. Okay. Okay. Get that. Get that. Any questions about this? Because, yeah. Is it, like, if you wrote the partials of the matrix, did the determinant get the same thing? Yes, the discriminant of the Jacobian matrix. I mean, the Hessian. Does the derivative look the same? It's the same. It's the determinant of that partials matrix. It's the same. Right? Because there it is. Right? I have access to the matrix he's talking about. Is this one? It's determinant. You give that. It's exactly the same question. Because what is it, when we're computing the second directional derivative, we're just taking this and we're doting it into hk. Okay. Okay. So I'm going to stop with, that's min kind of problems. Yeah. So if h is zero, use k. So if I use k and I factor out k squared, my equation will be k squared f x x k. Sometimes h over k also models both. So your equation is equally valid. Because they just trade roles. Okay. Right? So because this is symmetric, yeah, just trades roles. So it's okay. So yeah. I mean, yes, you're right. I do have to check k will zero when it's, once you write it down, you see it's the same conditions over one. Other questions? Okay. So, and now we'll, we'll decide the question of max min kind of things. Let me remind you that from, no, two weeks from Wednesday, we have a text, right? Not next Wednesday, Wednesday. Not next Wednesday? No, class next Wednesday. Wait. Yes, of course. It's still a ways away. Okay. It's not an easy, it's still a ways away. Woo, right? We still have, we still have three more, we still have three more classes with me. One class with R10 and then R10. R10 is actually his next. Okay. So it's called inductance. It's an actual R10. It's an actual R10. That's his actual name. It's not a data. Okay. You have, you have, uh, yeah. So let's, let's move on. Now I'm running, now I'm burning up all the time. Okay. So another thing that I need to mention, and it's worth mentioning at this point, we will come back to it. Really kind of long, we belong earlier, but okay. It has other coordinates as well. And these come up in several applications. So let me remind you, should be relatively familiar with X, Y. In plain, this is for R2. We have this one, but then we also have polar coordinates. R and theta, right? So here X is our cosine theta, Y is our cosine theta. So this is convenient for describing some class of curves. We have, we have several analogs of polar coordinates in R3. Right. So in R3, we have sort of two common analogs of polar coordinates. We have cylindrical coordinates, which, so here's my XYZ lamb. And I can do polar coordinates in XY. So say I want to describe this point, since there, I could do polar coordinates here. I want to describe that point so I can think of it this way. So this is R here, and then Z is just behind. Right. So cylindrical coordinates, I specify an angle theta, and a distance in the XY plane R, let's just write this down here, theta is the angle with the X axis. Well, it's really the XZ plane that is the plane Y equals zero. Is the distance from the Z axis and Z is just Z. Okay. So this is one way that we can describe things in cylindrical coordinates. It's just polar coordinates in the XY plane, and then we move them up and down. And it's called cylindrical coordinates because if we fix the radius and let theta and Z vary, yeah. R theta comma Z. Yeah, I don't know that they're okay. Pick an order. I mean, just like, you know, if I write 2, 4 in polar coordinates, what does that mean? I have no clue which is theta and which is R. So usually in polar coordinates, I would write R equals 2, theta equals 4, and now I know what it is. So similarly here, I don't know who comes first. So just pick one. So sometimes people use one, sometimes they use the last, but we're really thinking here, so let's just write the relationship. Right. Well, maybe it's not a curve. Maybe it's a surface. So here, right, X is R cosine theta, Y is R sine theta, and Z, well, that's just our relationship. If you want to solve for theta in terms of, you know, we can write R tan as long as you choose the right branch. Right. Theta is the inverse tan just Y over X, but you've got to choose the right one. And Z is still just E, and R is X square plus Y square. Right. We can go back. But this is good for describing things which sort of naturally, so as an example of this, a helix, very easy in these coordinates. We just, so in cylindrical coordinates would just be some curve like R is fixed and theta is T, and Z is T. So that's an easy parameterization of helix because here in cylindrical coordinates, I'm over the circle, R is 1. I start off with theta, and T is 0, I'm here, and then I just move up like that with unit speed. It's much cleaner or easier than the other way. So in some sense, this is a natural generalization of polar coordinates that's sort of turned from maybe easier in terms of cylindrical coordinates. Another variation is that, you know, you can go full polar. Yes, I can do spherical coordinates. So spherical coordinates are also quite useful if you're doing something like, I don't know, an astronomy or something like that where you think of the Earth at the origin, and then we're describing something flying around relative to the Earth, and maybe spherical coordinates are our friend. So here, once again, I'm going to draw the same picture. I have my point here, but as an X and Y, I'm going to take this, so I have this angle theta, which is my distance to the X axis, but instead of going up a height Z, I'm going to think of a triangle sitting here, and for some reason that I don't really understand, people usually measure this angle instead of this angle. You can choose either one. This is usually called phi. So I have theta is the angle with the X axis, and phi is the angle from the vertical, the angle from the Z axis rather than the angle from the X, Y, and Y. And then, I don't know, sometimes we call this row. Let's call it row. Row is the distance to the origin. So this gives us another way, and here's our R that we're not using. Some people call row R these labels, this is a green on row. And so in these coordinates, so I guess also maybe in cylindrical a sphere is really easy to describe here. There's a sphere, right? It's just everything distance one from the origin. There's a sphere. And I can let theta and V vary as they need to. I mean, usually, you know, you restrict these guys to be, say, between 0, 0, and pi, and this guy to be. So typically, let me erase this long picture. Typically here, we would take V between 0, pi, and theta between 0 and 2 pi, but you don't have to. That's exactly everything. And we typically take, but don't have to, row positive. And similarly here, typically the quantity of theta between 0 and 2 pi depends either it is or it is positive. But you don't have to, right? If you allow row to be negative, just like in polar coordinates, if you allow R to be negative, you have multiple representations at the same point. One thing to notice is one sort of bad thing in this coordinate system is the origin is represented with lots of things, right? Once row is 0, I have no good definition for theta and V. I have a singularity in this coordinate system at the origin. It's a problem there. And there are other sets of coordinate systems that are useful in, let me not write them, let me just mention them, that are useful in various applications. Like you might have to write toroidal coordinate systems. You might have, you might imagine I'm going to specify some distance from the origin and then I'm going to specify some angle along that. But then rather than growing like a sphere, I might specify something from that circle. So that would give me a different set of coordinates, right? I might fix radius equals 1 or something useful. I might just fix my radius to be 1, and then I'll take a torus. I might describe my place here by saying what angle I take out, go out to that circle of radius 1, say how far out the circle is and go around it. This is useful in different contexts. This one, I think it's not even mentioned in the book, but you know, there are different collections of coordinate systems depending on what is natural for you, what you're trying to describe. So let's try and think about what do these things, so in order to be a good coordinate system, what do we have to have? What is the, in order to describe a patch of R3 in a nice way, really in all of these cases, I'm describing the transformation from x, y, c to, I don't know, rho theta phi space. I have some function here, let's call it t, from however many variables I have in Cartesian coordinates to however many variables I have in my target coordinate systems. And in order to be a good coordinate system, I need to be able to go both ways, so that means that the derivative matrix of t, which is called the Jacobian, needs to be invertible. So to be good, this transformation dt has to be invertible. In this case, it's a three by three matrix, and it has to be invertible every place I care about the coordinates. So it can be nasty far away, but I have to be able to take the inverse, I have to have a nice transformation from one to the other. This is why this is brought up here in this book, because we want to be able to go backwards. We talked about the inverse function theorem, we have an inverse function theorem exactly when our transformation has an inverse. The derivative matrix is invertible. So here, these guys have a problem at zero. Stay away from zero, it's okay. So as long as we stay away from zero, then these are perfectly good coordinate changes. But near zero stuff gets crunched up, weird stuff happens, so we like to stay a little bit away from zero. These coordinate systems are not so good at zero. And that's sort of evidenced by the fact that I have multiple representations for zero. This coordinate change, where does the spherical coordinate change? I didn't even write it down. Oh well, you can figure it out. It's r cosine theta, r cosine theta, cosine theta, sine b, anyway. You can look at the picture and figure them out. But there's a problem in r is zero, yeah. I thought the spherical coordinates of the ones that have the function of, like, r, theta, theta, not rho, theta. Do you want to call rho r? Okay. No, no, I mean, like, it's defined as, Jim's over here. Oh, I'm sorry. Yeah. So for spherical, we want to know how far away you are from the origin. Some people call this r, some people call this rho. I called it rho to distinguish it from the radius of the inspirations. I think the book maybe even called it r. I don't know. Yeah. Mine probably was a book when I was learning back when there were dinosaurs called it rho. I wish my book was a dinosaur's books. So the whole point of this is really, I just want to make sure that when we pair, the derivative is not zero. I will talk about any ratio next time.