Preamble: Given the illustration in the figure below, the pdf for a random variable $r$ is shown below:
$$f_r(r)= \frac{\lambda \pi r \exp{(-\lambda \pi r^2/2)}}{1-e^{-\lambda \pi R^2/2}}$$
where $$0<r\leq R$$
Question: In order to transform the above pdf, how was the equation below derived? Are there any special manoeuvres involved? I would appreciate this with steps.
$$f_Z(z)= \frac{\sqrt{2\lambda}e^{-\lambda \pi z^2/2}\text{erf}\sqrt{\frac{\pi\lambda}{2}(R^2-z^2)}}{1-e^{-\lambda \pi R^2/2}}$$
where $$0<z\leq R$$
With these steps one should be able to transform
$$f_r(r)= \frac{2r}{R^{2}}$$ to $$f_Z(z)= \frac{4\sqrt{R^2-z^2}}{\pi R^2}$$

Assume WLOG 2D PDF of the random vector $(\hat r,\hat \theta)$ in the form of $$f_{r,\theta}(r,\theta)=\dfrac2\pi f_r(r),\quad r\in(0,R],\quad \theta\in\left(0,\dfrac\pi2\right),$$ then the element of the 2D PDF is $$dF(r,\theta) = \Pr((\hat r\in[r,r+\mathrm dr]) \wedge(\hat\theta\in[\theta,\theta+\mathrm d\theta])) =\dfrac2\pi f_r(r)\,\mathrm dr\,\mathrm d\theta.$$ In according with the illustration, $$\hat z = \hat r\cos\hat\theta,\quad \hat z\in(0,\hat r],$$ and $$F_z(z) = \Pr(\hat z \le z) = \dfrac2\pi\int\limits_0^R\int\limits_{\arccos\dfrac zr}^{\pi/2} f_r(r)\,\mathrm dr\,\mathrm d\theta,$$ then $$f_z(z)=\dfrac{\,\mathrm dF_z(z)}{\,\mathrm dz} = \dfrac2\pi\int\limits_z^R f_r(r)\dfrac{\mathrm dr}{\sqrt{r^2-z^2}}.$$
If $$f_r(r)=\dfrac{2r}{R^2},$$ then $$f_z(z) = \dfrac{4}{\pi R^2}\int\limits_z^R \dfrac{r\mathrm dr}{\sqrt{r^2-z^2}} = \dfrac{4}{\pi R^2}\sqrt{r^2-z^2}\Big|_z^{R} = \mathbf{\color{red}{\dfrac{4\sqrt{R^2-z^2}}{\pi R^2}}}.$$