0:00

Here's another timeless classic, another optimization problem that just comes up in

Â all the calculus textbooks. Goes like this: you've got some big object

Â and you want to move that big object around a corner.

Â The question is for some given corner, how big of a object can you navigate around

Â that corner. This is an example of the so called piano

Â moving problem. A piano is way to complicated of an object

Â to really understand in this course right, it's just got a way to much geometry going

Â on there. So going to consider a simpler example.

Â So here's our diagram of a corner and I mentioned that I want to move this red

Â stick around this corner without it getting stuck.

Â Maybe it doesn't look like it but this problem can be set up as an optimization

Â problem and we can solve it. It's an optimization problem, because I'm

Â asking to know the length of the longest stick, that I can navigate around this

Â corner. We have to think about where that stick

Â can get stuck. Well the stick is going to get stuck when

Â it's in a position like this. When it's touching these two walls and

Â pressed up against this corner. So, what I actually have to think about is

Â what's the shortest length of stick that simultaneously touches this wall, this

Â wall and this corner. I think it's a little bit funny that in

Â order to solve this problem, we end up minimizing something.

Â We actually want to figure out the longest length, the maximum length of a stick that

Â can be navigated around that corner. But to answer that problem, we end up

Â solving a minimization problem. Well anyhow, let's proceed in our usual

Â way. I'm going to draw a picture and label

Â everything. So, here I have drawn this picture and I

Â have labelled every thing. The width of this hallway is a, the width

Â of this hallway is b, the length of this stick is l, and makes this angle theta

Â with this bottom wall. Now we gotta figure out what it is that we

Â are trying to optimize. What's the quantity that we are trying to

Â minimize? What's the goal?

Â So my goal is to minimize the length of this stick, right?

Â I want to know the shortest length that touches these two walls and this corner,

Â and that'll constrain the largest stick that'll fit around this corner.

Â Now, my hallways have fixed lengths, and I'd like to express the length of this

Â stick in terms of this angle theta. So I can break up the stick into 2 pieces.

Â There's a piece that goes from this wall to the corner and a piece from this corner

Â to the other wall. So this piece here, well that's really the

Â hypotenuse of a right triangle, whose opposite side to this angle theta has

Â length a. And that means this hypotenuse has length

Â a times co-secant theta. Similarly here I got a right triangle and

Â I have got this side length here is b so, the hypotenuse has length b times secant

Â theta and the stick is just the sum of these two lengths so that gives me a

Â formula for l in terms of theta. L is a cosecant theta plus b secant theta.

Â What's the constraint in this problem? Yeah I only need to think about theta

Â being between 0 and pi over 2 in order to touch these two walls and the corner.

Â So now we've got a function, and it's function of a single variable so we can

Â apply calculus. So, I'm going to differentiate this

Â function, right, the derivative of L with respect to theta.

Â Well what's the derivative of cosecant? That's minus cosecant theta cotangent

Â theta. And what's the derivative of secant?

Â Well that's secant theta Tangent theta. So that's the derivative of l minus a

Â cosecant theta cotangent theta plus b secant theta tangent theta.

Â With the derivative in hand I can now try to find the critical points for this

Â function. Now since this function L is

Â differentiable on the domain that we're considering, I don't have to worry about

Â places where L fails to be differentiable when I'm looking for critical points.

Â I only need to find points where the derivative is equal to zero.

Â So for which values of theta does this thing vanish?

Â Well, let's write this as an equation equal to 0, and let's add a cosecant theta

Â contangent theta to both sides. So then I've got b secant theta tangent

Â theta is equal to a cosecant theta cotangent theta.

Â I, I will divide both sides by co-secant theta, cotangent theta and I will divide

Â both sides by b so that I have got secant theta, tangent theta divided by cosecant

Â theta, cotangent theta is equal to a over b.

Â Now what do I notice here? Well dividing by cotangent is as good as

Â multiplying by tangent. And secant and co-secant is actually

Â tangent again. So this is in fact tangent cubed.

Â So I've got tangent cubed theta. Is equal to A over B.

Â If I take a cubed route now, I get that tangent theta is equal to the cube root of

Â A over B. In over words, theta is arc tangent the

