PDF of distances in the circular disk I am trying to understand a research article. I cannot understand how the authors have come across the pdf (see the eq. in the third Image) . I have share the relevant details below


Following are the two hypothesis that authors want to test on.

The PDF of the distance between the MUE and the MBS is given as following figure


 A: For $\mathbb{H}_{1}$, the assumption is that M-UE is uniformly distributed in region II. Letting $l$ be the distance, and fixing some $L$, we have:
$$P(l \leq L) = \frac{\text{Area in Region II at most }L\text{ away from the M-BS}}{\text{Total area in region II}} = \frac{\pi L^{2} - \pi(d - r)^{2}}{\pi(d + r)^{2} - \pi(d - r)^{2}} = \frac{L^{2} - (d - r)^{2}}{4dr}$$
Assuming $d - r \leq L \leq d + r$. This is the CDF of $L$, and the PDF can be found by differentiating w/r/t $L$. The same method works for $\mathbb{H}_0$, note that the area of regions I and III combined is $\pi[(d - r)^{2} - \varepsilon^{2}] + \pi[R^{2} - (d + r)^{2}] = \pi(R^{2} - 4dr - \varepsilon^{2})$, which is where that denominator comes from.
A: Let's start with $\mathbb H_1$, we assume M-UE is uniformly distributed on region II. Let us call $U$ the region II and let $a(U)$ be its area. Let $g$ be PDF for the position of M-UE. We know that:
$$\forall (x,y) \in U:\ g(x,y) = C$$
and 
$$\int_U g = C \cdot a(U) = 1.$$
Hence $C = 1/a(U)$. Also, a quick calculation shows that $a(U) = \pi(d+r)^2 - \pi(d-r)^2 = 4\pi dr$.
Now, we need to get to $l$ somehow, so we will change the coordinate system from $(x,y)$ to $(l,\theta)$. Let's say $(x,y)=\varphi(l,\theta)$.
The exact formula is $\varphi_x(l,\theta) = l\cdot\cos\theta$ and $\varphi_y(l,\theta) = l\cdot\sin\theta$. Let $J$ be the determinant of the Jacobian matrix of $\varphi$. One can easily compute that $J(l,\theta) = l$
Lets say $\hat g$ is same PDF as $g$ but with $(l,\theta)$ as coordinates, then 
$$\hat g(l,\theta) = g(\varphi(l,\theta))\cdot J(l,\theta)= \frac{1}{a(U)}\cdot l.$$
The first equality was simply the substitution rule for measures (and PDFs as well, since PDFs are measures). 
We know the PDF for coordinates $(l,\theta)$, now we ask yourself "what is the PDF for $l$"? Well, let $f$ be the corresponding PDF, then
$$f(l) = \int_{[0,2\pi]}\hat g(l,\theta)\ d\theta = \frac{2\pi l}{a(U)} = \frac{2l}{4dr}.$$
This is exactly what the formula $f_l$ from the paper tells us for the case $\mathbb H_1$. 
One can repeat the same text for $\mathbb H_0$, the only real difference will be that $U$ is now union of regions I and III, and its area $a(U)$ is $\pi R^2 - \pi (d+r)^2 + \pi(d-r)^2 - \pi\varepsilon^2 = \pi (R^2 - 4dr -\varepsilon^2)$ ($\varepsilon$ comes from the fact that authors assume M-UE can't be too close to M-BS, so the ball of the size $\varepsilon$ is excluded). This will also change the final result to $f(l) = \frac{2l}{R^2 - 4dr -\varepsilon^2}$, which you can also recognize in the final formula.
