Shortest distance between 2 points

Ok, this problem might be trivial, but i'm a bit stuck.

A string with length 3m is shaped to an "L". Find the shortest distance between the 2 endpoints.

So what i've done is to draw the figure, and i can see that pythagoras is key here. But how do i find the shortest distance?

Thanks.

• It depends on the font used for the L. – Regret Feb 16 '15 at 9:33
• Haha, i should put two lines under that answer and turn in – KimR Feb 16 '15 at 9:34
• @Regret: more to the point, the font used for the L is the variable we're qualifying over when we say "the shortest". – Steve Jessop Feb 16 '15 at 12:47
• @Steve: In many fonts, $\cal L$ is not displayed as two line segments perpendicular to each other. – Regret Feb 16 '15 at 12:51
• @Steve: We could also trivialize the problem by defining a font where $\cal L$ is a circle. – Regret Feb 16 '15 at 12:54

Let $d$ be the distance between the two endpoints.

Let say that the angle of the $L$ shape is at distance $x$ from the first extremity. I suppose that the angle is $\dfrac{\pi}{2}$.

Then you have, with Pythagoras helping a bit:

$d=\sqrt{x^2+(3-x)^2}=f(x)$

$f'(x)=\dfrac{4x-6}{\sqrt{x^2+(3-x)^2}}$ which has an extremum for $x=\dfrac 32$. $f'(x)$ is negative for $x<\dfrac 32$ so the extremum is a minimum.

EDIT: typo modified, the angle is indeed $\dfrac{\pi}{2}$ and not $\pi$. Thanks for pointing it out.

• I'm not sure whether to upvote or downvote for using the word "extremum" so much. – Laertes Feb 16 '15 at 9:41
• @Laertes: Isn't that a bit extreme? :) – Regret Feb 16 '15 at 9:42
• @Laertes If you hesitate, I can help you: upvote! ;-)... Since I have not english as my mother tongue, I have an excuse! – Martigan Feb 16 '15 at 9:43
• You probably want the angle to be $\pi/2$, not $\pi$ ;) – user207868 Feb 16 '15 at 9:44
• If the angle is $\pi$ then the distance between endpoints is constant. – user207868 Feb 16 '15 at 9:55

From a purely analytic angle, we can let $l$ and $w$ be the length and width of the L, giving the equations $$l+w=3$$ and $$l^2+w^2=D^2$$ where $D$ is the distance between the endpoints. Substituting, we have $$w=3-l$$ and so $$l^2+(3-l)^2=D$$ $$2l^2-6l+9=D.$$ Since we want to minimize $D$, and we have a positive parabola, we find the vertex ${6 \over 2\cdot 2}=1.5$. Thus we have $l=w=1.5$ and so $D=1.5\sqrt 2\approx 2.12$.

Alternatively, we can note that the diagonal will always be smallest in a square of any rectangle, so $l=w=1.5$ and so on. Depends on your tastes.

• "we can note that the diagonal will always be smallest in a square of any rectangle" -- the proof of which can in any case be the same as what you did to answer the problem directly, but with a named value in place of $3$. – Steve Jessop Feb 16 '15 at 12:50
• @SteveJessop Yes, this is essentially the rigorous proof of that fact; my point was that if we view the problem as asking, "What rectangle has the shortest diagonal relative to its perimeter?" we can intuitively see the answer without calculation (though also without rigor). – Laertes Feb 16 '15 at 13:08