1 00:00:00,012 --> 00:00:07,068 Here's another timeless classic, another optimization problem that just comes up in 2 00:00:07,068 --> 00:00:12,986 all the calculus textbooks. Goes like this: you've got some big object 3 00:00:12,986 --> 00:00:17,193 and you want to move that big object around a corner. 4 00:00:17,193 --> 00:00:22,626 The question is for some given corner, how big of a object can you navigate around 5 00:00:22,626 --> 00:00:26,097 that corner. This is an example of the so called piano 6 00:00:26,097 --> 00:00:29,811 moving problem. A piano is way to complicated of an object 7 00:00:29,811 --> 00:00:35,201 to really understand in this course right, it's just got a way to much geometry going 8 00:00:35,201 --> 00:00:38,461 on there. So going to consider a simpler example. 9 00:00:38,462 --> 00:00:44,378 So here's our diagram of a corner and I mentioned that I want to move this red 10 00:00:44,378 --> 00:00:48,605 stick around this corner without it getting stuck. 11 00:00:48,605 --> 00:00:54,819 Maybe it doesn't look like it but this problem can be set up as an optimization 12 00:00:54,819 --> 00:01:00,336 problem and we can solve it. It's an optimization problem, because I'm 13 00:01:00,336 --> 00:01:06,121 asking to know the length of the longest stick, that I can navigate around this 14 00:01:06,121 --> 00:01:09,709 corner. We have to think about where that stick 15 00:01:09,709 --> 00:01:13,156 can get stuck. Well the stick is going to get stuck when 16 00:01:13,156 --> 00:01:17,313 it's in a position like this. When it's touching these two walls and 17 00:01:17,313 --> 00:01:21,796 pressed up against this corner. So, what I actually have to think about is 18 00:01:21,796 --> 00:01:26,760 what's the shortest length of stick that simultaneously touches this wall, this 19 00:01:26,760 --> 00:01:30,380 wall and this corner. I think it's a little bit funny that in 20 00:01:30,380 --> 00:01:33,875 order to solve this problem, we end up minimizing something. 21 00:01:33,875 --> 00:01:38,504 We actually want to figure out the longest length, the maximum length of a stick that 22 00:01:38,504 --> 00:01:42,666 can be navigated around that corner. But to answer that problem, we end up 23 00:01:42,666 --> 00:01:46,846 solving a minimization problem. Well anyhow, let's proceed in our usual 24 00:01:46,846 --> 00:01:49,022 way. I'm going to draw a picture and label 25 00:01:49,022 --> 00:01:52,098 everything. So, here I have drawn this picture and I 26 00:01:52,098 --> 00:01:56,017 have labelled every thing. The width of this hallway is a, the width 27 00:01:56,017 --> 00:02:00,427 of this hallway is b, the length of this stick is l, and makes this angle theta 28 00:02:00,427 --> 00:02:04,080 with this bottom wall. Now we gotta figure out what it is that we 29 00:02:04,080 --> 00:02:07,775 are trying to optimize. What's the quantity that we are trying to 30 00:02:07,775 --> 00:02:09,495 minimize? What's the goal? 31 00:02:09,496 --> 00:02:13,585 So my goal is to minimize the length of this stick, right? 32 00:02:13,585 --> 00:02:19,399 I want to know the shortest length that touches these two walls and this corner, 33 00:02:19,399 --> 00:02:24,790 and that'll constrain the largest stick that'll fit around this corner. 34 00:02:24,790 --> 00:02:29,216 Now, my hallways have fixed lengths, and I'd like to express the length of this 35 00:02:29,216 --> 00:02:33,564 stick in terms of this angle theta. So I can break up the stick into 2 pieces. 36 00:02:33,564 --> 00:02:38,126 There's a piece that goes from this wall to the corner and a piece from this corner 37 00:02:38,126 --> 00:02:41,584 to the other wall. So this piece here, well that's really the 38 00:02:41,584 --> 00:02:45,868 hypotenuse of a right triangle, whose opposite side to this angle theta has 39 00:02:45,868 --> 00:02:49,937 length a. And that means this hypotenuse has length 40 00:02:49,937 --> 00:02:54,996 a times co-secant theta. Similarly here I got a right triangle and 41 00:02:54,996 --> 00:03:01,068 I have got this side length here is b so, the hypotenuse has length b times secant 42 00:03:01,068 --> 00:03:06,496 theta and the stick is just the sum of these two lengths so that gives me a 43 00:03:06,496 --> 00:03:12,546 formula for l in terms of theta. L is a cosecant theta plus b secant theta. 44 00:03:12,546 --> 00:03:18,577 What's the constraint in this problem? Yeah I only need to think about theta 45 00:03:18,577 --> 00:03:24,721 being between 0 and pi over 2 in order to touch these two walls and the corner. 46 00:03:24,721 --> 00:03:29,749 So now we've got a function, and it's function of a single variable so we can 47 00:03:29,749 --> 00:03:33,357 apply calculus. So, I'm going to differentiate this 48 00:03:33,357 --> 00:03:37,421 function, right, the derivative of L with respect to theta. 49 00:03:37,421 --> 00:03:42,759 Well what's the derivative of cosecant? That's minus cosecant theta cotangent 50 00:03:42,759 --> 00:03:45,746 theta. And what's the derivative of secant? 51 00:03:45,746 --> 00:03:50,816 Well that's secant theta Tangent theta. So that's the derivative of l minus a 52 00:03:50,816 --> 00:03:55,223 cosecant theta cotangent theta plus b secant theta tangent theta. 53 00:03:55,223 --> 00:04:00,206 With the derivative in hand I can now try to find the critical points for this 54 00:04:00,206 --> 00:04:02,569 function. Now since this function L is 55 00:04:02,569 --> 00:04:07,261 differentiable on the domain that we're considering, I don't have to worry about 56 00:04:07,261 --> 00:04:11,938 places where L fails to be differentiable when I'm looking for critical points. 57 00:04:11,938 --> 00:04:15,680 I only need to find points where the derivative is equal to zero. 58 00:04:15,680 --> 00:04:18,741 So for which values of theta does this thing vanish? 59 00:04:18,741 --> 00:04:24,696 Well, let's write this as an equation equal to 0, and let's add a cosecant theta 60 00:04:24,696 --> 00:04:30,081 contangent theta to both sides. So then I've got b secant theta tangent 61 00:04:30,081 --> 00:04:34,068 theta is equal to a cosecant theta cotangent theta. 62 00:04:34,068 --> 00:04:40,554 I, I will divide both sides by co-secant theta, cotangent theta and I will divide 63 00:04:40,554 --> 00:04:46,986 both sides by b so that I have got secant theta, tangent theta divided by cosecant 64 00:04:46,986 --> 00:04:50,577 theta, cotangent theta is equal to a over b. 65 00:04:50,578 --> 00:04:55,832 Now what do I notice here? Well dividing by cotangent is as good as 66 00:04:55,832 --> 00:05:00,771 multiplying by tangent. And secant and co-secant is actually 67 00:05:00,771 --> 00:05:04,666 tangent again. So this is in fact tangent cubed. 68 00:05:04,666 --> 00:05:09,425 So I've got tangent cubed theta. Is equal to A over B. 69 00:05:09,425 --> 00:05:17,559 If I take a cubed route now, I get that tangent theta is equal to the cube root of 70 00:05:17,559 --> 00:05:22,512 A over B. In over words, theta is arc tangent the 71 00:05:22,512 --> 00:05:28,617 cube root of A over B. So now I know what theta is, but I don't 72 00:05:28,617 --> 00:05:33,673 care about theta. What I really care about is L. 73 00:05:33,673 --> 00:05:36,826 What's the length? So let's evaluate l of theta at the 74 00:05:36,826 --> 00:05:39,790 critical point. Now, where's the critical point? 75 00:05:39,790 --> 00:05:43,518 It's where tangent of theta is equal to the cube root of a over b. 76 00:05:43,518 --> 00:05:48,210 I can build a right triangle with an angle whose tangent is the cube root of a over 77 00:05:48,210 --> 00:05:49,608 b. I do that as follows. 78 00:05:49,608 --> 00:05:53,110 I make this length 1. And this length the cube root of a over b 79 00:05:53,110 --> 00:05:57,206 and that makes the tangent of theta which is this divided by this equal to this 80 00:05:57,206 --> 00:06:01,440 right and this is 1 in the denominator. That is the right triangle which means I 81 00:06:01,440 --> 00:06:03,815 can compute the length of hypotenuse right. 82 00:06:03,815 --> 00:06:08,045 The length of hypotenuse is a square root of the sum of these two lengths squared 83 00:06:08,045 --> 00:06:10,571 and that's what I had written. And here. 84 00:06:10,571 --> 00:06:15,650 Okay, so I've got a right triangle. I've got an angle whose tangent is theta 85 00:06:15,650 --> 00:06:21,193 and I'm trying to calculate L of theta. And if you remember back L was defined in 86 00:06:21,193 --> 00:06:25,997 terms of cosecant and secant. And I can compute cosecant and secant for 87 00:06:25,997 --> 00:06:31,277 this angle theta whose tangent is this quantity by reading off the cosecant and 88 00:06:31,277 --> 00:06:36,164 secant from this triangle. So the co-secant remember is a one over 89 00:06:36,164 --> 00:06:41,926 sine which means it's hypotenuse divided by the opposite side length and that's 90 00:06:41,926 --> 00:06:47,344 what I got here, length by hypotenuse divided by length of opposite side and 91 00:06:47,344 --> 00:06:52,504 secant, remember is one over cosine so that means it's the side length by 92 00:06:52,504 --> 00:06:56,456 hypotenuse divided by this length, which is just one. 93 00:06:56,456 --> 00:07:02,762 Now once I know cosecant and secant in terms of this quantity here, I can then 94 00:07:02,762 --> 00:07:08,245 evaluate L at that quantity. So here we go, this is what I get when I 95 00:07:08,245 --> 00:07:12,623 plug in these quantities for coseekit, and seekit. 96 00:07:12,624 --> 00:07:15,207 Get. Now this looks terrible, right? 97 00:07:15,207 --> 00:07:19,837 Well, I can simplify this a little bit. What do you notice here? 98 00:07:19,837 --> 00:07:24,989 I've got a dividing by the cubert of B in the denominator, which is as good as 99 00:07:24,989 --> 00:07:30,260 putting a B to the thirds power up here. And here I'm going to separate out this B 100 00:07:30,260 --> 00:07:35,572 to B a B to the two thirds times B to the one third and move that inside the square 101 00:07:35,572 --> 00:07:38,821 root. The upshot is that this thing is in fact 102 00:07:38,821 --> 00:07:43,417 the same as this thing here. And now this begins to be a little bit 103 00:07:43,417 --> 00:07:47,719 more symmetric, right? I took the a and the cube root of a and 104 00:07:47,719 --> 00:07:52,999 that gave me the a to the 2 3rds and by putting a b to the 2 3rds inside here, I 105 00:07:52,999 --> 00:07:55,951 made this look a lot, a lot nicer. Okay. 106 00:07:55,951 --> 00:08:01,227 Now I've got a common factor of the square root of b to the 2 3rds plus a to the 2 107 00:08:01,227 --> 00:08:06,371 3rds here and I can collect that out. So now I've got a to the 2 3rds plus b to 108 00:08:06,371 --> 00:08:11,153 the 2 3rds times the square root of b to the 2 3rds plus a to the 2 3rds. 109 00:08:11,153 --> 00:08:15,674 Now this is the same thing, here. It's this thing times the square root that 110 00:08:15,674 --> 00:08:18,377 thing. And another way of saying that is just 111 00:08:18,377 --> 00:08:23,210 this quantity to the 3/2 power, right? This is this quantity to the first power, 112 00:08:23,210 --> 00:08:26,765 times the 1/2 power, and that gives me the 3/2 power, here. 113 00:08:26,765 --> 00:08:31,824 So, at the critical point, l of theta is equal to this quantity. 114 00:08:31,824 --> 00:08:38,358 Now with a bit more work, we can show that this quantity is in fact the minimum value 115 00:08:38,358 --> 00:08:41,116 of l. We can summarize our answer. 116 00:08:41,117 --> 00:08:46,400 So given a hallway of width A meeting a hallway of width B at some corner, what 117 00:08:46,400 --> 00:08:51,546 we've shown is that a stick of length at most, A to the two thirds plus B to the 118 00:08:51,546 --> 00:08:57,107 two thirds, that quantity to the three halves power can be navigated around that 119 00:08:57,107 --> 00:09:00,731 corner. And we can see this playing out in action. 120 00:09:00,731 --> 00:09:05,016 I made a model that you can download Well here is an example. 121 00:09:05,016 --> 00:09:09,558 I've got a hallway of width 64 millimeters, that's a pretty small 122 00:09:09,558 --> 00:09:13,324 hallway, right? And I've got another hallway here, 27 123 00:09:13,324 --> 00:09:17,260 millimeters. And the calculation that we've done tells 124 00:09:17,260 --> 00:09:22,904 us that a stick of length 125 millimeters will just be able to turnaround, this 125 00:09:22,904 --> 00:09:24,730 hallway. So let's see. 126 00:09:24,730 --> 00:09:29,397 Here's the stick and I start the stick moving down the hallway, right? 127 00:09:29,397 --> 00:09:34,763 And I start trying to rotate it around and eventually I'm going to bump up against 128 00:09:34,763 --> 00:09:40,123 the corner , but I'll just be able to make it around the corner and then I'll be able 129 00:09:40,123 --> 00:09:44,691 to move it out of the hallway. Perhaps you're wondering where those 130 00:09:44,691 --> 00:09:48,456 numbers came from. Well here's where I got these numbers 131 00:09:48,456 --> 00:09:51,439 from, right? 64 and 27, these are the widths of my 132 00:09:51,439 --> 00:09:56,175 hallways and this is the formula that tells us the largest stick that can pass 133 00:09:56,175 --> 00:10:00,886 through a hallway of these two widths. Now I chose 64 and 27 for, maybe two 134 00:10:00,886 --> 00:10:04,760 different reasons. One thing is that these are both perfect 135 00:10:04,760 --> 00:10:07,607 cubes. So, 64 to the one third power is 4 and 27 136 00:10:07,607 --> 00:10:14,245 to the one third power is 3. The other thing that's nice about these 137 00:10:14,245 --> 00:10:21,316 numbers is that 4 squared plus 3 squared is 5 squared, right? 138 00:10:21,316 --> 00:10:28,846 These are Pythagorean triple. And 5 squared to the 1/2 is just 5. 139 00:10:28,846 --> 00:10:32,145 So it's 5 cubed which is 125.