# 172 geometry/corner.p

## Description

This article is from the Puzzles FAQ,
by Chris Cole chris@questrel.questrel.com and Matthew Daly
mwdaly@pobox.com with numerous contributions by others.

# 172 geometry/corner.p

A hallway of width A turns through 90 degrees into a hallway of width

B. A ladder is to be passed around the corner. If the movement is

within the horizontal plane, what is the maximum length of the ladder?

geometry/corner.s

------\---------
B / \.......|..B/sin(theta)
theta\ |
---|-----X |
|\ |
| \...|..A/cos(theta)
| \ |
| \ |
| A \|

Theta is the angle off horizontal.

Minimize length = A/cos(theta) + B/sin(theta)

d(length)/d(theta)
= A*sin(theta)/cos(theta)^2 - B*cos(theta)/sin(theta)^2 (?)
= 0
A*sin(theta)/cos(theta)^2 = B*cos(theta)/sin(theta)^2
B/A = sin(theta)^3/cos(theta()^3 = tan(theta)^3
theta = inverse_tan(cube_root(B/A))

If you use the trigonometric formulas cos^2 x = 1/(1 + tan^2 x)

and sin x = tan x cos x, and plug through the algebra, I believe

that the formula for the length reduces to

(A^(2/3) + B^(2/3))^(3/2)

At any rate this is symmetric in A and B as one would expect, and

has the right values at A=B and as either A-->0 or B-->0.

Continue to: