26

I was reading a newspaper and there was a little math riddle, I thought "how funny, that's gonna be easy, let's do it" and here am I...

The problem goes as follow : in a barn, there is a 1 meter cubic box against a wall and a 4 meter ladder is leaning against the wall, touching the box at its corner. Here is a picture : Illustration of the situation

So, the big triangle has a hypotenuse $FE$ of $4$, the square $ABDC$ has sides of length 1 and is basically "insquared" at the right angle, i.e. $D\in \overline{FE}$. The question is "what is the length of the biggest cathetus", here $AF$.

So far, no problem.

Now here are my solutions:

  • By Thales' intercept theorem, $\frac{FB}{FA}=\frac{BD}{AE}$, by hypothesis, $FB=FA-1$ and $BD=1$. Now by Pythagoras, $FA^2+AE^2=FE^2$; by hypothesis, $FE=4$, so we end up with a system of equations, letting $h=FA, d=AE$: $$ \begin{align} &\frac{h-1}{h}=\frac{1}{d} \\ &h^2+d^2=4^2 \end{align} $$ Which solves (removing 3 non-relevant solutions) into $d \cong 1.3622$ and $h \cong 3.76091$.
  • Now, if I consider the "function" of the line : $f(x)=\frac{-h}{d}x+h$, I know that $f(1)=1$ and I end up with Pythagoras with the system :$$ \begin{align} &\frac{-h}{d}+h=1 \\ &h^2+d^2=4^2 \end{align} $$ it solves again into the same, again removing 3 non-relevant solutions

