Let $(X,Y)$ be a uniformly distributed random point on the $2\times 2$ square with four corners at $(0,0),(2,0),(2,2)$ and $(0,2).$ Let $R$ be the distance of $(X,Y)$ to the nearest corner. Find the CDF and the PDF of $R$.
Let $r\geq 0.$ I consider the four quarter disks of radius $r$ inside the square with center at the four corners of the square. Now I observe that the event $\{R\leq r\}$ is the event that the point $(X,Y)$ lies in the union of the four disks. Note that each disk has an area of $\pi r^2/4.$
Since the point $(X,Y)$ is uniformly distributed on the square, which has area equal to $4$, we have by the remark above, that $$F_{R}(r)=\mathsf{P}(R\leq r)= \begin{cases}\displaystyle\frac{\pi r^2}{4}&\text{if }0<r\leq 2\\1&\text{if }\,\,\,r>2 \\0&\text{if }\,\,\,r\leq 0.\end{cases}$$ And differentiating with respect to $r$, we find that $$f_{R}(r)= \begin{cases}\displaystyle\frac{\pi r}{2}&\text{if }0<r\leq 2\\0&\text{otherwise. } \end{cases}$$
Is my approach correct?
Any feedback is much appreciated. Thank you for your time.