Skip to content
Vamshi Jandhyala

Mathematics

Can You Reach the Edge of the Square?

Two puzzles from Fiddler on the Proof: starting at the centre of a unit square, move in a uniformly random direction until you hit the boundary — what is the expected distance travelled? Same question in a unit cube.

Download PDF →


In the square, the expected distance is 1πln(3+22)0.5614\tfrac{1}{\pi} \ln(3 + 2\sqrt 2) \approx 0.5614. In the cube, 3π0π/4(π2arctansecθ)secθdθ0.610687\tfrac{3}{\pi} \int_0^{\pi/4} (\tfrac{\pi}{2} - \arctan \sec\theta) \sec\theta \, d\theta \approx 0.610687. The PDF includes the uniform-on-sphere sampling derivation and Monte Carlo verification for both.


More mathematical writing →