1 00:00:00,000 --> 00:00:00,920 2 00:00:00,920 --> 00:00:03,649 Let's now expand our knowledge of calculus 3 00:00:03,649 --> 00:00:05,599 to the third dimension. 4 00:00:05,599 --> 00:00:09,169 So first of all, just what does a function look like 5 00:00:09,169 --> 00:00:09,810 in three dimensions? 6 00:00:09,810 --> 00:00:11,280 And actually we'll go over the different types. 7 00:00:11,279 --> 00:00:13,639 Because you can have a line in three dimensions, or kind of 8 00:00:13,640 --> 00:00:14,600 a curve in three dimensions. 9 00:00:14,599 --> 00:00:15,919 You can have a surface. 10 00:00:15,919 --> 00:00:18,309 You could have a vector field. 11 00:00:18,309 --> 00:00:20,539 There are different types of representations we'll see, 12 00:00:20,539 --> 00:00:21,890 when we start working with three dimensions. 13 00:00:21,890 --> 00:00:24,330 But I think the most intuitive-- and none of these 14 00:00:24,329 --> 00:00:26,919 are directly intuitive-- I think you have to really be 15 00:00:26,920 --> 00:00:28,370 able to visualize them. 16 00:00:28,370 --> 00:00:30,950 But the most intuitive, to me at least, is a surface 17 00:00:30,949 --> 00:00:31,620 in three dimensions. 18 00:00:31,620 --> 00:00:34,789 And eventually, we can expand this into n dimensions. 19 00:00:34,789 --> 00:00:36,939 But then it becomes very hard to visualize. 20 00:00:36,939 --> 00:00:40,159 So we had our traditional x and y-axis before, but 21 00:00:40,159 --> 00:00:43,379 now let's give another dimension of height. 22 00:00:43,380 --> 00:00:45,890 Let's say that this is my x-axis-- and I'll draw 23 00:00:45,890 --> 00:00:47,030 the positive quadrant. 24 00:00:47,030 --> 00:00:48,920 That's my x-axis. 25 00:00:48,920 --> 00:00:52,920 That's the y-axis, and that's the z-axis. 26 00:00:52,920 --> 00:00:56,410 And the convention is to kind of follow the right hand rule, 27 00:00:56,409 --> 00:01:01,509 where the x-axis-- taking the cross product of the x-axis 28 00:01:01,509 --> 00:01:03,969 with the y-axis-- is equal to the z-axis. 29 00:01:03,969 --> 00:01:05,909 What do I mean by that? 30 00:01:05,909 --> 00:01:09,549 This is x-- those colors really don't go well together. 31 00:01:09,549 --> 00:01:11,069 This is y. 32 00:01:11,069 --> 00:01:13,229 This is z. 33 00:01:13,230 --> 00:01:14,520 What do I mean by the cross product? 34 00:01:14,519 --> 00:01:17,420 So if this is the unit vector in the x 35 00:01:17,420 --> 00:01:19,390 direction-- so that's i. 36 00:01:19,390 --> 00:01:21,670 Let's say this is a length of 1. 37 00:01:21,670 --> 00:01:25,980 This is in the y-direction, so it's j. 38 00:01:25,980 --> 00:01:26,670 Oops. 39 00:01:26,670 --> 00:01:27,460 j, little cap. 40 00:01:27,459 --> 00:01:29,299 And that cap just means it's a unit vector. 41 00:01:29,299 --> 00:01:31,659 It's in y-direction, but it has a magnitude of 1. 42 00:01:31,659 --> 00:01:33,939 And I'll use a different color for z. 43 00:01:33,939 --> 00:01:36,129 z is up. 44 00:01:36,129 --> 00:01:39,719 And the unit vector for there is k. 45 00:01:39,719 --> 00:01:50,060 And this is just a convention, that i cross j is equal to k. 46 00:01:50,060 --> 00:01:51,189 And that's just the convention, you know, 47 00:01:51,189 --> 00:01:52,129 for drawing the x-axis. 48 00:01:52,129 --> 00:01:54,459 Do we make increasing x pointing out this way? 49 00:01:54,459 --> 00:01:56,469 Or do we make increasing x point inwards? 50 00:01:56,469 --> 00:01:57,780 And this gives us the convention. 51 00:01:57,780 --> 00:02:01,540 So i goes in this direction. 52 00:02:01,540 --> 00:02:04,260 I'm trying to make sure I can do my hand properly. 53 00:02:04,260 --> 00:02:06,600 So let me draw the cross product. 54 00:02:06,599 --> 00:02:09,430 So if you take the first vector, put your index finger 55 00:02:09,430 --> 00:02:14,920 in the direction of the first vector, middle finger in the 56 00:02:14,919 --> 00:02:22,509 direction of the second vector, and your other fingers can 57 00:02:22,509 --> 00:02:23,729 do what they need to do. 58 00:02:23,729 --> 00:02:28,919 So this is going in the direction of i. 59 00:02:28,919 --> 00:02:33,639 That is going in the direction of k. 60 00:02:33,639 --> 00:02:35,429 Sorry, of j, right? 61 00:02:35,430 --> 00:02:36,590 In the y-direction. 62 00:02:36,590 --> 00:02:38,979 And then you have your palm of your thumb, and then your thumb 63 00:02:38,979 --> 00:02:40,719 is going to open up in this direction. 64 00:02:40,719 --> 00:02:42,379 Your thumb is going to point up, which is 65 00:02:42,379 --> 00:02:44,780 the direction of k. 66 00:02:44,780 --> 00:02:46,449 So that's just a-- good to know, where did that 67 00:02:46,449 --> 00:02:47,319 convention come from? 68 00:02:47,319 --> 00:02:50,139 This is kind of called a right-handed coordinate system. 69 00:02:50,139 --> 00:02:52,909 But let's get to the meat and potatoes. 70 00:02:52,909 --> 00:02:56,219 So how do we define a surface in three dimensions? 71 00:02:56,219 --> 00:03:00,490 Well, we can define z as a function of x and y. 72 00:03:00,490 --> 00:03:01,830 So let's do that. 73 00:03:01,830 --> 00:03:08,930 And just the notation, z is equal to a function of x and y. 74 00:03:08,930 --> 00:03:12,110 And all that means is that if I give you an x-value and a 75 00:03:12,110 --> 00:03:14,170 y-value you get a z-value. 76 00:03:14,169 --> 00:03:19,659 And so, I don't know, let's pick one. 77 00:03:19,659 --> 00:03:21,370 z is equal to x plus y. 78 00:03:21,370 --> 00:03:30,210 So this z is equal to, I don't know, x squared plus y. 79 00:03:30,210 --> 00:03:32,050 So how do we plot the points on the surface? 80 00:03:32,050 --> 00:03:34,820 And I'll show you, actually, computer generated surfaces 81 00:03:34,819 --> 00:03:37,329 that are far more professional looking than anything I 82 00:03:37,330 --> 00:03:39,353 could possibly try to draw. 83 00:03:39,353 --> 00:03:45,150 84 00:03:45,150 --> 00:03:56,770 So let's say, what's f of-- f of, I don't know, 2 comma 1. 85 00:03:56,770 --> 00:04:01,350 Well, that would mean x is 2, so it's 2 squared plus 1. 86 00:04:01,349 --> 00:04:02,689 Well, it equals 5. 87 00:04:02,689 --> 00:04:05,629 And if we had to plot that point of the surface-- and 88 00:04:05,629 --> 00:04:08,659 maybe I'll actually graph this one in a little bit-- we 89 00:04:08,659 --> 00:04:10,039 go along the x-axis 2. 90 00:04:10,039 --> 00:04:11,870 So 1, 2. 91 00:04:11,870 --> 00:04:15,069 We go along the y-axis 1. 92 00:04:15,069 --> 00:04:17,909 So if you take this point-- this is x is equal 93 00:04:17,910 --> 00:04:19,380 to y is equal to 1. 94 00:04:19,379 --> 00:04:22,509 And then we go and then we say, well, z is equal to 5. 95 00:04:22,509 --> 00:04:26,120 So we can go up here, I don't know, we'd go up 5 units. 96 00:04:26,120 --> 00:04:27,699 And we would plot that point. 97 00:04:27,699 --> 00:04:29,199 And you would see, if you kept doing that, you 98 00:04:29,199 --> 00:04:31,529 would plot a surface. 99 00:04:31,529 --> 00:04:32,679 You'd plot a surface. 100 00:04:32,680 --> 00:04:35,360 And let me clean this up a little bit. 101 00:04:35,360 --> 00:04:38,550 So the natural question that you might want to ask-- 102 00:04:38,550 --> 00:04:40,139 and actually, let me show you a surface. 103 00:04:40,139 --> 00:04:42,550 I'm afraid that when I manipulate this graph, it'll 104 00:04:42,550 --> 00:04:44,560 slow down my computer and I'll start sounding 105 00:04:44,560 --> 00:04:45,230 like I'm melting. 106 00:04:45,230 --> 00:04:46,879 But I'll take that risk. 107 00:04:46,879 --> 00:04:49,819 Just bear with me. 108 00:04:49,819 --> 00:04:53,849 So here is a surface I use, using this Java applet grapher. 109 00:04:53,850 --> 00:04:54,600 And it's actually free. 110 00:04:54,600 --> 00:04:56,260 I'll give you the link for it. 111 00:04:56,259 --> 00:04:59,000 But this surface right here, this is-- I'll actually show 112 00:04:59,000 --> 00:04:59,680 you the graph of this. 113 00:04:59,680 --> 00:05:01,110 It'll start taking the partial derivative. 114 00:05:01,110 --> 00:05:03,129 Don't worry about this wall. 115 00:05:03,129 --> 00:05:04,170 We'll get to this in a second. 116 00:05:04,170 --> 00:05:06,770 But this is a function of x and y. 117 00:05:06,769 --> 00:05:10,319 You can see this is the x-axis, the y-axis. 118 00:05:10,319 --> 00:05:12,959 The height is the z-axis. 119 00:05:12,959 --> 00:05:14,919 This'll probably really slow down my computer, but you 120 00:05:14,920 --> 00:05:17,480 can actually rotate it. 121 00:05:17,480 --> 00:05:18,090 Look at that. 122 00:05:18,089 --> 00:05:23,669 123 00:05:23,670 --> 00:05:25,910 I don't want to slow. 124 00:05:25,910 --> 00:05:28,189 I don't want to slow things too down while I'm trying 125 00:05:28,189 --> 00:05:29,579 to do my screen capture. 126 00:05:29,579 --> 00:05:32,269 Anyway, I think you'd understand, where you pick an 127 00:05:32,269 --> 00:05:35,680 x-point, you pick a y-point, and then z-- this surface right 128 00:05:35,680 --> 00:05:38,800 here, without this line intersecting it-- this 129 00:05:38,800 --> 00:05:41,699 surface right here, is a function of x and y. 130 00:05:41,699 --> 00:05:45,639 131 00:05:45,639 --> 00:05:48,069 So the question is, well, how do we apply 132 00:05:48,069 --> 00:05:50,829 calculus to surfaces? 133 00:05:50,829 --> 00:05:54,639 Because-- actually, let me bring that thing out again. 134 00:05:54,639 --> 00:05:56,800 Because if you look at this surface, if you were to pick 135 00:05:56,800 --> 00:05:58,780 any arbitrary point on this surface, and say, what is 136 00:05:58,779 --> 00:06:00,469 the slope of that surface? 137 00:06:00,470 --> 00:06:03,000 Well, it kind of has no meaning, because you have to 138 00:06:03,000 --> 00:06:03,970 kind of pick a direction. 139 00:06:03,970 --> 00:06:06,370 If you said, what is the slope of the tangent line? 140 00:06:06,370 --> 00:06:09,230 Any point on this graph actually has an infinite 141 00:06:09,230 --> 00:06:10,569 number of tangent lines. 142 00:06:10,569 --> 00:06:11,599 I mean, think of it this way. 143 00:06:11,600 --> 00:06:14,240 Take a bowl or something that maybe-- you know, like this. 144 00:06:14,240 --> 00:06:17,370 And then take a, I don't know, a toothpick. 145 00:06:17,370 --> 00:06:20,420 And make that toothpick tangent to the bowl, and you can see 146 00:06:20,420 --> 00:06:22,879 that on any point on the bowl, you can just rotate 147 00:06:22,879 --> 00:06:24,199 that toothpick around. 148 00:06:24,199 --> 00:06:28,509 So you kind of have to pick the orientation of that toothpick. 149 00:06:28,509 --> 00:06:31,029 So what we're going to learn is when you take a derivative in 150 00:06:31,029 --> 00:06:33,389 three dimensions, you have to specify the direction that 151 00:06:33,389 --> 00:06:35,360 you're taking the derivative in. 152 00:06:35,360 --> 00:06:38,889 And this is why I actually drew this wall here. 153 00:06:38,889 --> 00:06:42,449 This wall is the equation y is equal to 0.3. 154 00:06:42,449 --> 00:06:43,545 So you can kind of view it. 155 00:06:43,545 --> 00:06:47,949 Along this wall, y is a constant, right? 156 00:06:47,949 --> 00:06:50,699 So if we assume that y is constant, then maybe we could 157 00:06:50,699 --> 00:06:53,159 take just the derivative with respect to x. 158 00:06:53,160 --> 00:06:55,510 So we would essentially take the slope of this 159 00:06:55,509 --> 00:06:58,269 curve right here. 160 00:06:58,269 --> 00:06:59,729 And let's figure out how to do it. 161 00:06:59,730 --> 00:07:02,110 So first of all, what is the equation of this surface? 162 00:07:02,110 --> 00:07:04,980 And I just picked one that they had on Wikipedia. 163 00:07:04,980 --> 00:07:06,850 But the equation of that surface is-- and I'm going to 164 00:07:06,850 --> 00:07:10,896 remove this now, so I don't sound like I'm melting. 165 00:07:10,896 --> 00:07:13,890 The equation of that surface-- and let me just clear out 166 00:07:13,889 --> 00:07:17,694 everything, just because we'll probably need the extra space. 167 00:07:17,694 --> 00:07:20,379 168 00:07:20,379 --> 00:07:22,579 Go back to the pen tool. 169 00:07:22,579 --> 00:07:31,909 The equation is z is equal to x squared plus xy plus y squared. 170 00:07:31,910 --> 00:07:34,980 So we said if we want to take a derivative, it's hard to-- you 171 00:07:34,980 --> 00:07:36,930 know, you can't just say there is one derivative. 172 00:07:36,930 --> 00:07:37,980 We have to pick a direction. 173 00:07:37,980 --> 00:07:40,200 We have to hold everything else constant and take the 174 00:07:40,199 --> 00:07:43,300 derivative with respect to just one variable. 175 00:07:43,300 --> 00:07:46,400 And that is called the partial derivative. 176 00:07:46,399 --> 00:07:47,919 I know it sounds fancy, but you'll see. 177 00:07:47,920 --> 00:07:50,050 It's actually no harder than taking a regular derivative. 178 00:07:50,050 --> 00:07:52,560 You just have to make sure you remember which variable is a 179 00:07:52,560 --> 00:07:54,449 variable, and which one is a constant. 180 00:07:54,449 --> 00:07:56,259 So let's say we wanted to hold y constant. 181 00:07:56,259 --> 00:07:59,430 And we just say, for any constant y, how much does z 182 00:07:59,430 --> 00:08:01,610 change with respect to x? 183 00:08:01,610 --> 00:08:03,660 Then we take the partial derivative-- this 184 00:08:03,660 --> 00:08:04,195 is the notation. 185 00:08:04,194 --> 00:08:07,099 186 00:08:07,100 --> 00:08:09,410 You can view it as a d with the top curled. 187 00:08:09,410 --> 00:08:17,080 The partial derivative of z with respect to x. 188 00:08:17,079 --> 00:08:20,129 It equals-- all we do is we take this expression-- we take 189 00:08:20,129 --> 00:08:22,269 the derivative of x-- and we just assume that y 190 00:08:22,269 --> 00:08:23,659 is some constant. 191 00:08:23,660 --> 00:08:26,470 So what's the derivative of 2x with respect to x? 192 00:08:26,470 --> 00:08:29,460 Well, it's just 2x. 193 00:08:29,459 --> 00:08:31,639 What's the derivative of xy with respect to x? 194 00:08:31,639 --> 00:08:32,944 Well, y is just a number. 195 00:08:32,945 --> 00:08:33,710 It's just a constant. 196 00:08:33,710 --> 00:08:35,889 Remember, we're taking an implicit derivative here. 197 00:08:35,889 --> 00:08:37,429 y is just a constant. 198 00:08:37,429 --> 00:08:40,299 So if you have some constant times x, the derivative of 199 00:08:40,299 --> 00:08:42,049 that is just the constant. 200 00:08:42,049 --> 00:08:43,240 Plus y. 201 00:08:43,240 --> 00:08:47,490 And then what's the derivative of y squared with respect to x? 202 00:08:47,490 --> 00:08:49,409 Well, we're assuming y squared is a constant. 203 00:08:49,409 --> 00:08:51,579 It's just a number, right? y is just a number. 204 00:08:51,580 --> 00:08:52,955 So the derivative of just the number with respect 205 00:08:52,955 --> 00:08:54,230 to x is just 0. 206 00:08:54,230 --> 00:08:56,470 So the derivative of that is 0. 207 00:08:56,470 --> 00:09:03,129 So the partial derivative of z with respect to x is 2x plus y. 208 00:09:03,129 --> 00:09:04,769 Now, what does that mean? 209 00:09:04,769 --> 00:09:07,539 Well, that means if I were-- and actually, let me give you 210 00:09:07,539 --> 00:09:09,459 a little notation, before I show you what that means. 211 00:09:09,460 --> 00:09:12,610 Another way to write this exact same thing is if we wrote that 212 00:09:12,610 --> 00:09:20,379 f of xy is equal to the same thing-- x squared plus xy plus 213 00:09:20,379 --> 00:09:25,090 y squared-- the partial of f with respect to x we could 214 00:09:25,090 --> 00:09:27,639 have written as this. 215 00:09:27,639 --> 00:09:31,210 The partial derivative of f with respect to x-- and still 216 00:09:31,210 --> 00:09:33,139 a function of x and y, right? 217 00:09:33,139 --> 00:09:35,949 It still depends on what constant y you're using-- 218 00:09:35,950 --> 00:09:40,270 is equal to 2x plus y. 219 00:09:40,269 --> 00:09:43,059 Anyway, I thought it's nice to see that notation. 220 00:09:43,059 --> 00:09:44,099 Now, what does this mean? 221 00:09:44,100 --> 00:09:47,370 Well, what is the slope of z with respect to x at, say, 222 00:09:47,370 --> 00:09:54,080 when x is 1 and-- actually, let's pick smaller numbers. 223 00:09:54,080 --> 00:09:58,530 When x is equal to, I don't know, when x is equal to 0.2 224 00:09:58,529 --> 00:10:04,419 and y is equal to, I don't know, 0.3. 225 00:10:04,419 --> 00:10:06,279 Well, we could use this. 226 00:10:06,279 --> 00:10:10,730 The partial derivative of f, with respect to x, at the 227 00:10:10,730 --> 00:10:16,330 point 0.2, 0.3 is equal to 2 times x-- that's 0.4-- 228 00:10:16,330 --> 00:10:18,800 plus y-- plus 0.3. 229 00:10:18,799 --> 00:10:24,729 So the slope of this function with respect to x at the 0.2, 230 00:10:24,730 --> 00:10:28,491 comma 0.3, is equal to 0.7. 231 00:10:28,491 --> 00:10:30,480 Let's see if we can visualize that. 232 00:10:30,480 --> 00:10:34,039 233 00:10:34,039 --> 00:10:39,189 So that wall represents the line y is equal to 0.3. 234 00:10:39,190 --> 00:10:42,700 And we want the slope at equal at-- x is equal to 0.2. 235 00:10:42,700 --> 00:10:45,320 So this is x is 0.2, right here. 236 00:10:45,320 --> 00:10:47,140 So the rate at which the height, or the rate at 237 00:10:47,139 --> 00:10:50,750 which z is changing with respect to x, is 0.7. 238 00:10:50,750 --> 00:10:56,429 So every time x increases 1, z will increase by 0.7. 239 00:10:56,429 --> 00:10:58,849 So the slope is a little bit less than 1. 240 00:10:58,850 --> 00:10:59,889 I think you see that, right? 241 00:10:59,889 --> 00:11:02,600 The tangent right here is increasing with increasing 242 00:11:02,600 --> 00:11:06,330 values of x, but a little bit less than 45 degrees. 243 00:11:06,330 --> 00:11:08,120 Anyway, I'm all out of time. 244 00:11:08,120 --> 00:11:10,340 See you in the next video. 245 00:11:10,340 --> 00:11:10,399