A 3' cube sits on level ground against a vertical wall. A 12' ladder on the same ground leans against the wall such that it touches the top edge of the box.
How far from the wall must the foot of the ladder be, if it is to reach maximum height whilst meeting the foregoing conditions?
4.086599978 feet from the wall
__________________________________
Let's draw a picture...
|\
| \
| \
|___\
| |\
|___|_\
Let the square on the bottom be 3ft x 3ft.
The height of the big triangle be 3+y ft.
The base of the big triangle be 3+x ft.
Let the hypotenuse of the lower right triangle be z, so the hypotenuse of the upper left triangle is 12-z.
Now, by similar triangles, we see that
3/x = y/3 ==> xy = 9 ==> y = 9/x
equation (1)
By Pythagorean theorem:
x² + 3² = z² ==> x² = z² - 9
equation (2)
-- and --
y² + 3² = (12-z)²
equation (3)
Now we have three equations and three unknowns
substitute equation (1) into equation (3) (to eliminate y):
(9/x)² + 3² = (12-z)²
81/x² + 3² = (12-z)²
now substitute equation (2) to eliminate x:
81/(z²-9) + 9 = (12-z)²
81/(z²-9) = (12-z)² - 9
-- difference of perfect squares --
81/[ (z-3)(z+3) ] = [ (12-z) + 3 ] [ (12-z) - 3 ]
81 = (15-z)(9-z)(z-3)(z+3)
0 = (15-z)(9-z)(z-3)(z+3) - 81
Now we have one equation, and one unknown.
Should be easy enough to solve numerically... (sure enough I just used Excel solver to set this equal to zero), and I find:
z = 3.190720845, or
z = 8.809279155 (fortunately, they add up to 12, the length of the ladder)
we are looking for x + 3, so plug back into equation (2):
x² = z² - 9 = (3.190720845)² - 9
x = 1.086599978
Therefore, the base of the ladder is 3 + x or
4.086599978 feet from the wall