# Intuitive explanation for formula of maximum length of a pipe moving around a corner?

For one of my homework problems, we had to try and find the maximum possible length $L$ of a pipe (indicated in red) such that it can be moved around a corner with corridor lengths $A$ and $B$ (assuming everything is 2d, not 3d): My professor walked us through how to derive a formula for the maximum possible length of the pipe, ultimately arriving at the equation $L = (A^{2/3} + B^{2/3})^{3/2}$.

The issue I have is understanding intuitively why this formula works, and exactly what it's doing. I understand the steps taken to get to this point, but there's an odd symmetry to the end result -- for example, is the fact that $\frac{2}{3}$ and its inverse are the only constants used just a coincidence, or indicative of some deeper relationship?

I also don't quite understand how the formula relates, geometrically, to the diagram. If I hadn't traced the steps myself, I would have never guessed that the formula was in any way related to the original problem.

If possible, can somebody give an intuitive explanation as to why this formula works, and how to interpret it geometrically?

Here's how he found the formula, if it's useful:

The formula is found by finding the maximum possible length of the pipe by expressing the length in terms of the angle $\theta$ formed between the pipe and the wall, and by taking the derivative to find when $\frac{dL}{d\theta} = 0$, which is the minimum of $\frac{dL}{d\theta}$ and is therefore when $L$ is the smallest:

$$L = \min_{0 \leq \theta \leq \frac{\pi}{2}} \frac{A}{\cos{\theta}} + \frac{B}{\sin{\theta}} \\ 0 = \frac{dL}{d\theta} = \frac{A\sin{\theta}}{\cos^2{\theta}} - \frac{B\cos{\theta}}{\sin^2{\theta}} \\ 0 = \frac{A\sin^3{\theta} - B\cos^3{\theta}}{\sin^2{\theta}\cos^2{\theta}} \\ 0 = A\sin^3{\theta} - B\cos^3{\theta} \\ \frac{B}{A} = \tan^3{\theta} \\ \theta = \arctan{\left( \frac{B}{A} \right)^{\frac{1}{3}}} \\$$

At this point, we can substitute $\theta$ back into the original equation for $L$ by interpreting $A^{1/3}$ and $B^{1/3}$ as sides of a triangle with angle $\theta$ and hypotenuse $\sqrt{A^{2/3} + B^{2/3} }$:

$$\cos{\theta} = \frac{A^{1/3}}{ \sqrt{A^{2/3} + B^{2/3} }} \\ \sin{\theta} = \frac{B^{1/3}}{ \sqrt{A^{2/3} + B^{2/3} }} \\ \therefore L = A^{2/3} \sqrt{A^{2/3} + B^{2/3} } + B^{2/3} \sqrt{A^{2/3} + B^{2/3} } \\ L = (A^{2/3} + B^{2/3}) \sqrt{A^{2/3} + B^{2/3} } \\ L = (A^{2/3} + B^{2/3})^{3/2} \\$$

The equation for the formula for the maximum length of the pipe is therefore $L = (A^{2/3} + B^{2/3})^{3/2}$.

• This is phrased as a maximization problem but it's really a minimization problem. It's asking what's the length of the shortest line segment through that corner point having endpoints on the two opposite walls. That may be the easiest way to treat it. Obviously at the two opposite extremes the length approaches $\infty$, so it has a minimum somewhere between those. – Michael Hardy Nov 27 '13 at 20:37
• There is a very nice explanation of this problem in the free online course Calculus One by Bart Snapp of The Ohio State University. The video for Week 8 number 14 How large of an object can you carry around a corner? covers this problem. – Mufasa Nov 27 '13 at 20:37
• I'm not sure what you are asking. The formula for the longest pipe $L(\theta)$ that can fit across the bend at angle $\theta$ is straightforward to work out. A pipe can go around the bend iff the pipe length is less than $L(\theta)$ for all $\theta \in [0, \frac{\pi}{2}]$, which is where the minimization comes in. By parameterizing the problem differently, you can avoid the angles, but end up with the same result. – copper.hat Nov 27 '13 at 21:19
• This reminds me of : en.wikipedia.org/wiki/Moving_sofa_problem – K. Rmth Nov 29 '13 at 18:47

