Maths WorkshopMaths problems with full solutions
Exercise 1513Calculus › Single-variable calculus › Differentiation › Optimisation and curve sketchingL2Added 2 Nov 2026

The longest ladder around a corner

#optimisation#trigonometry#geometry#applications

Statement

Two corridors, of widths aa and bb, meet at a right angle. What is the length of the longest ladder that can be carried horizontally around the corner?

Hint

When the ladder touches the inner corner and makes an angle θ∈(0,π2)\theta\in(0,\frac\pi2) with the walls of the corridor of width aa, its length is L(θ)=asin⁡θ+bcos⁡θL(\theta)=\dfrac a{\sin\theta}+\dfrac b{\cos\theta}. The longest ladder that fits is the *minimum* of LL.

Show solutionHide solution

Solution

Idea. For each angle θ\theta, the ladder wedged between the two outer walls and touching the inner corner has length L(θ)L(\theta). A ladder passes the corner if it is shorter than L(θ)L(\theta) for *every* θ\theta, so the answer is min⁡L\min L.

Derivative.
L′(θ)=−acos⁡θsin⁡2θ+bsin⁡θcos⁡2θ=0  ⟺  tan⁡3θ=ab.L'(\theta)=-\frac{a\cos\theta}{\sin^2\theta}+\frac{b\sin\theta}{\cos^2\theta}=0\iff\tan^3\theta=\frac ab.
L′L' is negative for small θ\theta and positive near π2\frac\pi2, and L→+∞L\to+\infty at both ends, so this critical point is the global minimum.

Value. Let t=tan⁡θ=(a/b)1/3t=\tan\theta=(a/b)^{1/3}. Then sin⁡θ=t1+t2\sin\theta=\frac t{\sqrt{1+t^2}} and cos⁡θ=11+t2\cos\theta=\frac1{\sqrt{1+t^2}}, so
L=1+t2(at+b).L=\sqrt{1+t^2}\left(\frac at+b\right).
With at=a2/3b1/3\frac at=a^{2/3}b^{1/3} and 1+t2=a2/3+b2/3b1/3\sqrt{1+t^2}=\dfrac{\sqrt{a^{2/3}+b^{2/3}}}{b^{1/3}}, this simplifies to
Lmin⁡=(a2/3+b2/3)3/2.L_{\min}=\left(a^{2/3}+b^{2/3}\right)^{3/2}.

Check. For a=b=1a=b=1: Lmin⁡=23/2=22≈2.83L_{\min}=2^{3/2}=2\sqrt2\approx2.83. For a=8a=8, b=1b=1: tan⁡θ=2\tan\theta=2 and L=82/5+5=55≈11.18L=\frac8{2/\sqrt5}+\sqrt5=5\sqrt5\approx11.18, and (4+1)3/2=55(4+1)^{3/2}=5\sqrt5 as well.