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?
Let y be the vertical distance between the top of the box and where the ladder touches the wall. Similarly, let x be the horizontal distance between the box and where the ladder touches the ground.
Then, by similar triangles, y/3 = 3/x, so xy = 9.
By Pythagoras, (x + 3)² + (y + 3)² = 12², or
x² + 6x + y² + 6y + 18 = 144.
Now note that (x + y)² = x² + 2xy + y² = x² + y² + 18.
Hence (x + y)² + 6(x + y) - 144 = 0.
Rejecting the negative root, x + y = 3(sqrt(17) - 1).
Now we have the sum and product of the roots, so we can write down the quadratic:
z² - 3(sqrt(17) - 1)z + 9 = 0. (With roots x, y.)
For maximum height, x < y, and so
x = (3/2)*(sqrt(17) - 1 - sqrt(14 - 2*sqrt(17))).
So the answer is (3/2)*(sqrt(17) + 1 - sqrt(14 - 2*sqrt(17))).