I was recently reminded of the crossed ladders problem. The following simple figure should be adequate in defining the problem:
If you haven't seen the problem before, I highly recommend trying to solve it before reading on.
I had previously tried to solve it, but without success. This time I couldn't get it out of my mind. I had become a (self-inflicted) victim of nerd sniping.
The thing is that it looks simple. But it isn't. Below is my solution to the problem (using some inspiration for making it a bit more pretty).
First, some variables must be introduced. Consider the following figures:
So a=∣AF∣, b=∣BE∣, and h=∣CD∣ are given while the width w=∣AB∣ is the sought quantity. Furthermore, p=∣BF∣ and q=∣AE∣ are auxilliary variables.
Consider first the special case a=b. It is then clear that
w=a2−4h2for a=b.
Assume now, without loss of generality, that a>b. The Pythegorean theorem gives us
(1)
w2=a2−p2=b2−q2⇔a2−b2=p2−q2=(p+q)(p−q).
We then use that the triangle ACD is similar to AFB, just like the triangle BDC is similar to BAE, and get
Let us take a closer look at (3) by considering the fourth degree polynomium Q(x)=x3(x−c)−1. Note first that c is positive. Next that Q is decreasing for x<0 and 0<x<3c/4 and increasing for x>3c/4 (seen from the derivative Q′(x)=x2(4x−3c)). And since Q(0)=−1 we then know that Qalways has exactly two zeros, one negative and one positive. We are naturally interested in the positive one.
Assume now that we have found the (positive) root x. We then have from (4) and (1),
p+q=xa2−b2andp−q=p+qa2−b2=x1a2−b2,
and then
p=21(x+x1)a2−b2,
and finally
w=a2−p2.
And that is the width we were looking for. Note, however, that if p>a then no solution is possible. This can happen, for example, if the crossing height h is larger than the shortest ladder.
But how do we solve (3) and find x?
It is possible to solve a quartic equation analytically, so let us turn to Abramowitz and Stegun and
solve it. By carefully inserting to retrieve the positive root we get
x=41c+41c2+4u+21(21c+21c2+4u)2+2u2+4−2u
where
u=32764+41c4−21c2−32764+41c4+21c2.
That concludes the solution to the crossed ladders problem. Let us finish by inserting some numbers.
From the initial illustration of the problem, we have a=12, b=10 and h=5. This gives us
w≃4.2973280047205172448618937103219913746175.
There are actually lengths that have an integer solution. Take, for instance, a=119, b=70, h=30 and w=56.