Here's a derivation without trigonometry. There is also a short discussion of the geometric significance of the exponents in the answer after the derivation. Let $L$ be the length of a line touching the inner corner of the two corridors and extending to the outer wall of each corridor. Where this line meets the outer wall of each corridor, draw a line perpendicular to the corridor. Let $x$ be the distance from the inner corner to the perpendicular line across corridor $B$ and let $y$ be the distance from the inner corner to the perpendicular line across corridor $A$. The result is the figure shown above.

Applying the Pythagorean Theorem to the obvious right triangle with hypotenuse $L$, $$L^2 = (A + x)^2 + (B + y)^2.$$

The longest pipe that can fit around the corner is the smallest value of $L$ for any value $x > 0$, so let's minimize $L$ as a function of $x$. But $L$ is minimized when $L^2$ is minimized, so we would like to set $$\frac{d}{dx} L^2 = 0.$$

That is, $$\begin{eqnarray} 0 = \frac{d}{dx} L^2 &=& \frac{d}{dx}\left((A + x)^2 + (B + y)^2\right) \\ &=& 2(A + x) + 2(B + y)\frac{dy}{dx}. \end{eqnarray}$$

Now, by similar triangles, $\dfrac Bx = \dfrac yA .$ That is, $xy = AB.$ Differentiating both sides of this by $x$, $$x\frac{dy}{dx} + y = 0,$$ $$\frac{dy}{dx} = -\frac yx.$$

Substituting for $\frac{dy}{dx}$ in our earlier equation for $\frac{d}{dx}L^2,$ $$0 = 2(A + x) + 2(B + y)\left(-\frac yx\right),$$

from which it follows that $$(A + x)x = (B + y)y,$$

But (again by similar triangles) $$\frac Bx = \frac{B+y}{A+x},$$ $$B+y = \frac Bx (A+x),$$ and combining this with the fact that $y = \dfrac{AB}{x},$ $$(B + y)y = \left(\frac Bx (A+x)\right) \frac{AB}{x} = \frac{AB^2}{x^2}(A + x).$$

That is, $$(A + x)x = \frac{AB^2}{x^2}(A + x),$$ $$x^3 = AB^2,$$ $$x = A^{1/3}B^{2/3},$$ $$y = \frac{AB}{x} = A^{2/3}B^{1/3},$$

$$A + x = A + A^{1/3}B^{2/3} = \left(A^{2/3} + B^{2/3} \right)A^{1/3},$$ and $$B + y = B + A^{2/3}B^{1/3} = \left(A^{2/3} + B^{2/3} \right)B^{1/3}.$$

Therefore at the value of $x$ that minimizes $L$,

$$\begin{eqnarray} L^2 &=& (A + x)^2 + (B + y)^2 \\ &=& \left(A^{2/3} + B^{2/3} \right)^2 A^{2/3} + \left(A^{2/3} + B^{2/3} \right)^2 B^{2/3} \\ &=& \left(A^{2/3} + B^{2/3} \right)^2 \left(A^{2/3} + B^{2/3}\right) \\ &=& \left(A^{2/3} + B^{2/3} \right)^3 \end{eqnarray}$$

and $$L = \left(A^{2/3} + B^{2/3} \right)^{3/2}.$$

Regarding the symmetry of the solution, clearly the length of the pipe does not change if we swap the labels $A$ and $B$ on the two corridors. We should suspect from this that there might be some expression for $L$ in which $A$ and $B$ appear in completely symmetric roles.

Regarding the geometric interpretation of the exponents, the key facts that lead to the $\frac23$ exponents are the findings that $x^3 = AB^2$ and (by symmetry) $y^3 = BA^2.$ This is what leads to the conclusion that $L$ is the hypotenuse of a right triangle with legs $A + A^{1/3}B^{2/3}$ and $B + B^{1/3}A^{2/3}$; it is from the squares of those two lengths that we get terms in $A^{2/3}$ and $B^{2/3}$.