Okay, this means that using Pythagoras is no good since it ends up giving a quartic equation (4 answers of which 3 are "non-relevant").

  • Now if I consider the length of the arc $f(x)$ between $0$ and $d$ it has to be $4$ and again $f(1)=1$ I end up with the system: $$ \begin{align} &\frac{-h}{d}+h=1 \\ &\int_0^d \sqrt{1+(f'(x))^2} dx =\int_0^d \sqrt{1+\left(\frac{-h}{d}\right)^2} dx = d \sqrt{1+\left(\frac{-h}{d}\right)^2} \end{align} $$ Which solves again into the same answers, but this time removing only 2 non-relevant solutions (i.e. it gives a cubic equation instead of a quartic).

I tried also using the areas and the smaller trangles $FAD$ and $AED$ for example : $\frac{h \cdot d}{2} = \frac{h\cdot 1}{2}+\frac{d\cdot 1}{2}$

Yet I wasn't able to get to any "hand solvable" solution : if I were able to bring it down to some quadratic equation, that would be nice, since it is a common assumption, here, that everybody has seen the "general formula for solving quadratic equations" in school and so would be able to solve this, I may then see how it is seen as a funny riddle in the newspaper.

My best trial, with "just" a cubic equation, is way too complicated for the normal readers of this newspaper, so it's bugging me.

What am I missing? Some basic properties maybe? It's really bugging me, not being able to solve this without Wolfram.

psmears
  • 767
Lery
  • 803
  • 6
  • 11
  • 3
    possible duplicate of Ladder against a wall. – mvw Jun 30 '15 at 19:42
  • 2
    I am not sure whether the question should be closed as a duplicate. There is a difference between: "I've got this equation from a geometry problem, how do I solve it?" and "How do I solve this geometry problem?" But even if they should be considered duplicates, then the opposite direction would make much more sense in my opinion, since the newer question contains much more detail. – Martin Sleziak Jun 30 '15 at 20:24
  • 1
    I think I should reformulate my question. The question isn't "How to solve this geometric problem", nor "How to solve this equation", but more like : "here are 3 solutions, of which 2 are quartic and one cubic, how could I find an easier solution, possibly a quadratic one?" – Lery Jun 30 '15 at 21:16
  • 2
    The assertion in the title seems to be false; perhaps it should be amended to something like "not obviously solvable by hand" – Glen_b Jul 01 '15 at 02:54

8 Answers8

28

Let $|FB|=x$. By similarity of triangles we then have $|CE|=1/x$. Pythagoras thus gives $$ 4=\sqrt{x^2+1}+\sqrt{1+(1/x)^2}=\sqrt{x^2+1}(1+\frac1x). $$ Squaring this gives us $$ 16=(x^2+1)(1+\frac2x+\frac1{x^2}), $$ but I prefer to move one factor $x$ from the former factor on r.h.s. to the latter, so $$ 16=(x+\frac1x)(x+2+\frac1x). $$ Getting warmer! Write $u=x+1/x$. We can solve $u$ from the quadratic $$ 16=u(u+2), $$ and then solve for $x$ from the equation $$ x+\frac1x=u. $$


It is clear to discard the negative possibility for $u$. For the positive value of $u$ the two solutions for $x$ are reciprocals of each other. They correspond to "physical" solutions gotten from each other by reflecting the entire picture w.r.t. the diagonal $AD$ at 45 degree with the floor.

Jyrki Lahtonen
  • 133,153
  • The last paragraph is the key in a way. We do have a quartic, but we also know that $1/x$ is a solution whenever $x$ is. Equivalently, the quartic polynomial is palindromic (=equal to its own reciprocal polynomial). This is a tell-tale sign to write it in terms of $u$. – Jyrki Lahtonen Jul 01 '15 at 05:10
  • Yeah, I saw your answer yesterday, but hadn't time to try and solve it by hand. But the variable's change is clever, I've never got an eye for those. – Lery Jul 01 '15 at 05:59
18

EDIT (5.5 years later!)

Had I known my solution would be featured in the video "Ladder and Box Problem" on Presh Talwalkar's "Mind Your Decisions" YouTube channel (thanks, Presh!), I would've made another pass.

Shunting the original solution to this answer's edit history, here's something of a streamlined presentation.


From a length-$b$ ladder resting against a side-$r$ box, we can make the following diagram:

enter image description here

Then we have:

$$\left(\;\color{green}{p + q + r} \;\right)^2 = \color{blue}{b}^2 + \color{red}{r}^2 \qquad\to\qquad p + q + r = \sqrt{b^2 + r^2} \tag{1}$$

(discarding the negative root). The semicircle recalls the classical construction of the geometric mean, and we have $$pq=r^2 \tag{2}$$

Now, $p$ and $q$ are the roots of the quadratic $$0 \;=\; (x-p)(x-q) \;=\;x^2 - (p+q)x + p q \;=\; x^2 - (-r + \sqrt{b^2+r^2})x + r^2 \tag{3}$$

Solving yields

$$\{p,q\} = \frac12 \left(-r + \sqrt{b^2 + r^2} \pm \sqrt{ b^2 - 2 r^2 - 2 r \sqrt{b^2 + r^2}} \right) \tag{$\star$}$$

For $r=1$ and $b=4$, this gives

$$\{p,q\} = \frac12 \left(-1 + \sqrt{17} \pm \sqrt{ 14 - 2\sqrt{17}} \right)$$

Calculating the "bigger cathetus" from this is left as an exercise to the reader.

Blue
  • 75,673
  • Oh, a really nice, "graphical" one. I think it may be the simpler one (hence the answer to my question). – Lery Jul 01 '15 at 06:12
  • This makes me wonder if a similar graphical construction can be made to demonstrate the general solution to a quartic. I'm guessing not, since it bypasses the cubic component, but it would be nice to see. – DanielV Jul 01 '15 at 15:56
  • 1
    @DanielV Actually they happened to do it so, in the "Ancient time". Looks for info about al'Khayyam for the cubic equations, for example. (But it's made using more complicated stuff than "just" squares and triangles) – Lery Jul 01 '15 at 17:03
6

Consider the equation of the line that the ladder makes:

$$\mathcal{l} = \{ (x, y) ~:~ y = mx + h \}$$

where $h$ is the height of the ladder on the wall and $m$ is the slope of the ladder. We know that $(1, 1)$ is on the line, so

$$1 = m + h$$

And we know that the distance from the x-intersecpt to the y-intersept is $4$. So

$$h^2 + (-h/m)^2 = 4^2$$

So solve the last 2 equations for $h$:

$$h^2 + \left(\frac{h}{1-h}\right)^2 = 4^2$$ $$h^4 - 2h^3 - 14 h^2 + 32h - 16 = 0$$

So the problem is a quartic. It doesn't really have a simple answer (what was this newspaper thinking?), but the one you want is:

$$h = \frac{ \sqrt{14 - 2 \sqrt{17}} + \sqrt{17} + 1 } {2} \approx 3.76$$

DanielV
  • 23,556
5

Expanding on the original diagram (see below), observe that if we draw a circle centred at point $O$ with $\overline{EF}$ as a diameter, then point $A$ is on the circle. We also construct point G such that $\overline{OG} \perp \overline{EF}$. Furthermore, since $\angle{FOG}$ is a right-angle, $\angle{GAF}$ is $45^\circ$ as labeled, so points $A,D,G$ are collinear.

Using the fact that the power of point D relative to the circle is invariant, we have

$(AD)(DG) = (FD)(DE) = (FO + OD)(OE - OD)$

Since $AD = \sqrt{2}$ and $OF=OG=2$, then $DG = 2 \sec{\theta}, OD = 2 \tan{\theta}$, so

$\sqrt{2} (2 \sec{\theta}) = (2 + 2 \tan{\theta})(2 - 2 \tan{\theta}) = 4 - 4 \tan^{2}{\theta} = 8 - 4 \sec^{2}{\theta}$.

Put $w = \sec{\theta}$ to reduce to $4 w^2 + 2\sqrt{2}w - 8 = 0$ and taking the positive root $w = \frac{-\sqrt{2} + \sqrt{34}}{4}$ from which $\cos{\theta} = \frac{1}{w} = \frac{4}{\sqrt{34} - \sqrt{2}}$, so $\theta \approx 0.437896 \text{ rad }$ and $AF = 4 \cos{(\frac{\pi}{4} - \theta)} \approx 3.7609$

Elaboration of original diagram showing additional geometry

Marconius
  • 5,635
4

Let $x$ be BF, then

$(x+1)^2 + (1+\frac1x)^2 = 16$

$x^2 + \frac1{x^2} + 2x + \frac2{x} + 2 = 16$

Let $a = x + \frac1x$, then $a^2 = x^2 + 2 + \frac1{x^2}$.

The equation becomes $a^2 + 2a = 16$.

Solve for $a$, then solve for $x$.

LucaMac
  • 3,339
Mike
  • 41
  • Thanks Luca!!!! – Mike Dec 20 '20 at 02:10
  • Anyone has a solution when ABCD is rectangular but not square? – Mike Dec 20 '20 at 02:30
  • Yes, see the answer by Sean and its reference to some slides, the slides contain a solution for a rectangular ABCD box. BTW, really clean change of variable, straight to the point here, but are you sure it gives the right answer? Thanks. :) – Lery Dec 21 '20 at 13:17
  • I am quite sure as the final equation become Jyrky’s final equation. – Mike Dec 28 '20 at 11:04
  • Right, I miscalculated something and thought you had a sign issue, but it must have been my resolution, since I redid it now and see it solves to x = 1/2 (-1 + sqrt(17)) + 1/2 sqrt(-4 + (-1 + sqrt(17))^2) as well. – Lery Dec 29 '20 at 12:14
  • I did a similar two-stage quadratic thing but by a different route. $a = |FD|$, $b = |DE|$, so $|FB| = a/b$. Pythagorus on $FBD$ gives $a^2 + b^2 = a^2b^2$. As $a+b=4$, so $a^2 + b^2 + 2ab = 16$, $\therefore$ $(ab)^2 + 2ab = 16$, which is merely quadratic in $ab$, and from $ab$ and $a+b$, we get the second quadratic. – Daniel Earwicker Mar 06 '24 at 20:24
