This is a fairly famous problem (often seen with different numbers):

We have a ladder leaning against a wall, and a box which just touches the ladder and wall as shown. The cross section of the box is 1 unit square, and the ladder is 4 units long. How high on the wall is the top of the ladder?

The problem would seem to be a simple application of similar triangles and The Pythagorean Theorem. By similar triangles, we get y = 1/x. And by the Pythagorean theorem, we get (x+1)^2 + (y+1)^2 = 16, where ^2 means "squared." And "simplifying" we eventually get x^4+2x^3-14x^2+2x+1 = 0, a quartic equation. Graphing that equation, we get the graph above right. It would seem that it does not have a simple solution. In particular, there are two positive solutions, one with the ladder as in the diagram, and its reflection about a diagonal line (y = x).

There are a number of ways to estimate the solution. We could graph the equation with more accuracy. We could draw the picture with more accuracy. Doing either, we find that the height is approximately y = 2.76 and the height = 3.76. We can read that number directly from the graph, by using the above reflection, since the graph gives us the x value, not the height.

Using a calculator or a computer, we can estimate a solution with the above equation by choosing x values closer and closer to a solution (making the above quartic equation get closer and closer to zero). In this way, we get approximately y = 2.7609056 and the height = 3.7609056.

Here is the same problem with different numbers: The box is 12 on a side, and the ladder is 35. We get a similar quartic equation. But this time we get integer solutions. The similar triangles are the familiar 3-4-5 right triangles. If we guess that the problem may have integer solutions, we can try a few Pythagorean Triples (and a few simple fractions of them, perhaps), or we can solve this by trying a few integers in the resulting quartic equation. In this case, the height is 28.

The above graph was drawn with Geometer's Sketchpad. Also see The Crossed Ladder Problem and Yet Another Ladder Problem.

So, how can we have a negative solution? On the left we see one of them, which is not particularly valid in the real world. There is another negative solution along the x-axis.

Nick Hobson wrote that the solutions can be found by substituting z = y + 1/y into:

y^2 + 2y + 2 + 2/y +1/y^2 = 16

And, since z^2 = y^2 + 1/y^2 + 2, we get

z^2 + 2z -16 = 0

We solve for z, and then y, and get the larger solution of:

y = (sqrt(17) - 1 + sqrt(14 - 2sqrt(17)))/2 = 2.76760905633

So the height is 3.760905633...