A point P is chosen uniformly at random in the unit square [−21,21]2. What is the probability that P is closer to the centre O=(0,0) than to every side?
Solution. Split the square into four triangles by its two diagonals. Consider the top triangle T={(x,y):y≥∣x∣}: here the closest side is the top side y=21, at distance 21−y.
In T, the point (x,y) is closer to O=(0,0) than to the top side iff x2+y2≤21−y. Both sides are non-negative on T, so squaring is reversible: the condition becomes x2+y2≤41−y+y2, i.e., y≤41−x2. This is the region under a downward parabola with focus O and directrix y=21.
The parabola y=41−x2 meets the boundary line y=x of T where x=41−x2, giving x∗=22−1. On T, the region both inside T (so y≥∣x∣) and below the parabola is RT={(x,y):∣x∣≤x∗,∣x∣≤y≤41−x2}. Its area equals area(RT)=2∫0x∗(41−x2−x)dx=2[4x∗−3(x∗)3−2(x∗)2]. With x∗=(2−1)/2 we have (x∗)2=(3−22)/4 and (x∗)3=(52−7)/8. Substituting and simplifying, area(RT)=1242−5. By the fourfold symmetry of the square, the full region where P is closer to O than to every side has area 4⋅1242−5=342−5. Since the unit square has area 1, P=342−5≈0.219.■
The region (sage) inside the unit square where a point is closer to the centre than to any side. The boundary consists of four parabolic arcs (copper), each with focus at the centre and one side as directrix. The region’s area is 342−5.