0

Let $P$ be a point inside a square with side length $1$. Let $Q$ be a point such that $\|PQ\|=1$. Find the average length of $PQ$ contained in the square.

I have recently been interested in problems like this: Average Distance Between Two Points in a Circular Disk and Average Distance Between Two Randomly Chosen Points in Unit Square. This led me to think up a somewhat similar problem.

However, I am not really sure how to go about solving it. I have been looking at Average distance Between Random Points on a Line Segment but my only idea is that there may be a double summation or integral to cover all the angles the line could be at in relation to the origin. I don't know if that made any sense.

Dylan Levine
  • 1,634
  • 1
    I suggest: pick a particular $P$ (like the center of the square, or one of the corners) and work it out carefully. The dependence on $P$ isn't clear (at least to me). – lulu Nov 06 '23 at 22:06
  • @lulu With $P$ in center the average length is obviously greater than $0.5$, and with $P$ in a corner the average length is clearly $0.25$ – Daniel Mathias Nov 07 '23 at 00:57
  • @DanielMathias the calculation at the center isn't difficult either, but doesn't clarify the general dependence. Of course there's no reason for that to be very clean – lulu Nov 07 '23 at 01:19
  • 1
    For what it worth, simulation gives a result of $\approx 0.4732$ – Daniel Mathias Nov 07 '23 at 02:38

1 Answers1

2

This problem deals with the boundary of the intersection of the disk $D(P,1)$ with center $P$ and radius 1 and the (filled) square $C$.

Let us give a complete treatment of the particular case where $P$ is at the center of the square ; in this case this frontier is the square itself with the following polar equation (see this answer) :

$$r = \frac{1/2}{|\cos(\theta-\pi/4)|}$$

(the square being with vertices $(\pm s;0), \ (0; \pm s)$ (where $s:=\tfrac{\sqrt{2}}{2}$) as can be seen on the graphics below :

enter image description here

The mean length is therefore obtained as :

$$\overline{L}= \frac{1}{2 \pi}\int_0^{2 \pi} \frac{1/2 \ d \theta}{|\cos(\theta-\pi/4)|}$$

Taking into account different symmetries, it suffices to work in the first part of the first quadrant and multiply the result by $8$ ; this allows in particular to drop the absolute value signs :

$$\overline{L}= \frac{1}{2 \pi} 8 \int_0^{\pi/4} \frac{1/2 \ d \theta}{\cos(\theta-\pi/4)}=\frac{2}{ \pi} \int_0^{\pi/4} \frac{d \theta}{\cos(\theta)}\tag{1}$$

Knowing that a primitive function of $\frac{1}{\cos(\theta)}$ is $\ln \left(\frac{1+\tan(\theta/2)}{1-\tan(\theta/2)}\right)$ and that $\tan \tfrac{\pi}{8}= \sqrt{2}-1$, a closed-form value can be given to (1).

Jean Marie
  • 81,803