Â cube root of A over B. So now I know what theta is, but I don't

Â care about theta. What I really care about is L.

Â What's the length? So let's evaluate l of theta at the

Â critical point. Now, where's the critical point?

Â It's where tangent of theta is equal to the cube root of a over b.

Â I can build a right triangle with an angle whose tangent is the cube root of a over

Â b. I do that as follows.

Â I make this length 1. And this length the cube root of a over b

Â and that makes the tangent of theta which is this divided by this equal to this

Â right and this is 1 in the denominator. That is the right triangle which means I

Â can compute the length of hypotenuse right.

Â The length of hypotenuse is a square root of the sum of these two lengths squared

Â and that's what I had written. And here.

Â Okay, so I've got a right triangle. I've got an angle whose tangent is theta

Â and I'm trying to calculate L of theta. And if you remember back L was defined in

Â terms of cosecant and secant. And I can compute cosecant and secant for

Â this angle theta whose tangent is this quantity by reading off the cosecant and

Â secant from this triangle. So the co-secant remember is a one over

Â sine which means it's hypotenuse divided by the opposite side length and that's

Â what I got here, length by hypotenuse divided by length of opposite side and

Â secant, remember is one over cosine so that means it's the side length by

Â hypotenuse divided by this length, which is just one.

Â Now once I know cosecant and secant in terms of this quantity here, I can then

Â evaluate L at that quantity. So here we go, this is what I get when I

Â plug in these quantities for coseekit, and seekit.

Â Get. Now this looks terrible, right?

Â Well, I can simplify this a little bit. What do you notice here?

Â I've got a dividing by the cubert of B in the denominator, which is as good as

Â putting a B to the thirds power up here. And here I'm going to separate out this B

Â to B a B to the two thirds times B to the one third and move that inside the square

Â root. The upshot is that this thing is in fact

Â the same as this thing here. And now this begins to be a little bit

Â more symmetric, right? I took the a and the cube root of a and

Â that gave me the a to the 2 3rds and by putting a b to the 2 3rds inside here, I

Â made this look a lot, a lot nicer. Okay.

Â Now I've got a common factor of the square root of b to the 2 3rds plus a to the 2

Â 3rds here and I can collect that out. So now I've got a to the 2 3rds plus b to

Â the 2 3rds times the square root of b to the 2 3rds plus a to the 2 3rds.

Â Now this is the same thing, here. It's this thing times the square root that

Â thing. And another way of saying that is just

Â this quantity to the 3/2 power, right? This is this quantity to the first power,

Â times the 1/2 power, and that gives me the 3/2 power, here.

Â So, at the critical point, l of theta is equal to this quantity.

Â Now with a bit more work, we can show that this quantity is in fact the minimum value

Â of l. We can summarize our answer.

Â So given a hallway of width A meeting a hallway of width B at some corner, what

Â we've shown is that a stick of length at most, A to the two thirds plus B to the

Â two thirds, that quantity to the three halves power can be navigated around that

Â corner. And we can see this playing out in action.

Â I made a model that you can download Well here is an example.

Â I've got a hallway of width 64 millimeters, that's a pretty small

Â hallway, right? And I've got another hallway here, 27

Â millimeters. And the calculation that we've done tells

Â us that a stick of length 125 millimeters will just be able to turnaround, this

Â hallway. So let's see.

Â Here's the stick and I start the stick moving down the hallway, right?

Â And I start trying to rotate it around and eventually I'm going to bump up against

Â the corner , but I'll just be able to make it around the corner and then I'll be able

Â to move it out of the hallway. Perhaps you're wondering where those

Â numbers came from. Well here's where I got these numbers

Â from, right? 64 and 27, these are the widths of my

Â hallways and this is the formula that tells us the largest stick that can pass

Â through a hallway of these two widths. Now I chose 64 and 27 for, maybe two

Â different reasons. One thing is that these are both perfect

Â cubes. So, 64 to the one third power is 4 and 27

Â to the one third power is 3. The other thing that's nice about these

Â numbers is that 4 squared plus 3 squared is 5 squared, right?

Â These are Pythagorean triple. And 5 squared to the 1/2 is just 5.

Â So it's 5 cubed which is 125.

Â