1 00:00:00,000 --> 00:00:07,160 2 00:00:07,160 --> 00:00:07,600 JOEL LEWIS: Hi. 3 00:00:07,600 --> 00:00:09,200 Welcome back to recitation. 4 00:00:09,200 --> 00:00:11,730 One of the things you've been learning about in lecture is 5 00:00:11,730 --> 00:00:14,730 how to solve some max-min problems. How to find the 6 00:00:14,730 --> 00:00:18,160 maximum or minimum of a given function given some 7 00:00:18,160 --> 00:00:21,880 constraints and figure out where it reaches its largest 8 00:00:21,880 --> 00:00:22,990 or smallest value. 9 00:00:22,990 --> 00:00:26,760 So here I have a particular example of such a problem. 10 00:00:26,760 --> 00:00:30,400 So we're going to build a cardboard box. 11 00:00:30,400 --> 00:00:33,910 And our cardboard box has to meet the following criteria. 12 00:00:33,910 --> 00:00:38,190 So its volume has to be 3 units. 13 00:00:38,190 --> 00:00:43,460 The front and back of the cardboard box are going to be 14 00:00:43,460 --> 00:00:46,260 made just of single-thickness cardboard. 15 00:00:46,260 --> 00:00:48,760 But the two sides, the left and right, are going to be 16 00:00:48,760 --> 00:00:50,290 made double-thick. 17 00:00:50,290 --> 00:00:53,370 And the bottom is going to be made triple-thick. 18 00:00:53,370 --> 00:00:54,760 We're not going to have a top, it's just going 19 00:00:54,760 --> 00:00:55,660 to be an open box. 20 00:00:55,660 --> 00:00:58,960 So it's going to have five sides: two of single 21 00:00:58,960 --> 00:01:01,590 thickness, two of double thickness, and with the bottom 22 00:01:01,590 --> 00:01:02,840 of triple thickness. 23 00:01:02,840 --> 00:01:05,860 24 00:01:05,860 --> 00:01:06,880 So, the question is-- there are, you know, a lot of 25 00:01:06,880 --> 00:01:11,205 different shapes of box with total volume 3 units. 26 00:01:11,205 --> 00:01:14,140 So the question is what dimensions should this box 27 00:01:14,140 --> 00:01:16,730 have so that we use the minimum amount 28 00:01:16,730 --> 00:01:18,680 of cardboard possible? 29 00:01:18,680 --> 00:01:19,030 All right? 30 00:01:19,030 --> 00:01:21,950 So we want the dimensions of the box that use the least 31 00:01:21,950 --> 00:01:23,670 total amount cardboard. 32 00:01:23,670 --> 00:01:25,780 So why don't you pause the video, work on that for 33 00:01:25,780 --> 00:01:36,870 awhile, come back, and we can work on it together 34 00:01:36,870 --> 00:01:39,290 I hope you had some fun puzzling this one out. 35 00:01:39,290 --> 00:01:41,190 Let's have a go at it. 36 00:01:41,190 --> 00:01:43,280 So to start, I think I'd just like to draw a little 37 00:01:43,280 --> 00:01:45,630 picture of a box. 38 00:01:45,630 --> 00:01:53,980 So here's my cardboard box. 39 00:01:53,980 --> 00:01:55,486 Its top is going to be open, say. 40 00:01:55,486 --> 00:01:57,350 So let's give it-- 41 00:01:57,350 --> 00:02:01,200 we want to figure out what its dimensions should be in order 42 00:02:01,200 --> 00:02:05,270 to minimize some expression, so let's give them names. 43 00:02:05,270 --> 00:02:05,550 Right? 44 00:02:05,550 --> 00:02:08,640 So I think a natural thing to call them is we can call one 45 00:02:08,640 --> 00:02:14,940 of them x and one of them y and the height z. 46 00:02:14,940 --> 00:02:16,300 There. 47 00:02:16,300 --> 00:02:21,510 So if we give the box these dimensions x, y, and z, we 48 00:02:21,510 --> 00:02:24,320 need to ask, well first of all, what is its volume? 49 00:02:24,320 --> 00:02:26,580 And second of all, how much cardboard is used? 50 00:02:26,580 --> 00:02:29,380 And as long as we can keep the volume equal to 3, what's the 51 00:02:29,380 --> 00:02:30,960 least amount of cardboard we can use? 52 00:02:30,960 --> 00:02:35,170 So the volume of this box is just xyz and that has to be 3. 53 00:02:35,170 --> 00:02:43,790 So we know xyz is equal to the volume, which is equal to 3. 54 00:02:43,790 --> 00:02:47,720 So we have a constraint on x, y, and z here. 55 00:02:47,720 --> 00:02:50,980 And the thing that we want to optimize-- 56 00:02:50,980 --> 00:02:52,850 that we want to find a minimum for-- 57 00:02:52,850 --> 00:02:55,360 58 00:02:55,360 --> 00:02:57,860 is the total amount of cardboard used. 59 00:02:57,860 --> 00:03:04,830 60 00:03:04,830 --> 00:03:07,500 So let's talk about how much cardboard is used. 61 00:03:07,500 --> 00:03:11,800 So the bottom of the box is triple-thick. 62 00:03:11,800 --> 00:03:15,230 So its area is x times y. 63 00:03:15,230 --> 00:03:18,345 So the total amount of cardboard used is 3xy. 64 00:03:18,345 --> 00:03:21,150 65 00:03:21,150 --> 00:03:27,220 Now, the front and back of the box are single thickness. 66 00:03:27,220 --> 00:03:31,423 And they have area xy, but there-- 67 00:03:31,423 --> 00:03:32,280 sorry, not xy, xz, right? 68 00:03:32,280 --> 00:03:35,420 This height is z, so it's x times z-- and 69 00:03:35,420 --> 00:03:36,420 there are two of them. 70 00:03:36,420 --> 00:03:41,180 So we have xz total cardboard in front and xz total 71 00:03:41,180 --> 00:03:41,950 cardboard in back. 72 00:03:41,950 --> 00:03:45,960 Oh, I guess this has another segment there in back because 73 00:03:45,960 --> 00:03:47,580 it's an open box. 74 00:03:47,580 --> 00:03:49,590 So xz and xz. 75 00:03:49,590 --> 00:03:54,280 So that's 2xz coming from the front and back. 76 00:03:54,280 --> 00:03:59,380 And from the two sides, well each side has area yz. 77 00:03:59,380 --> 00:04:01,470 There are two of them and they're double-thick. 78 00:04:01,470 --> 00:04:08,160 So that contributes 4yz to the total amount 79 00:04:08,160 --> 00:04:08,760 of cardboard used. 80 00:04:08,760 --> 00:04:11,270 So this is the total amount of cardboard used. 81 00:04:11,270 --> 00:04:14,590 And we know xyz is equal to 3. 82 00:04:14,590 --> 00:04:19,680 So we want to minimize this, but we want to minimize this 83 00:04:19,680 --> 00:04:22,450 taking this into account, taking this restriction on the 84 00:04:22,450 --> 00:04:23,550 volume into account. 85 00:04:23,550 --> 00:04:26,810 So what we can do is you can realize that we can just 86 00:04:26,810 --> 00:04:28,650 eliminate one of these variables. 87 00:04:28,650 --> 00:04:29,210 Right? 88 00:04:29,210 --> 00:04:31,760 We can say z is equal to 3 over xy. 89 00:04:31,760 --> 00:04:33,490 That always has to be true. 90 00:04:33,490 --> 00:04:36,580 And if we make that substitution in here, then 91 00:04:36,580 --> 00:04:40,250 we'll be able to minimize this expression without regard to 92 00:04:40,250 --> 00:04:41,700 any constraint anymore. 93 00:04:41,700 --> 00:04:53,440 So from xyz equals 3, we have z equals 3 over xy. 94 00:04:53,440 --> 00:05:07,100 So we want to minimize what we get when we plug z equals 3 95 00:05:07,100 --> 00:05:08,310 over xy into here. 96 00:05:08,310 --> 00:05:12,770 So that's 3xy, plus-- 97 00:05:12,770 --> 00:05:16,490 well, 2x times 3 over xy is-- 98 00:05:16,490 --> 00:05:23,490 6 over y, plus-- and 4y times 3 over xy is-- 99 00:05:23,490 --> 00:05:26,900 12 over x. 100 00:05:26,900 --> 00:05:30,820 And one other thing I guess we haven't mentioned explicitly 101 00:05:30,820 --> 00:05:33,420 is that this is a physical box. 102 00:05:33,420 --> 00:05:39,878 It has actual dimensions, so its dimensions have to be, you 103 00:05:39,878 --> 00:05:43,050 know-- they're lengths, they have to be positive numbers. 104 00:05:43,050 --> 00:05:50,690 So we want for x to be positive and we want for y to 105 00:05:50,690 --> 00:05:52,320 be positive numbers. 106 00:05:52,320 --> 00:05:53,250 OK. 107 00:05:53,250 --> 00:05:55,540 So now we've got this function. 108 00:05:55,540 --> 00:05:56,190 And there aren't-- 109 00:05:56,190 --> 00:05:59,800 x and y can be anything, any value of x and y we choose. 110 00:05:59,800 --> 00:06:03,570 This describes the amount of cardboard used in a box with 111 00:06:03,570 --> 00:06:07,390 those dimensions on its base that has volume 3. 112 00:06:07,390 --> 00:06:07,970 All right? 113 00:06:07,970 --> 00:06:09,770 So we want to minimize that. 114 00:06:09,770 --> 00:06:13,990 So now we've finally got to the point of our calculus. 115 00:06:13,990 --> 00:06:16,520 Let's call this function-- 116 00:06:16,520 --> 00:06:17,770 let's give it a name like, I don't know-- 117 00:06:17,770 --> 00:06:20,850 118 00:06:20,850 --> 00:06:22,800 f of x, y. 119 00:06:22,800 --> 00:06:25,980 So we want to find the global minimum of f. 120 00:06:25,980 --> 00:06:28,430 We want to find the absolute least amount of cardboard that 121 00:06:28,430 --> 00:06:30,110 we can use. 122 00:06:30,110 --> 00:06:32,840 So there are several possibilities for where a 123 00:06:32,840 --> 00:06:34,570 global minimum can occur. 124 00:06:34,570 --> 00:06:41,810 It can occur on some critical point of the function, or it 125 00:06:41,810 --> 00:06:44,340 can occur on the boundary of the region where the function 126 00:06:44,340 --> 00:06:45,400 is defined. 127 00:06:45,400 --> 00:06:48,070 And in this case, that includes the possibility that 128 00:06:48,070 --> 00:06:52,790 it can occur as x or y or both go off to infinity. 129 00:06:52,790 --> 00:06:53,350 All right? 130 00:06:53,350 --> 00:06:57,290 So we have to look at those possibilities. 131 00:06:57,290 --> 00:07:00,040 In particular, we have to look at the critical points. 132 00:07:00,040 --> 00:07:02,010 That's one of the possibilities. 133 00:07:02,010 --> 00:07:03,880 So the critical points of f. 134 00:07:03,880 --> 00:07:07,680 So we need to find out what those points are. 135 00:07:07,680 --> 00:07:11,530 136 00:07:11,530 --> 00:07:12,800 So in order to find the critical points, 137 00:07:12,800 --> 00:07:13,490 well what do we do? 138 00:07:13,490 --> 00:07:14,840 We do the usual thing. 139 00:07:14,840 --> 00:07:16,550 We look at its partial derivatives. 140 00:07:16,550 --> 00:07:17,800 So we need the first and second-- or sorry-- 141 00:07:17,800 --> 00:07:20,230 142 00:07:20,230 --> 00:07:23,440 the first partial derivatives with respect to x and y, we 143 00:07:23,440 --> 00:07:26,030 need both of them to be equal to 0. 144 00:07:26,030 --> 00:07:34,520 So we need fx equals 0, and fy equals 0. 145 00:07:34,520 --> 00:07:38,880 OK, so let's write down what that means over here. 146 00:07:38,880 --> 00:07:40,330 So what is fx? 147 00:07:40,330 --> 00:07:42,760 Well, we just take the partials. 148 00:07:42,760 --> 00:07:45,020 So it's 3y-- 149 00:07:45,020 --> 00:07:47,800 plus we take the partial of 6y with respect to x and we get 150 00:07:47,800 --> 00:07:51,580 0, and we take the partial of 12 over x with respect to x-- 151 00:07:51,580 --> 00:07:55,030 and we get minus 12 over x squared. 152 00:07:55,030 --> 00:08:01,550 So that's fx, and we need that to be equal to 0. 153 00:08:01,550 --> 00:08:10,060 And fy is equal to 3x minus 6 over y squared, and we also 154 00:08:10,060 --> 00:08:13,030 need that to be equal to 0. 155 00:08:13,030 --> 00:08:15,570 So if we solve this first equation, for example, we can 156 00:08:15,570 --> 00:08:17,820 solve it for y in terms of x. 157 00:08:17,820 --> 00:08:22,490 And that tells me that y is equal to-- 158 00:08:22,490 --> 00:08:23,130 I need-- let's see-- 159 00:08:23,130 --> 00:08:26,200 12 over x squared divided by 3, so that's-- 160 00:08:26,200 --> 00:08:29,880 4 over x squared. 161 00:08:29,880 --> 00:08:33,760 Now I can plug this 4 over x squared in down here, and so I 162 00:08:33,760 --> 00:08:38,630 get 3x minus 6. 163 00:08:38,630 --> 00:08:43,460 Well, 6 divided by 4 divided by x squared quantity squared 164 00:08:43,460 --> 00:08:50,510 is 6 times x squared over 4 squared. 165 00:08:50,510 --> 00:08:52,080 That has to be equal to 0. 166 00:08:52,080 --> 00:08:54,710 And I can-- let's see- I can rewrite this. 167 00:08:54,710 --> 00:08:57,640 Maybe I'll divide through by 3 as that 3 168 00:08:57,640 --> 00:08:58,690 isn't going to matter. 169 00:08:58,690 --> 00:09:00,700 So it's x minus-- 170 00:09:00,700 --> 00:09:05,786 so then I'll be left with 2 times x to the fourth over 16, 171 00:09:05,786 --> 00:09:07,036 so that's-- 172 00:09:07,036 --> 00:09:09,280 173 00:09:09,280 --> 00:09:14,170 x to the fourth over 8 equals 0. 174 00:09:14,170 --> 00:09:17,540 And you can see in this equation that either x is 175 00:09:17,540 --> 00:09:21,845 equal to 0, or we can divide by x and then we get x 176 00:09:21,845 --> 00:09:23,140 cubed equals 8. 177 00:09:23,140 --> 00:09:28,120 So x equals 0 or x cubed equals 8. 178 00:09:28,120 --> 00:09:32,160 The only solution is x equals 2. 179 00:09:32,160 --> 00:09:36,180 Now, it's easy to see that we can't have a box with x equal 180 00:09:36,180 --> 00:09:37,770 to 0, right? 181 00:09:37,770 --> 00:09:42,520 Our function is not actually defined at x equals 0 over 182 00:09:42,520 --> 00:09:43,610 here, you'll see, right. 183 00:09:43,610 --> 00:09:48,160 Our function had a 12 over x in it, so we can't have x 184 00:09:48,160 --> 00:09:49,200 equal to 0. 185 00:09:49,200 --> 00:09:50,992 So that's not going to be a critical point of this 186 00:09:50,992 --> 00:09:53,080 function. x equals 0 isn't going to lead to a critical 187 00:09:53,080 --> 00:09:56,760 point, so, OK, so our only critical points are going to 188 00:09:56,760 --> 00:09:59,000 happen when x is equal to 2. 189 00:09:59,000 --> 00:10:01,620 And when x is equal to 2, we can go back up here and we see 190 00:10:01,620 --> 00:10:04,780 that y was equal to 4 over x squared at 191 00:10:04,780 --> 00:10:05,780 our critical points. 192 00:10:05,780 --> 00:10:21,370 So the only critical point is 2, 1. 193 00:10:21,370 --> 00:10:22,210 OK. 194 00:10:22,210 --> 00:10:23,700 So that's our critical point. 195 00:10:23,700 --> 00:10:28,760 So now, we want to think about is this point going to be a 196 00:10:28,760 --> 00:10:31,730 maximum or a minimum or what? 197 00:10:31,730 --> 00:10:35,690 And where is the global minimum of this 198 00:10:35,690 --> 00:10:37,300 function going to occur? 199 00:10:37,300 --> 00:10:40,050 So remember that the global minimum of this function can 200 00:10:40,050 --> 00:10:44,820 occur either on the critical points or on the boundary or 201 00:10:44,820 --> 00:10:49,790 at a point where x or y is going to infinity-- 202 00:10:49,790 --> 00:10:51,470 in the limit, I guess I mean. 203 00:10:51,470 --> 00:10:55,300 So lets go back here and take a look at our function here. 204 00:10:55,300 --> 00:10:59,590 So we can see from the expression for this function 205 00:10:59,590 --> 00:11:03,270 that if x and y are going to infinity, this is no good. 206 00:11:03,270 --> 00:11:05,030 This part is going to go to infinity. 207 00:11:05,030 --> 00:11:06,850 3xy is going to go to infinity, and these are going 208 00:11:06,850 --> 00:11:10,160 to be positive, so f is going to go to infinity. 209 00:11:10,160 --> 00:11:14,980 OK, so as the dimensions of our box get very, very large, 210 00:11:14,980 --> 00:11:19,010 the total amount of cardboard used becomes infinite. 211 00:11:19,010 --> 00:11:23,420 Also, if x or y gets closer and closer to 0-- 212 00:11:23,420 --> 00:11:24,880 that's at the boundary-- 213 00:11:24,880 --> 00:11:28,860 well, if x gets closer and closer to 0, than 12 over x 214 00:11:28,860 --> 00:11:31,240 gets closer and closer to infinity. 215 00:11:31,240 --> 00:11:35,020 And if y gets closer and closer to 0, then 6 over y 216 00:11:35,020 --> 00:11:36,530 gets closer and closer to infinity. 217 00:11:36,530 --> 00:11:38,760 And again, all these terms are going to be positive because x 218 00:11:38,760 --> 00:11:40,210 and y have to be positive. 219 00:11:40,210 --> 00:11:45,400 So in those limiting cases, the function f of x, y gets 220 00:11:45,400 --> 00:11:46,890 infinitely large. 221 00:11:46,890 --> 00:11:49,980 So along the boundary and as x and y go to infinity, this 222 00:11:49,980 --> 00:11:50,940 function blows up. 223 00:11:50,940 --> 00:11:52,160 It gets very, very big. 224 00:11:52,160 --> 00:11:57,140 So that means the only place it could have a global-- so it 225 00:11:57,140 --> 00:11:58,650 has a global minimum-- the only place that global minimum 226 00:11:58,650 --> 00:12:01,080 can be is at a critical point. 227 00:12:01,080 --> 00:12:04,230 And we saw, if we walk back over here again, that the only 228 00:12:04,230 --> 00:12:07,370 critical point is the point 2, 1. 229 00:12:07,370 --> 00:12:07,740 All right? 230 00:12:07,740 --> 00:12:09,530 So that means this point has to be a global 231 00:12:09,530 --> 00:12:10,910 minimum for the function. 232 00:12:10,910 --> 00:12:13,510 Now, you might, out of curiosity, you might ask how 233 00:12:13,510 --> 00:12:17,170 much cardboard are we actually talking about in that case? 234 00:12:17,170 --> 00:12:17,738 Since that's really the one part, I guess wan't really 235 00:12:17,738 --> 00:12:25,310 part of the question, but its an interesting thing to ask. 236 00:12:25,310 --> 00:12:35,110 So in this case, we use f of 2, 1 equals-- well let's see-- 237 00:12:35,110 --> 00:12:42,850 so that's 6 plus 6 plus 6 equals 18 238 00:12:42,850 --> 00:12:46,560 units squared of cardboard. 239 00:12:46,560 --> 00:12:50,810 Now, I guess one thing you might notice is we didn't use 240 00:12:50,810 --> 00:12:52,100 the second derivative test here. 241 00:12:52,100 --> 00:12:54,360 And the question is why-- 242 00:12:54,360 --> 00:12:58,050 I mean, we concluded it was a global maximum without ever 243 00:12:58,050 --> 00:13:02,250 using the second derivative test. Sorry, global minimum. 244 00:13:02,250 --> 00:13:03,730 Pardon me. 245 00:13:03,730 --> 00:13:05,530 And the second derivative test is the thing that tells us 246 00:13:05,530 --> 00:13:07,790 whether things are minimum or maximum or saddle points. 247 00:13:07,790 --> 00:13:09,260 So why didn't we use it? 248 00:13:09,260 --> 00:13:11,540 Well, the answer is the second derivative test tells you 249 00:13:11,540 --> 00:13:16,070 whether something is a local minimum or maximum or whether 250 00:13:16,070 --> 00:13:18,220 it's a saddle point. 251 00:13:18,220 --> 00:13:20,760 So if we had applied the second derivative test at this 252 00:13:20,760 --> 00:13:23,050 critical point, what we would have learned is that this 253 00:13:23,050 --> 00:13:25,480 critical point is a local minimum. 254 00:13:25,480 --> 00:13:28,700 But being a local minimum isn't enough to guarantee that 255 00:13:28,700 --> 00:13:29,610 it's a global minimum. 256 00:13:29,610 --> 00:13:31,600 Because we could have on the boundary-- 257 00:13:31,600 --> 00:13:33,490 or as x or y goes to infinity-- 258 00:13:33,490 --> 00:13:35,620 we could have that the function value get smaller and 259 00:13:35,620 --> 00:13:36,830 smaller without bound. 260 00:13:36,830 --> 00:13:38,340 Now in this case, we showed that the 261 00:13:38,340 --> 00:13:39,720 function doesn't do that. 262 00:13:39,720 --> 00:13:41,660 It gets larger and larger without bound. 263 00:13:41,660 --> 00:13:45,450 And so that meant that that minimum point really is the 264 00:13:45,450 --> 00:13:47,430 global minimum. 265 00:13:47,430 --> 00:13:51,360 But the second derivative test isn't enough to conclude that 266 00:13:51,360 --> 00:13:53,030 something is a global minimum on its own. 267 00:13:53,030 --> 00:13:56,600 You really do need that extra analysis that we did. 268 00:13:56,600 --> 00:13:58,220 I'll end there. 269 00:13:58,220 --> 00:13:58,372