Longest pipe that fits around a corner. While studying, I came upon the problem "Two corridors of widths $a$ and $b$ intersect at right angle. What is the length of the longest pipe that can be carried across the two corridors, touching the corner of the wall where the corridors meet?"
The explanation is not detailed, but the answer is shown as 
$(a^{2/3} + b^{2/3})^{3/2}$.
I have attempted the problem using trigonometry and derivatives, but got stuck early in. Could someone help with this problem?
 A: Let we consider a segment unit length with an endpoint constrained to the $y$-axis and the other one constrained to the $x$-axis. We want to compute the envelope of these segments, so we intersect the segment with endpoints
$$ \left(0,\sqrt{1-x^2}\right),\quad \left(x,0\right) $$ 
with the segment with endpoints
$$ \left(0,\sqrt{1-(x+\varepsilon)^2}\right),\quad \left(x+\varepsilon,0\right) $$
and let $\varepsilon\to 0$, to find the intersection point:
$$ \left( x^3 , (1-x^2)^{3/2}\right) $$
lying on the curve $x^{2/3}+y^{2/3}=1$. The remaining part is easy and it is left to you.
A: Describe all line segments that go through the acute (inner) corner. Put the origin into the far (outside) corner, so that the inner corner has coordinates $(a,b)$.
Let the intercepts of the line on both axes (outer walls) be $A$ and $B$. Then the line equation is
$$x/A+y/B=1$$
To go through $a,b$ you need
$$a/A+b/B=1$$
This is your constraint on $A$ and $B$. This makes the problem one-dimensional (you can use Lagrangian multipliers or just express $A$ with $B$ or vice versa).
You are finding the extremum of $\sqrt{A^2+B^2}$, which is the Euclidean distance between the intercepts (where the line touches the outer walls).