Finally, note that if we double both $A$ and $B$ simultaneously, we should expect the entire figure showing the "tightest" angle of the pipe around the corner to scale up by a factor of $2$, hence $L$ also doubles. But we see that $A^{2/3}$ and $B^{2/3}$ scale up only by a factor of $2^{2/3}$ when we double $A$ and $B$; it is the exponent of $\frac32$ outside the parentheses that gives us a scaling factor of $\left(2^{2/3}\right)^{3/2} = 2.$ So it is not a mere coincidence that the exponents $\frac23$ and $\frac32$ are multiplicative inverses.

Another way to approach this is to apply the fact that $B+y = \dfrac Bx (A+x)$ before differentiating $L^2$ rather than afterwards. That is, we simply substitute for $B+y$ in the formula for $L^2$, obtaining

$$\begin{eqnarray} L^2 &=& (A + x)^2 + \frac{B^2}{x^2}(A + x)^2 \\ &=& \left(1 + \frac{B^2}{x^2}\right) (A + x)^2. \end{eqnarray}$$

We can differentiate this with respect to $x$ to obtain an analytic solution, or apply numeric methods using $x$ as an independent variable.

• Is there anyway you could set up an equation of some sort? As in a function where you can see the minimum on the graph, and that minimum is your answer to the question? With this, it seems that this solves the problem analytically – user121615 May 21 '15 at 11:19
• @user121615 I added a formula for $L^2$ with just $x$ as a variable; that should give you something that can be graphed. – David K May 21 '15 at 13:11

As far as I know, this isn't a case where there's an intuitive explanation of this problem on its own. Here are two substitutes:

First, there are simpler calculations using more advanced techniques, and maybe these calculations will make the form of the answer seem less mysterious. For example, if we rephrase the question as

Find the length of the shortest line segment from $(x,0)$ to $(0,y)$ that passes through $(a,b)$.

then with a little coordinate geometry we can rephrase it again as

Minimize $(x^2+y^2)^{1/2}$ subject to the constraint $\frac ax + \frac by = 1$.

Using the method of Lagrange multipliers from multivariable calculus on this version of the problem yields quickly that the optimum has $(x^3,y^3)$ proportional to $(a,b)$.

Second, there is a bigger picture about this kind of problem — if we rephrase the question again by replacing $x,y$ with their reciprocals, we get the $p=-2$ case of the problem

Minimize $(x^p+y^p)^{-1/p}$ subject to the constraint $ax+by=1$.

Expressions like $(x^p+y^p)^{1/p}$ can be thought of as a more general notion of "distance". With $p=2$ it's the usual distance, as in Pythagoras' theorem; with $p=1$ you get taxicab distance; for $p\ge 1$ you get various weird notions of "distance" which still act in some essential ways like the familiar notion; for $0<p<1$ you get notions which are still somewhat distance-ish, but not very; for $p<0$ the feeling of "distance" has been left far behind, but we continue with stout hearts. (More.)

The relationship between the $p=-2$ notion of "distance" which occurs in the (rephrased) problem statement and the $p=\frac23$ notion of "distance" which occurs in the solution is a much studied one; these notions of distance are said to be "dual" to each other. For people who have studied this subject, the outcome here is quite natural — it's "because" $\frac23$ is the conjugate exponent of $-2$. (We need a version of Hölder's inequality for negative exponents, which is not always taught, but it exists.)

(The notion of "duality" between notions of distance has its roots in 19th century geometry, in efforts to understand geometric shapes not just as collections of points but also as envelopes of their tangents. From this point of view, we could say that your problem is dual to this one: if a ladder standing straight against a wall slides down to the ground (its top sliding down the wall and its base sliding along the ground), what curve is tangent to the ladder at all times? See Astroid, where you will see your $\frac23$.)

So, no, the form of the answer is not a coincidence, but as far as I know it is only "intuitive" in retrospect, which really means only that it has become familiar.

If this result could be explained intuitively it wouldn't have been necessary to go through the calculations. A priori you could expect $L$ to be homogeneous of degree $1$ in $A$ and $B$, as well as being symmetric in $A$ and $B$. As a matter of fact the result of the calculation could as well have been $$L=2\min\{A,B\},\quad{\rm or}\quad L=\sqrt{A^2+AB+B^2}\ ,$$ or an expression involving some other exponent in place of ${2\over3}$.