1 00:00:01 --> 00:00:03 The following content is provided under a Creative 2 00:00:03 --> 00:00:05 Commons license. Your support will help MIT 3 00:00:05 --> 00:00:08 OpenCourseWare continue to offer high quality educational 4 00:00:08 --> 00:00:13 resources for free. To make a donation or to view 5 00:00:13 --> 00:00:18 additional materials from hundreds of MIT courses, 6 00:00:18 --> 00:00:23 visit MIT OpenCourseWare at ocw.mit.edu. 7 00:00:23 --> 00:00:25 So, so far, we've seen things about vectors, 8 00:00:25 --> 00:00:27 equation of planes, motions in space, 9 00:00:27 --> 00:00:30 and so on. Basically we've done geometry 10 00:00:30 --> 00:00:31 in space. But, calculus, 11 00:00:31 --> 00:00:33 really, is about studying functions. 12 00:00:33 --> 00:00:37 Now, we're going to actually move on to studying functions of 13 00:00:37 --> 00:00:40 several variables. So, this new unit, 14 00:00:40 --> 00:00:45 what we'll do over the next three weeks or so will be about 15 00:00:45 --> 00:00:50 functions of several variables and their derivatives. 16 00:00:50 --> 00:00:55 OK, so first of all, we should try to figure out how 17 00:00:55 --> 00:00:58 we are going to think about functions. 18 00:00:58 --> 00:01:02 So, remember, if you have a function of one 19 00:01:02 --> 00:01:08 variable, that means you have a quantity that depends on one 20 00:01:08 --> 00:01:12 parameter. Maybe f depends on the variable 21 00:01:12 --> 00:01:14 x. And, for example, 22 00:01:14 --> 00:01:19 a function that you all know is f of x equals sin(x). 23 00:01:19 --> 00:01:22 And, the way we would represent that is maybe just by plotting 24 00:01:22 --> 00:01:28 the graph of the function. So, the graph of a function, 25 00:01:28 --> 00:01:34 we plot y = f(x). And, the graph of a sine 26 00:01:34 --> 00:01:45 function that looks like this. OK, so now, let's say that we 27 00:01:45 --> 00:01:53 had, actually, a function of two variables. 28 00:01:53 --> 00:01:56 So, that means that the value of F depends actually on two 29 00:01:56 --> 00:01:59 different parameters, say, if the variables are x and 30 00:01:59 --> 00:02:03 y, or they can have any names you 31 00:02:03 --> 00:02:07 want. So, given values of the two 32 00:02:07 --> 00:02:13 parameters, x and y, the function will give us a 33 00:02:13 --> 00:02:17 number that we'll call f(x, y). 34 00:02:17 --> 00:02:21 That depends on x and y according to some formula, 35 00:02:21 --> 00:02:29 OK, not very surprising so far. So, for example, 36 00:02:29 --> 00:02:44 I can give you the function f(x, y) = x^2 y^2. 37 00:02:44 --> 00:02:47 And, of course, as with functions of one 38 00:02:47 --> 00:02:50 variable, we don't need things to be defined everywhere. 39 00:02:50 --> 00:02:53 Sometimes there is the domain of definition. 40 00:02:53 --> 00:02:57 So, this one is defined all the time. 41 00:02:57 --> 00:03:01 But, if I tell you, say, f of x, 42 00:03:01 --> 00:03:08 y equals square root of y, well, this is only defined if y 43 00:03:08 --> 00:03:14 is nonnegative. If I tell you f(x, 44 00:03:14 --> 00:03:23 y) equals one over x y, that's only defined if x y is 45 00:03:23 --> 00:03:30 not zero, and so on. Now, so these are mathematical 46 00:03:30 --> 00:03:33 examples given by explicit formulas. 47 00:03:33 --> 00:03:35 And, of course, there's physical examples. 48 00:03:35 --> 00:03:38 For example, so examples coming from real 49 00:03:38 --> 00:03:40 life, so for example, you can look at the temperature 50 00:03:40 --> 00:03:43 at the certain point on the surface of the earth. 51 00:03:43 --> 00:03:46 So, you use maybe longitude and latitude; that's x and y. 52 00:03:46 --> 00:03:49 And then you have f(x, y) equals the temperature at 53 00:03:49 --> 00:03:50 that point. 54 00:03:50 --> 00:04:12 55 00:04:12 --> 00:04:17 In fact, because temperature depends also may be on how high 56 00:04:17 --> 00:04:18 up you are. It depends on elevation. 57 00:04:18 --> 00:04:21 So, it's actually a function of maybe x, y, z. 58 00:04:21 --> 00:04:24 And, it also depends on time. So, in fact, 59 00:04:24 --> 00:04:28 maybe it's a function of t in x y z coordinates in space. 60 00:04:28 --> 00:04:31 So, you see that real-world functions can depends on a lot 61 00:04:31 --> 00:04:33 of variables. So, our goal will be to 62 00:04:33 --> 00:04:35 understand how to deal with that. 63 00:04:35 --> 00:04:57 64 00:04:57 --> 00:05:01 OK, so now you will see very soon, but actually it's already 65 00:05:01 --> 00:05:05 tricky enough to picture a function of two variables. 66 00:05:05 --> 00:05:08 So, we are going to focus on the case of functions of two 67 00:05:08 --> 00:05:10 variables. And then, we'll see that if we 68 00:05:10 --> 00:05:12 have more than two variables, then it's harder to plot the 69 00:05:12 --> 00:05:14 function. We cannot draw with the graph 70 00:05:14 --> 00:05:17 looks like anymore. But, the tools are the same, 71 00:05:17 --> 00:05:20 the notion of partial derivatives, grade and vector, 72 00:05:20 --> 00:05:23 and so on, all the tools that we will 73 00:05:23 --> 00:05:27 develop work exactly the same way no matter how many variables 74 00:05:27 --> 00:05:30 you have. So, I'll say, 75 00:05:30 --> 00:05:41 for simplicity -- -- we'll focus mostly on two or sometimes 76 00:05:41 --> 00:05:48 three variables. But, it works the same in any 77 00:05:48 --> 00:05:56 number of variables. OK, so the first question is 78 00:05:56 --> 00:06:05 how to visualize a function of two variables. 79 00:06:05 --> 00:06:10 So, the first thing we can do is try to draw the graph of f. 80 00:06:10 --> 00:06:19 So, maybe I should say f -- which is a function of two 81 00:06:19 --> 00:06:23 variables. So, the first answer will be, 82 00:06:23 --> 00:06:26 we can try to look at it's graph. 83 00:06:26 --> 00:06:29 And, the idea is the same as with one variable, 84 00:06:29 --> 00:06:31 namely, we look at all the possible values of the 85 00:06:31 --> 00:06:34 parameters, x and y, and for each of them, 86 00:06:34 --> 00:06:40 we plot a point whose height is the value of a function at these 87 00:06:40 --> 00:06:43 parameters. So, we'll plot, 88 00:06:43 --> 00:06:47 let's say, z equals f(x, y). 89 00:06:47 --> 00:06:52 And, now that will become, actually, a surface in space. 90 00:06:52 --> 00:06:57 OK, so for each value of x and y, yeah, we have x, 91 00:06:57 --> 00:07:02 y in the x, y plane, then we'll plot the point in 92 00:07:02 --> 00:07:05 space at position x, y. 93 00:07:05 --> 00:07:13 And, z equals f of x, y. OK, and if we take all of these 94 00:07:13 --> 00:07:17 points together, they will give us some surface 95 00:07:17 --> 00:07:24 that sits in space. Yes? 96 00:07:24 --> 00:07:29 Oh, a function of two variables, shorthand. 97 00:07:29 --> 00:07:36 Well, let's say how to visualize a function of two 98 00:07:36 --> 00:07:39 variables. OK, so, how do we do that 99 00:07:39 --> 00:07:41 concretely? Say that I give you a formula 100 00:07:41 --> 00:07:46 for f. How do we try to represent it? 101 00:07:46 --> 00:07:57 So, let's do our first example. Let's say I give you a function 102 00:07:57 --> 00:08:02 f(x, y) = -y. OK, so it looks a little bit 103 00:08:02 --> 00:08:04 silly because it doesn't depend on x. 104 00:08:04 --> 00:08:10 But, that's not the problem. It's still a valid function of 105 00:08:10 --> 00:08:13 x and y. It just happens to be constant 106 00:08:13 --> 00:08:17 with respect to x. So, to draw the graph we look 107 00:08:17 --> 00:08:22 at the surface in space defined by z equals y. 108 00:08:22 --> 00:08:26 What kind of surface is that? It's a plane, OK? 109 00:08:26 --> 00:08:32 And, if we want to draw it, z equals minus y will look, 110 00:08:32 --> 00:08:36 well, let's put y axis. Let's put x axis. 111 00:08:36 --> 00:08:39 Let's put z axis. If I look at what happens in 112 00:08:39 --> 00:08:43 the y, z plane in the plane of a blackboard, it will just look 113 00:08:43 --> 00:08:45 like a line that goes downward with slope one. 114 00:08:45 --> 00:08:51 OK, so it will be this. And, what happens if I change x? 115 00:08:51 --> 00:08:54 Well, if I change x, nothing happens because x 116 00:08:54 --> 00:08:57 doesn't appear in this equation. So, in fact, 117 00:08:57 --> 00:09:01 if instead of setting x equal to zero I set x equal to one, 118 00:09:01 --> 00:09:04 I'm in front of the blackboard, or minus one at the back. 119 00:09:04 --> 00:09:07 Well, it still looks exactly the same. 120 00:09:07 --> 00:09:15 So, I have this plane that actually contains the x axis and 121 00:09:15 --> 00:09:22 slopes downwards with slope one. It's kind of hard to draw. 122 00:09:22 --> 00:09:25 Now, you see immediately what the big problem with graphs will 123 00:09:25 --> 00:09:29 be. But, these pictures are hard to 124 00:09:29 --> 00:09:34 read. But that's our first graph. 125 00:09:34 --> 00:09:41 OK, a question so far? OK, so let's say that we have a 126 00:09:41 --> 00:09:43 slightly more complicated function. 127 00:09:43 --> 00:09:50 How do we see it? So, let's draw another example. 128 00:09:50 --> 00:09:58 Let's say I give you f(x, y) = 1 - x^2-y^2. 129 00:09:58 --> 00:10:06 So, we should try to picture what the surface z=1- x^2-y^2 130 00:10:06 --> 00:10:10 looks like. So, how do we do that? 131 00:10:10 --> 00:10:15 Well, maybe you are very fast and figured out what it looks 132 00:10:15 --> 00:10:17 like. But, if not, 133 00:10:17 --> 00:10:21 then we need to work piece by piece. 134 00:10:21 --> 00:10:27 So, maybe it will help if we understand first what it does in 135 00:10:27 --> 00:10:35 the plane of the blackboard. So, if we look at it in the y, 136 00:10:35 --> 00:10:42 z plane, that means we set x equal to zero. 137 00:10:42 --> 00:10:48 And then, z becomes 1 - y^2. What is that? 138 00:10:48 --> 00:10:54 It's a parabola pointing downwards, and starting at one. 139 00:10:54 --> 00:11:00 So, we should draw maybe this downward parabola. 140 00:11:00 --> 00:11:08 It starts at one and it cuts the y axis at one. 141 00:11:08 --> 00:11:11 When y is one, that gives us zero. 142 00:11:11 --> 00:11:15 So, we might have an idea of what it might look like, 143 00:11:15 --> 00:11:19 or maybe not. Let's get more slices. 144 00:11:19 --> 00:11:27 Let's see what it does in the x, z plane, this other vertical 145 00:11:27 --> 00:11:33 plane that's coming towards us. So, in the x, 146 00:11:33 --> 00:11:38 z plane, if we set y equal to zero, we get z equals one minus 147 00:11:38 --> 00:11:40 x^2. It's, again, 148 00:11:40 --> 00:11:46 a parabola going downwards. OK, so I'm going to try to draw 149 00:11:46 --> 00:11:51 a parabola that goes downward, but now to the front and to the 150 00:11:51 --> 00:11:54 back. So, we are starting to have a 151 00:11:54 --> 00:11:57 slightly better idea but we still don't know whether the 152 00:11:57 --> 00:11:59 cross section of this thing might be round, 153 00:11:59 --> 00:12:04 square, something else. So, it wants more confirmation. 154 00:12:04 --> 00:12:16 We might want to also figure out where the surface intersects 155 00:12:16 --> 00:12:22 the x, y plane. So, we hit the x, 156 00:12:22 --> 00:12:29 y plane when z equals zero. That means 1-x^2-y^2 should be 157 00:12:29 --> 00:12:38 0, that becomes x^2 y^2 = 1. That is a circle of radius 1. 158 00:12:38 --> 00:12:46 That's the unit size. So, that means that here, 159 00:12:46 --> 00:12:50 we actually have the unit circle. 160 00:12:50 --> 00:12:54 And now, you should imagine that you have this thing that 161 00:12:54 --> 00:12:57 when you slice it by a vertical plane, looks like a downwards 162 00:12:57 --> 00:13:00 parabola. And, it's actually a surface of 163 00:13:00 --> 00:13:03 revolution. You can rotate it around the z 164 00:13:03 --> 00:13:06 axis, OK? Now, if you stare long enough 165 00:13:06 --> 00:13:09 at that equation, you'll actually see that, 166 00:13:09 --> 00:13:12 yes, we know that it had to be like that. 167 00:13:12 --> 00:13:17 But, see, so these are useful ways of trying to guess what the 168 00:13:17 --> 00:13:19 graph looks like. Of course, the other way is to 169 00:13:19 --> 00:13:24 just ask your computer to do it. And then, you know, 170 00:13:24 --> 00:13:30 you will get that kind of formula. 171 00:13:30 --> 00:13:36 OK, well, I can leave it on if you want. 172 00:13:36 --> 00:13:40 No, because I plotted a different function that I will 173 00:13:40 --> 00:13:43 show you later. So, it goes this way. 174 00:13:43 --> 00:13:46 I mean, if you want, it's really going downward. 175 00:13:46 --> 00:13:49 Yes, I agree that the sheet is upside down. 176 00:13:49 --> 00:13:52 That's because I plotted something else. 177 00:13:52 --> 00:13:58 OK, so, in fact, so I plotted in my computer was 178 00:13:58 --> 00:14:03 actually x^2 y^2 that looks like that. 179 00:14:03 --> 00:14:08 See, it's the same with a parabola going upwards. 180 00:14:08 --> 00:14:14 If you want to see more examples, I have various 181 00:14:14 --> 00:14:19 examples to show, well, here's the graph, 182 00:14:19 --> 00:14:21 y^2-x^2. See, so that one is kind of 183 00:14:21 --> 00:14:23 interesting. It looks like a saddle. 184 00:14:23 --> 00:14:29 If you look at it in the y, z plane, then it's a parabola 185 00:14:29 --> 00:14:34 going up, z = y^2. And, that's what we see to the 186 00:14:34 --> 00:14:38 left and to the right. But, if you put it in the x, 187 00:14:38 --> 00:14:42 z plane, then that's a parabola going downwards, 188 00:14:42 --> 00:14:45 z = - x^2. So, we have a parabola going 189 00:14:45 --> 00:14:48 downwards in one direction, upwards in the other one. 190 00:14:48 --> 00:14:53 And together, they form this surface. 191 00:14:53 --> 00:14:55 And of course, you can plot much more 192 00:14:55 --> 00:14:58 complicated functions. So, this one, 193 00:14:58 --> 00:15:00 well, if you can read very small things, 194 00:15:00 --> 00:15:03 you can see the formula. It doesn't matter, 195 00:15:03 --> 00:15:09 just to show you that you can put a formula into a computer: 196 00:15:09 --> 00:15:18 it will show you a picture. OK, so that's pretty good. 197 00:15:18 --> 00:15:20 I mean, you can see that it can get a bit cluttered because 198 00:15:20 --> 00:15:22 maybe those features that are hidden behind, 199 00:15:22 --> 00:15:25 or maybe we have trouble seeing if we don't have a computer, 200 00:15:25 --> 00:15:29 that looks very readable. But, this is kind of hard to 201 00:15:29 --> 00:15:33 visualize sometimes. So, there is another way to 202 00:15:33 --> 00:15:36 plot the functions of two variables. 203 00:15:36 --> 00:15:47 And, let's call it the contour plot. 204 00:15:47 --> 00:15:51 So, the contour plot is a very elegant solution to the problem 205 00:15:51 --> 00:15:55 that it's difficult to draw to space pictures on a sheet of 206 00:15:55 --> 00:15:58 paper or on a blackboard. So, instead, 207 00:15:58 --> 00:16:02 let's try to represent the function of two variables by 208 00:16:02 --> 00:16:04 just the map, you know, the same way that 209 00:16:04 --> 00:16:07 when you walk around, you have actually geographical 210 00:16:07 --> 00:16:11 maps that fit on a piece of paper that tell you about what 211 00:16:11 --> 00:16:17 the real world looks like. So, what contour plot looks 212 00:16:17 --> 00:16:22 something like this? So, it's an x, y plot. 213 00:16:22 --> 00:16:25 And, that, you have a bunch of curves. 214 00:16:25 --> 00:16:32 And, what the curves represent are the elevations on the graph. 215 00:16:32 --> 00:16:35 So, for example, this curve might correspond to 216 00:16:35 --> 00:16:37 all the points where f(x, y) = 1. 217 00:16:37 --> 00:16:46 And, that curve might be all the points where f=2 and f=3 and 218 00:16:46 --> 00:16:49 so on, OK? So, when you see you this kind 219 00:16:49 --> 00:16:53 of plot, you're supposed to think that the graph of the 220 00:16:53 --> 00:16:56 function sits somewhere in space above that. 221 00:16:56 --> 00:17:00 It's like a map telling you how high things are. 222 00:17:00 --> 00:17:03 And, what you would want to do with the function, 223 00:17:03 --> 00:17:06 really, is be able to tell quickly what's the value at a 224 00:17:06 --> 00:17:08 given point? Well, let's say I want to look 225 00:17:08 --> 00:17:11 at that point. I know that f is somewhere 226 00:17:11 --> 00:17:14 between 1 and 2. Actually, it's much faster to 227 00:17:14 --> 00:17:17 read than the graph. On the graph I might have to 228 00:17:17 --> 00:17:18 look carefully, and then measure things, 229 00:17:18 --> 00:17:22 and so on. Here, I can just raise the 230 00:17:22 --> 00:17:27 value of f by comparing with the nearby lines. 231 00:17:27 --> 00:17:31 OK, so let me try to make that more precise. 232 00:17:31 --> 00:17:41 So, it shows all the points -- -- where f(x, 233 00:17:41 --> 00:17:53 y) equals some fixed values, some fixed constants. 234 00:17:53 --> 00:18:05 And, these constants typically are chosen at regular intervals. 235 00:18:05 --> 00:18:07 For example, here I chose one, 236 00:18:07 --> 00:18:11 two, three, and they could continue with zero minus one, 237 00:18:11 --> 00:18:16 and so on. So, one way to think about it, 238 00:18:16 --> 00:18:21 how does this relate to the graph? 239 00:18:21 --> 00:18:31 Well, that's the same thing as cutting, I mean, 240 00:18:31 --> 00:18:40 we slice the graph by horizontal planes. 241 00:18:40 --> 00:18:44 So, horizontal planes have equations of a form z equals 242 00:18:44 --> 00:18:46 some constant, z equals zero, 243 00:18:46 --> 00:18:48 z equals one, z equals two, 244 00:18:48 --> 00:18:51 and so on. So, maybe the graph of my 245 00:18:51 --> 00:18:55 function will be some sort of plot out there. 246 00:18:55 --> 00:19:00 And, if I slice it by the plane z equals one, 247 00:19:00 --> 00:19:04 then I will get the level curve, 248 00:19:04 --> 00:19:14 which is the point where f(x, y) = 1, 249 00:19:14 --> 00:19:24 and so, that's called a level curve of f. 250 00:19:24 --> 00:19:32 OK, and so we repeat the process with maybe z equals two, 251 00:19:32 --> 00:19:38 and we get another level curve, and so on. 252 00:19:38 --> 00:19:44 And, then we squish all of them up, and that's how we get the 253 00:19:44 --> 00:19:47 contour plot. OK, so each of these lines, 254 00:19:47 --> 00:19:50 imagine that this is like some mountain or something that you 255 00:19:50 --> 00:19:52 are hiking on. Each of these lines tells you 256 00:19:52 --> 00:19:55 how you could move to stay at a constant height if you want to 257 00:19:55 --> 00:19:58 get to the other side of the mountain but without ever going 258 00:19:58 --> 00:20:03 up or down. You would just walk along that 259 00:20:03 --> 00:20:08 path, and it will get you there without effort. 260 00:20:08 --> 00:20:11 So, in fact, if you have been talking about 261 00:20:11 --> 00:20:15 hiking on mountains, well, that's exactly what a 262 00:20:15 --> 00:20:21 topographical map is about. So, I need to zoom a bit. 263 00:20:21 --> 00:20:27 So, a topographic map, this one from the US geological 264 00:20:27 --> 00:20:32 survey shows you, basically, all the level curves 265 00:20:32 --> 00:20:37 of an altitude function on a piece of land. 266 00:20:37 --> 00:20:40 So, you know that if you walk right along these curves, 267 00:20:40 --> 00:20:42 you will stay along the same height. 268 00:20:42 --> 00:20:46 And you know that if you walk towards, these don't have 269 00:20:46 --> 00:20:48 numbers. Let me find a place with 270 00:20:48 --> 00:20:53 numbers. Here, there is a 500 in the 271 00:20:53 --> 00:20:56 middle. So, you know that if you walk 272 00:20:56 --> 00:20:59 on the line that says 500, you stay always at 500 meters 273 00:20:59 --> 00:21:02 in elevation. If you walk towards the 274 00:21:02 --> 00:21:05 mountain that I think is below it, then you will go up, 275 00:21:05 --> 00:21:07 and so on. So, you can see, 276 00:21:07 --> 00:21:10 for example, here there's a peak, 277 00:21:10 --> 00:21:13 and here there is a valley with the river in it, 278 00:21:13 --> 00:21:17 and the altitudes go down, and then back up again on the 279 00:21:17 --> 00:21:19 other side. OK, so that's an example of a 280 00:21:19 --> 00:21:22 contour plot of a function. Of course, we don't have a 281 00:21:22 --> 00:21:25 formula for that function, but we have a contour plot, 282 00:21:25 --> 00:21:29 and that's what we need actually to understand what's 283 00:21:29 --> 00:21:36 going on there. OK, any questions? 284 00:21:36 --> 00:21:39 No? OK, so another example of 285 00:21:39 --> 00:21:42 contour plots, well, you've probably seen 286 00:21:42 --> 00:21:46 various versions of these temperature maps. 287 00:21:46 --> 00:21:51 So, that's supposed to be how warm it is right now. 288 00:21:51 --> 00:21:55 So, this one is color-coded. Instead of having curves, 289 00:21:55 --> 00:21:58 it has all these colors. But, the effect is the same. 290 00:21:58 --> 00:22:01 If you look at the separations between consecutive colors, 291 00:22:01 --> 00:22:05 these are the level curves of a function that tells you the 292 00:22:05 --> 00:22:12 temperature at a given point. OK, so these are examples of 293 00:22:12 --> 00:22:24 contour plots in real life. OK, no questions? 294 00:22:24 --> 00:22:26 No? OK, so basically, 295 00:22:26 --> 00:22:31 one of the goals that one should try to achieve at this 296 00:22:31 --> 00:22:35 point is becoming familiar with the contour plot, 297 00:22:35 --> 00:22:38 the graph, and how to view and deal with 298 00:22:38 --> 00:22:39 functions. 299 00:22:39 --> 00:22:54 300 00:22:54 --> 00:23:02 [APPLAUSE] OK, so -- Let's do an example. 301 00:23:02 --> 00:23:04 Well, let's do a couple of examples. 302 00:23:04 --> 00:23:08 So, let's start with f(x,y) = - y. 303 00:23:08 --> 00:23:12 And, I'm going to take the same two examples as there to start 304 00:23:12 --> 00:23:16 with so that we see the relation between the graph and the 305 00:23:16 --> 00:23:23 contour plots. So, let's try to plot it. 306 00:23:23 --> 00:23:30 So, we are asked for the level curve, f equals 0 for this one? 307 00:23:30 --> 00:23:38 Well, f is zero when y is zero. So, that's the x axis. 308 00:23:38 --> 00:23:44 OK, so that's the level, zero. Where's the level one? 309 00:23:44 --> 00:23:48 Well, f is one when negative y is one. 310 00:23:48 --> 00:23:51 That means when y is negative one. 311 00:23:51 --> 00:23:57 So, you go to minus one, and that will be where my level 312 00:23:57 --> 00:24:02 one is, and so on. f is two when y is negative 313 00:24:02 --> 00:24:06 two. F is negative one when y is 314 00:24:06 --> 00:24:10 one, and so on. Is that convincing? 315 00:24:10 --> 00:24:15 Do you see how we got that? OK, let me do it again. 316 00:24:15 --> 00:24:18 I don't see anybody nodding, so that's kind of bad news. 317 00:24:18 --> 00:24:22 So, if I want to know, where is the level curve, 318 00:24:22 --> 00:24:26 say, one, I try to set f equals to one. 319 00:24:26 --> 00:24:31 Let's do this one. f equals one means that 320 00:24:31 --> 00:24:36 negative y is one means that y is minus one, 321 00:24:36 --> 00:24:43 and y equals minus one is this horizontal line on this chart. 322 00:24:43 --> 00:24:47 OK, and same with the others. So, you can see on the map that 323 00:24:47 --> 00:24:49 the value of a function doesn't depend on x. 324 00:24:49 --> 00:24:52 If you move parallel to the x axis, nothing happens. 325 00:24:52 --> 00:24:56 If you move in the y direction, it decreases at a constant 326 00:24:56 --> 00:24:59 rate. That's why the contours are 327 00:24:59 --> 00:25:03 evenly spaced. How spaced out they are tells 328 00:25:03 --> 00:25:06 you, actually, how steep things are. 329 00:25:06 --> 00:25:08 So, that corresponds exactly to that picture, 330 00:25:08 --> 00:25:11 except that here we draw x coming to the front, 331 00:25:11 --> 00:25:14 and y to the right. So, you have to rotate the map 332 00:25:14 --> 00:25:19 by 90� to get to that. It's an unfortunate consequence 333 00:25:19 --> 00:25:24 of the usual way of plotting things in space. 334 00:25:24 --> 00:25:32 OK, so these horizontal lines here correspond actually to 335 00:25:32 --> 00:25:35 horizontal lines here. 336 00:25:35 --> 00:25:43 337 00:25:43 --> 00:25:54 OK, second example. Let's do 1-x^2-y^2. 338 00:25:54 --> 00:26:00 OK, or maybe I will write it as 1 - (x^2 y^2). 339 00:26:00 --> 00:26:06 It's really the same thing. So, x, y, let's see, 340 00:26:06 --> 00:26:12 where is this function equal to zero? 341 00:26:12 --> 00:26:21 Well, we said f is zero in the unit circle. 342 00:26:21 --> 00:26:32 OK, so, the zero level, well, let's say that this is my 343 00:26:32 --> 00:26:36 unit. That's where it's at zero. 344 00:26:36 --> 00:26:48 What about f equals one? Well, that's when x^2 y^2 = 0. 345 00:26:48 --> 00:26:49 Well, that's only going to be here. 346 00:26:49 --> 00:27:00 So, that's just a single point. What about f equals minus one? 347 00:27:00 --> 00:27:07 That's when x^2 y^2 =2. That's a circle of radius 348 00:27:07 --> 00:27:10 square root of two, which is about 1.4. 349 00:27:10 --> 00:27:17 So, it's somewhere here. Then, minus two, 350 00:27:17 --> 00:27:24 similarly, will be x^2 y^2 = 3. Square root of three is about 351 00:27:24 --> 00:27:27 1.7. And then, minus three will be 352 00:27:27 --> 00:27:30 of radius two, and so on. 353 00:27:30 --> 00:27:38 So, what I want to show here is that they are getting closer and 354 00:27:38 --> 00:27:41 closer apart, OK? 355 00:27:41 --> 00:27:44 So, first it's concentric circles that tells us that we 356 00:27:44 --> 00:27:47 have a shape that's a solid of the graph is going to be a 357 00:27:47 --> 00:27:52 surface of revolution. Things don't change if I rotate. 358 00:27:52 --> 00:27:56 And second, the level curves are getting closer and closer to 359 00:27:56 --> 00:27:59 each other. That means it's getting steeper 360 00:27:59 --> 00:28:03 and steeper because I have to travel a shorter distance if I 361 00:28:03 --> 00:28:06 want my altitude to change by one. 362 00:28:06 --> 00:28:09 OK, so, this top here is kind of flat. 363 00:28:09 --> 00:28:11 And then it gets steeper and steeper. 364 00:28:11 --> 00:28:16 And, that's what we observe on that picture there. 365 00:28:16 --> 00:28:24 OK, so just to show you a few more, where did I put my, 366 00:28:24 --> 00:28:30 so, for x^2 y^2, the contour plot looks like 367 00:28:30 --> 00:28:37 this. Maybe actually I'll make it. 368 00:28:37 --> 00:28:41 OK, so it looks exactly the same as this one. 369 00:28:41 --> 00:28:44 But, the difference is if you can see the numbers which are 370 00:28:44 --> 00:28:45 not there, so you can see them, 371 00:28:45 --> 00:28:49 then you would know that instead of decreasing as we move 372 00:28:49 --> 00:28:52 out, this one is increasing as we go 373 00:28:52 --> 00:28:54 out. OK, so that's where we use, 374 00:28:54 --> 00:28:57 actually, the labels on the level curves that tell us 375 00:28:57 --> 00:29:00 whether things are going up or down. 376 00:29:00 --> 00:29:04 But, the contour plots look exactly the same. 377 00:29:04 --> 00:29:14 For the next one I had, I think, was y^2-x^2. 378 00:29:14 --> 00:29:18 So, the contour plot, well, let me actually zoom out. 379 00:29:18 --> 00:29:20 So, the contour plot looks like that. 380 00:29:20 --> 00:29:23 So, the level curve corresponding to zero is 381 00:29:23 --> 00:29:27 actually two diagonal lines. And, if you look on the plot, 382 00:29:27 --> 00:29:30 say that you started at the saddle point in the middle and 383 00:29:30 --> 00:29:33 you try to stay at the same level. 384 00:29:33 --> 00:29:35 So, it looks like a mountain pass, right? 385 00:29:35 --> 00:29:38 Well, there's actually four directions from that point that 386 00:29:38 --> 00:29:41 you can go staying at the same height. 387 00:29:41 --> 00:29:44 And actually, on the map, they look exactly 388 00:29:44 --> 00:29:46 like this, too, these crossing lines. 389 00:29:46 --> 00:29:49 OK, so, these are things that go on the side of the two 390 00:29:49 --> 00:29:53 mountains that are to the left and right, and stay at the same 391 00:29:53 --> 00:29:57 height as the mountain pass. On the other hand, 392 00:29:57 --> 00:30:01 if you go along the y direction, to the left or to the 393 00:30:01 --> 00:30:05 right, then you go towards positive values. 394 00:30:05 --> 00:30:11 And, if you go along the x axis, then you get towards 395 00:30:11 --> 00:30:18 negative values. OK, the equation for, 396 00:30:18 --> 00:30:25 the function was y^2-x^2. So, you can try to plot them by 397 00:30:25 --> 00:30:27 hand and confirmed that it does look like that. 398 00:30:27 --> 00:30:33 But, I trust my computer. And, finally, 399 00:30:33 --> 00:30:39 this one, well, so the contour plot looks a bit 400 00:30:39 --> 00:30:43 complicated. But, you can see two things. 401 00:30:43 --> 00:30:45 In the middle, you can see these two origins 402 00:30:45 --> 00:30:47 with these concentric circles which are not really circles, 403 00:30:47 --> 00:30:50 but, you know, these closed curves that are 404 00:30:50 --> 00:30:53 concentric. And, they correspond to the two 405 00:30:53 --> 00:30:56 mountains. And then, at some point in the 406 00:30:56 --> 00:31:00 middle, we have a mountain pass. And there, we see the two 407 00:31:00 --> 00:31:05 crossing lines again, like, on the plot of y^2-x^2. 408 00:31:05 --> 00:31:11 And so, at this saddle point here, if we go north or south, 409 00:31:11 --> 00:31:15 then we go down on either side to the Valley. 410 00:31:15 --> 00:31:17 And, if we go east or west, then we go towards the 411 00:31:17 --> 00:31:21 mountains. We'll go up. 412 00:31:21 --> 00:31:26 OK, does that make sense a little bit? 413 00:31:26 --> 00:31:31 OK, so, reading plots is not easy, but hopefully we'll get 414 00:31:31 --> 00:31:32 used to it very soon. 415 00:31:32 --> 00:31:44 416 00:31:44 --> 00:31:49 OK, so actually let's say, well, OK, so, 417 00:31:49 --> 00:31:55 I want to point out one thing. The contour plot tells us, 418 00:31:55 --> 00:32:00 actually, what happens when we move, when we change x and y. 419 00:32:00 --> 00:32:05 So, if I change the value of x and y, that means I'm moving 420 00:32:05 --> 00:32:08 east-west or north-south on the map. 421 00:32:08 --> 00:32:12 And then, I can ask myself, is the value of the function 422 00:32:12 --> 00:32:15 increase or decrease in each of these situations? 423 00:32:15 --> 00:32:18 Well, that's the kind of thing that the contour plot can tell 424 00:32:18 --> 00:32:19 me very quickly. 425 00:32:19 --> 00:32:54 426 00:32:54 --> 00:32:56 So -- OK, so say, for example, 427 00:32:56 --> 00:32:59 that I have a piece of contour plot. 428 00:32:59 --> 00:33:01 That looks, you know, like that. 429 00:33:01 --> 00:33:06 Maybe this is f equals one, and this is f equals two. 430 00:33:06 --> 00:33:13 And here, this is f equals zero. And, let's say that I start at 431 00:33:13 --> 00:33:17 the point, say, at this point. 432 00:33:17 --> 00:33:23 OK, so here I have (x0, y0). And, the question I might ask 433 00:33:23 --> 00:33:26 myself is if I change x or y, how does f change? 434 00:33:26 --> 00:33:34 Well, the contour plot tells me that if x increases, 435 00:33:34 --> 00:33:41 and I keep y constant, then what happens to f(x, 436 00:33:41 --> 00:33:44 y)? Well, it will increase because 437 00:33:44 --> 00:33:47 if I move to the right, then I go from one to a value 438 00:33:47 --> 00:33:50 bigger than one. I don't know exactly how much, 439 00:33:50 --> 00:33:53 but I know that somewhere between one and two, 440 00:33:53 --> 00:33:57 it's more than one. If x decreases, 441 00:33:57 --> 00:34:02 then f decreases. And, similarly, 442 00:34:02 --> 00:34:07 I can tell that if y increases, then f, well, 443 00:34:07 --> 00:34:14 it looks like if I increase y, then f will also increase. 444 00:34:14 --> 00:34:20 And, if y decreases, then f decreases. 445 00:34:20 --> 00:34:23 And, that's the kind of qualitative analysis that we can 446 00:34:23 --> 00:34:27 do easily from the contour plot. But, maybe we'd like to 447 00:34:27 --> 00:34:30 actually be more precise in that, and tell how fast f 448 00:34:30 --> 00:34:34 changes if I change x or y. OK, so to find the rate of 449 00:34:34 --> 00:34:39 change, that's exactly where we use derivatives. 450 00:34:39 --> 00:34:47 So -- So, we are going to have to deal with partial 451 00:34:47 --> 00:34:58 derivatives. So, I will explain to you soon 452 00:34:58 --> 00:35:05 why partial. So, let me just remind you 453 00:35:05 --> 00:35:12 first, if you have a function of one variable, 454 00:35:12 --> 00:35:18 then so let's say f of x, then you have a derivative, 455 00:35:18 --> 00:35:22 f prime of x is also called df/dx. 456 00:35:22 --> 00:35:31 And, it's defined as a limit when delta x goes to zero of the 457 00:35:31 --> 00:35:35 change in f. Sorry, it's not going to fit. 458 00:35:35 --> 00:35:42 I have to go to the next line. It's going to be the limit as 459 00:35:42 --> 00:35:47 delta x goes to zero of the rate of change. 460 00:35:47 --> 00:35:52 So, the change in f between x and x plus delta x divided by 461 00:35:52 --> 00:35:56 delta x. Sometimes you write delta f for 462 00:35:56 --> 00:35:59 the change in f divided by delta x. 463 00:35:59 --> 00:36:04 And then, you take the limit of this rate of increase as delta x 464 00:36:04 --> 00:36:05 goes to zero. Now, of course, 465 00:36:05 --> 00:36:08 if you have a formula for f, then you know, 466 00:36:08 --> 00:36:12 at least you should know, I suspect most of you know how 467 00:36:12 --> 00:36:19 to actually take the derivative of a function from its formula. 468 00:36:19 --> 00:36:30 So -- Now, how do we do that? Sorry, and I should also tell 469 00:36:30 --> 00:36:32 you what this means on the graph. 470 00:36:32 --> 00:36:36 So, if I plot the graph of a function, and to have my point, 471 00:36:36 --> 00:36:41 x, and here I have f of x, how do I see the derivative? 472 00:36:41 --> 00:36:48 Well, I look at the tangent line to the graph, 473 00:36:48 --> 00:36:55 and the slope of the tangent line is f prime of x, 474 00:36:55 --> 00:36:59 OK? And, not every function has a 475 00:36:59 --> 00:37:03 derivative. You have functions that are not 476 00:37:03 --> 00:37:05 regular enough to actually have a derivative. 477 00:37:05 --> 00:37:08 So, in this class, we are not going to actually 478 00:37:08 --> 00:37:11 worry too much about differentiability. 479 00:37:11 --> 00:37:16 But, it's good, at least, to be aware that you 480 00:37:16 --> 00:37:19 can't always take the derivative. 481 00:37:19 --> 00:37:24 So, yes, and what else do I want to remind you of? 482 00:37:24 --> 00:37:32 Well, they also have an approximation formula -- -- 483 00:37:32 --> 00:37:39 which says that, you know, if we have the value 484 00:37:39 --> 00:37:41 of f at some point, x0, 485 00:37:41 --> 00:37:47 and that we want to find the value at a nearby point, 486 00:37:47 --> 00:37:51 x close to x0, then our best guess is that 487 00:37:51 --> 00:37:58 it's f of x0 plus the derivative f prime at x0 times delta x, 488 00:37:58 --> 00:38:02 or if you want, x minus x0, OK? 489 00:38:02 --> 00:38:06 Is this kind of familiar to you? Yeah, I mean, 490 00:38:06 --> 00:38:09 maybe with different notations. Maybe you called that delta x 491 00:38:09 --> 00:38:12 or something. Maybe you called that x0 plus h 492 00:38:12 --> 00:38:14 or something. But, it's the usual 493 00:38:14 --> 00:38:18 approximation formula using the derivative. 494 00:38:18 --> 00:38:21 If you put more terms, then you get the dreaded Taylor 495 00:38:21 --> 00:38:24 approximation that I know you guys don't like. 496 00:38:24 --> 00:38:36 So, the question is how do we do the same for a function of 497 00:38:36 --> 00:38:41 two variables, f(x, y)? 498 00:38:41 --> 00:38:45 So, the difficulty there is we can change x, 499 00:38:45 --> 00:38:49 or we can change y, or we can change both. 500 00:38:49 --> 00:38:52 And, presumably, the manner in which f changes 501 00:38:52 --> 00:38:56 will be different depending on whether we change x or y. 502 00:38:56 --> 00:39:00 So, that's why we have several different notions of derivative. 503 00:39:00 --> 00:39:24 504 00:39:24 --> 00:39:37 So, OK, we have a notation. OK, so this is a curly d, 505 00:39:37 --> 00:39:41 and it is not a straight d, and it is not a delta. 506 00:39:41 --> 00:39:44 It's a d that kind of curves backwards like that. 507 00:39:44 --> 00:39:50 And, this symbol is partial. OK, so it's a special notation 508 00:39:50 --> 00:39:54 for partial derivatives. And, essentially what it means 509 00:39:54 --> 00:39:56 is we are going to do a derivative where we care about 510 00:39:56 --> 00:39:59 only one variable at a time. That's why it's partial. 511 00:39:59 --> 00:40:02 It's missing the other variables. 512 00:40:02 --> 00:40:06 So, a function of several variables doesn't have the usual 513 00:40:06 --> 00:40:10 derivative. It has only partial derivatives 514 00:40:10 --> 00:40:15 for each variable. So, the partial derivative, 515 00:40:15 --> 00:40:23 the partial f partial x at (x0, y0) is defined to be the limit 516 00:40:23 --> 00:40:29 when I take a small change in x, delta x, 517 00:40:29 --> 00:40:43 of the change in f -- -- divided by delta x. 518 00:40:43 --> 00:40:47 OK, so here I'm actually not changing y at all. 519 00:40:47 --> 00:40:51 I'm just changing x and looking at the rate of change with 520 00:40:51 --> 00:40:54 respect to x. And, I have the same with 521 00:40:54 --> 00:40:58 respect to y. Partial f partial y is the 522 00:40:58 --> 00:41:04 limit, so I should say, at a point x0 y0 is the limit 523 00:41:04 --> 00:41:13 as delta y turns to zero. So, this time I keep x the 524 00:41:13 --> 00:41:21 same, but I change y. OK, so that's the definition of 525 00:41:21 --> 00:41:26 a partial derivative. And, we say that a function is 526 00:41:26 --> 00:41:29 differentiable if these things exist. 527 00:41:29 --> 00:41:31 OK, so most of the functions we'll see are differentiable. 528 00:41:31 --> 00:41:34 And, we'll actually learn how to compute their partial 529 00:41:34 --> 00:41:38 derivatives without having to do this because we'll just have the 530 00:41:38 --> 00:41:41 usual methods for computing derivatives. 531 00:41:41 --> 00:41:46 So, in fact, I claim you already know how to 532 00:41:46 --> 00:41:49 take partial derivatives. So, let's see what it means 533 00:41:49 --> 00:41:50 geometrically. 534 00:41:50 --> 00:42:00 535 00:42:00 --> 00:42:07 So, geometrically, my function can be represented 536 00:42:07 --> 00:42:12 by this graph, and I fix some point, 537 00:42:12 --> 00:42:18 (x0, y0). And then, I'm going to ask 538 00:42:18 --> 00:42:24 myself what happens if I change the value of, 539 00:42:24 --> 00:42:30 well, x, keeping y constant. So, if I keep y constant and 540 00:42:30 --> 00:42:33 change x, it means that I'm moving forwards or backwards 541 00:42:33 --> 00:42:38 parallel to the x axis. So, that determines for me the 542 00:42:38 --> 00:42:46 vertical plane parallel to the x, z plane when I fix y equals 543 00:42:46 --> 00:42:51 constant. And now, if I slice the graph 544 00:42:51 --> 00:42:59 by that, I will get some curve that goes, it's a slice of the 545 00:42:59 --> 00:43:03 graph of f. And now, what I want to find is 546 00:43:03 --> 00:43:06 how f depends on x if I keep y constant. 547 00:43:06 --> 00:43:09 That means it's the rate of change if I move along this 548 00:43:09 --> 00:43:11 curve. So, in fact, 549 00:43:11 --> 00:43:17 if I look at the slope of this thing. 550 00:43:17 --> 00:43:22 So, if I draw the tangent line to this slice, 551 00:43:22 --> 00:43:28 then the slope will be partial f of partial x. 552 00:43:28 --> 00:43:32 I think I have a better picture of that somewhere. 553 00:43:32 --> 00:43:40 Yes, here it is. OK, that's the same picture, 554 00:43:40 --> 00:43:43 just with different colors. So, I take the graph. 555 00:43:43 --> 00:43:46 I slice it by a vertical plane. I get the curve, 556 00:43:46 --> 00:43:50 and now I take the slope of that curve, and that gives me 557 00:43:50 --> 00:43:54 the partial derivative. And, to finish, 558 00:43:54 --> 00:43:59 let me just tell you how, and I should say, 559 00:43:59 --> 00:44:02 partial f partial y is the same thing but slicing now by your 560 00:44:02 --> 00:44:05 plane that goes in the y, z directions. 561 00:44:05 --> 00:44:11 OK, so I fix x equals constant. That means that I slice by a 562 00:44:11 --> 00:44:13 plane that's parallel to the blackboard. 563 00:44:13 --> 00:44:17 I get a curve, and I looked at the slope of 564 00:44:17 --> 00:44:20 that curve. OK, so it's just a matter of 565 00:44:20 --> 00:44:23 formatting one variable, setting it constant, 566 00:44:23 --> 00:44:27 and looking at the other one. So, how to compute these 567 00:44:27 --> 00:44:29 things, well, we actually, 568 00:44:29 --> 00:44:33 to find, well, there's a piece of notation I 569 00:44:33 --> 00:44:38 haven't told you yet. So, another notation you will 570 00:44:38 --> 00:44:42 see, I think this is what one uses a lot in physics. 571 00:44:42 --> 00:44:45 And, this is what one uses a lot in applied math, 572 00:44:45 --> 00:44:47 which is the same thing as physics but with different 573 00:44:47 --> 00:44:50 notations. OK, so it just too different 574 00:44:50 --> 00:44:54 notations: partial f partial x, or f subscript x. 575 00:44:54 --> 00:45:01 And, they are the same thing. Well, we just treat y as a 576 00:45:01 --> 00:45:10 constant, and x as a variable. And, vice versa if we want to 577 00:45:10 --> 00:45:16 find partial with aspect to y. So, let me just finish with one 578 00:45:16 --> 00:45:22 quick example. Let's say that they give you f 579 00:45:22 --> 00:45:28 of x, y equals x^3y y^2, then partial f partial x. 580 00:45:28 --> 00:45:32 Well, let's take the derivative. So, here it's x^3 times a 581 00:45:32 --> 00:45:37 constant. Derivative of x^3 is 3x^2 times 582 00:45:37 --> 00:45:42 the constant plus what's the derivative of y^2? 583 00:45:42 --> 00:45:45 Zero, because it's a constant. If you do, instead, 584 00:45:45 --> 00:45:48 partial f partial y, then this is actually a 585 00:45:48 --> 00:45:51 constant times y. The derivative of y is one. 586 00:45:51 --> 00:45:57 So, that's just x^3. And, the derivative of y^2 is 587 00:45:57 --> 00:45:59 2y. OK, so it's fairly easy. 588 00:45:59 --> 00:46:02 You just have to keep remembering which one is a 589 00:46:02 --> 00:46:06 variable, and which one isn't. OK, so more about this next 590 00:46:06 --> 00:46:10 time, and we will also learn about maxima and minima in 591 00:46:10 --> 00:46:13 several variables. 592 00:46:13 --> 00:46:18