2

With $x=|FB|$ and $a=|CE|$ the total area of $AFE$ is

$A_{tot}=\frac {(1+x)(1+a)}{2}$

$A_{tot}$ is also given as the sum of $ABDC$, $FBD$ and $CDE$

$A_{tot}=1 + \frac {x}{2} + \frac{a}{2}$

Equating the two expressions for $A_{tot}$ results in $a=\frac{1}{x}$.

Substituting this in (Pythagoras for triangle $AFE$)

$(x+1)^2+(1+a)^2=16$

results in

$x^4+2x^3-14x^2+2x+1=0$

The largest positive root is $x \approx 2.7609$.

Harris
  • 121
1

I just saw Presh Talwalker's video linking here, and I think that both he and everyone here are overcomplicating things. As far as I can tell, this problem can be solved with just Pythagoras's Theorem, similar triangles, and simultaneous equations.

We start off by labeling the triangles the way that Presh Talwalker does; the length along the ground between the box and the ladder is equal to x; the length along the wall between the box is equal to y. From Pythagoras's Theorem, we can see that $(x+1)^2+(y+1)^2 = 4^2$.

We can also see that we have a pair of similar triangles formed between the box, the ladder, and the floor, and the wall, the box, and the ladder. Because they're similar triangles, the ratio of the lengths of their sides are the same. This means that $y/1 = 1/x$.

