# A fence 4 feet tall runs parallel to a tall building at a distance of 2 feet from the building. What is the length of the shortest ladder that will reach from the ground over the fence to the wall of the building?

Jun 30, 2016

8.32ft

#### Explanation: Intending to use a Lagrange Multiplier , we are minimising ${s}^{2} = {x}^{2} + {y}^{2} = f \left(x , y\right)$ where s is the length of the ladder.

This is subject to constraint which comes from similar triangles that $\frac{y}{x} = \frac{4}{x - 2} \setminus \implies y x - 2 y - 4 x = 0 = g \left(x , y\right)$

so $\nabla f = \lambda \nabla g = \implies$

$< 2 x , 2 y > = \lambda < y - 4 , x - 2 >$

$\setminus \implies \frac{x}{y - 4} = \frac{y}{x - 2} q \quad \star$

using the constraint $\frac{y}{x} = \frac{4}{x - 2} \setminus \implies y = \frac{4 x}{x - 2}$ and subbing this into $\star$ :

$\setminus \implies \frac{x}{\frac{4 x}{x - 2} - 4} = \frac{\frac{4 x}{x - 2}}{x - 2}$

$\setminus \implies \frac{x \left(x - 2\right)}{4 x - 4 \left(x - 2\right)} = \frac{4 x}{x - 2} ^ 2$

$\setminus \implies x {\left(x - 2\right)}^{3} = 32 x$

$\setminus \implies x \left({\left(x - 2\right)}^{3} - 32\right) = 0$

ignoring the trivial solution we have

${\left(x - 2\right)}^{3} = 32$

$x = 2 + {32}^{\frac{1}{3}} = 5.175$

$y = 6.519$

so ladder length $s = \sqrt{{5.175}^{2} + {6.519}^{2}} = 8.32 f t$

plot confirms authenticity of solution The "proof" that this is a minimum comes from physical arguments. It is easy to imagine a ladder that has its base a distance $\epsilon$ beyond the fence so that the similar triangles give

$\frac{y}{2 + \epsilon} = \frac{4}{\epsilon} | \implies y = \frac{8}{\epsilon} + 4$

then ${\lim}_{\epsilon \to \infty} y = {\lim}_{\epsilon \to \infty} \frac{8}{\epsilon} + 4 = 4$

and ${\lim}_{\epsilon \to 0} y = {\lim}_{\epsilon \to 0} \frac{8}{\epsilon} + 4 = \infty$

Jun 30, 2016

$8.32388$ feet

#### Explanation:

Fence height = ${h}_{0}$
Fence distance = ${d}_{0}$
Ladder length = $l$

$l \cos \left(\alpha\right) = x + {d}_{0}$
$l \sin \left(\alpha\right) = y + {h}_{0}$
$\frac{y + {h}_{0}}{h} _ 0 = \frac{x + {d}_{0}}{x}$ Thales of Miletus

Solving for $x , y , l$ we have

( (x = h_0 cot(alpha)), (y = d_0 tan(alpha)), (l = h_0/sin(alpha) + d_0/cos(alpha)) )

Here $l \left(\alpha\right)$ so for stationary values determination we do

$\frac{\mathrm{dl}}{d \alpha} = - {h}_{0} \cos \frac{\alpha}{\sin} ^ 2 \left(\alpha\right) + {d}_{0} \sin \frac{\alpha}{\cos} ^ 2 \left(\alpha\right) = 0$

or

${d}_{0} {\sin}^{3} \left(\alpha\right) - {h}_{0} {\cos}^{3} \left(\alpha\right) = 0 \to \tan \left(\alpha\right) = {\left({h}_{0} / {d}_{0}\right)}^{\frac{1}{3}}$
$\alpha = \arctan \left[{\left({h}_{0} / {d}_{0}\right)}^{\frac{1}{3}}\right] = 0.899908$

and

$l \left(0.899908\right) = 8.32388$ feet