# calculus question involving maximum optimization.

A straight metal pipe is to be moved around a corner from a hallway 5m wide into a corridor 1m wide. determine the length of the longest pipe that can negotiate the turn.

I scored 94/100 on a test but this question I got 0 marks out of 6. How do you do it??

## 1 Answer

Just a hint: Let the ends be at $(x,0)$ and $(0,y)$ with the hallways one along the line $y=5$ and the other along the line $x=1.$ Then the "inside corner" is at $(1,5).$ Now express that the three points $(x,0),(0,y),(1,5)$ are all on the same line, to obtain an equation in $x,y.$ Solve that for $y$ in terms of $x.$ Now let $d^2$ be the length squared of the pipe, plug in your formula for $y$ and get a one variable formula for $d^2$ which is then to be minimized. Finally take the squareroot to get the desired length.