We have two equations and two variables, so we can solve them using simultaneous equations. Plugging them into Wolfram Alpha, and discarding the negative solution, we get the solution of

$x = \frac{1}{2} ( -1 - \sqrt{17} + \sqrt{2 (7 + \sqrt{17})} )$

and

$y = -2 + 7 (-1 - \sqrt{17} + \sqrt{2 (7 + \sqrt{17})}) - \frac{1}{2} (-1 - \sqrt{17} + \sqrt{2 (7 + \sqrt{17})})^2 - \frac{1}{8} (-1 - \sqrt{17} + \sqrt{2 (7 + \sqrt{17})})^3$

This is approximately equal to $x=0.3622, y=2.76091$.

0

Here are two solutions, the first is purely algebraic, the second uses some basic trigonometry. For an overview of the history of this problem see The “Ladder and Box” Problem: From Curves to Calculators by P. Baggett and A. Ehrenfeucht. This reference was provided by Presh Talwalkar to his video Ladder And Box Puzzle, which goes through the solution given in another answer to this question.

First solution

With $c = |AB|$ the height of the box, $x = |CE|$, $y = |BF|$ the lengths of the legs of the right triangle $AEF$ minus the height of the box, and $l = |EF|$ the length of the ladder:

$\left(x+c\right)^2 + \left(y+c\right)^2 = l^2$ \left(theorem of Pythagoras\right)

$\frac{x}{c} = \frac{c}{y}$ \left(similar triangles\right)

Expand the squares in the first equation and substitute $c^2=xy$ from the second equation, then solve for $x+y > 0$:

$\left(x+y\right)^2 + 2c\left(x+y\right) = l^2$

$x+y = −c + \sqrt{c^2+l^2}$

Vieta's formula says that $x$ and $y$ are the roots of the quadratic polynomial $z^2 − \left(x+y\right) z + xy = z^2 − \left(−c + \sqrt{c^2+l^2}\right) z + c^2$, given by

$\frac{1}{2} \left(−c + \sqrt{c^2+l^2} \pm \sqrt{−2c^2 + l^2 − 2c\sqrt{c^2+l^2}}\right)$

For $l = 4, c = 1$, we get

$|AF| = y + c = \frac{1}{2} \left(\sqrt{17} + 1 + \sqrt{14 − 2\sqrt{17}}\right)$

Second solution

With $c = |AB|$ the height of the box, $l = |EF|$ the length of the ladder, $y = |BF|$ the height of the top of the ladder over the box, and $\alpha = \measuredangle AFE$ the angle between wall and ladder:

$l \cos \alpha = y + c$

$y \tan \alpha = c$

or

(1) $l' \cos \alpha = y' + 1$

(2) $y' \tan \alpha = 1$,

where $l' = \frac{l}{c}$, $y' = \frac{y}{c}$. Eliminate y' by calculating (1) $\sin \alpha$ + (2) $\cos \alpha$, then square the resulting equation:

$l' \sin \alpha \cos \alpha = \sin \alpha + \cos \alpha$

$l'^2 \left(\sin \alpha \cos \alpha\right)^2 = 1 + 2 \sin \alpha \cos \alpha$

Solve the quadratic equation for $\sin \alpha \cos \alpha > 0$:

$l'^2 \sin \alpha \cos \alpha = 1 + \sqrt{1+l'^2}$

Substitute into $(1)^2(2)$ and solve for $y'$:

$y' \left(1 + \sqrt{1+{l'}^2}\right) = \left(y' + 1\right)^2$

$2 y' = \sqrt{1+{l'}^2} − 1 \pm \sqrt{{l'}^2 − 2\sqrt{1+{l'}^2} − 2}$

Note that for the two solutions $y_1'$ and $y_2'$ we have $\left(y_1'+1\right)^2 + \left(y_2'+1\right)^2 = l'^2$, the theorem of Pythagoras for the triangle AEF.

For $l = 4$, $c = 1$:

$2 y' = \sqrt{17} − 1 \pm \sqrt{14 − 2\sqrt{17}}$

$|AF| = y_1 + c = \frac{1}{2} \left(\sqrt{17} + 1 + \sqrt{14 − 2\sqrt{17}}\right)$

Lery
  • 803
  • 6
  • 11