A point is randomly chosen from a disk of radius R centred at the origin so that each point in the disk is equally likely than X and Y are jointly continuous with joint density given by
$$f_{xy}(x,y)= \Biggr\{ \begin{array}{lr} \frac{1}{\pi R^2}& x^2+y^2<R^2 \\ 0& \text{otherwise} \end{array}$$ Find density function of $Z=\sqrt{X^2+Y^2}$
I am trying to do it like this first find $F_{Z}(z) \hspace{4pt}which\hspace{4pt} is \hspace{4pt}\frac{x^2+y^2}{z^2}$ then differentiate it with respect to $z$ to get $f_Z(z)$.
Clearly $0 < Z=\sqrt{X^2+Y^2} < R$. Thus we have $P(Z\leq z)=1$ for $z\geq R$ and $P(Z \leq z)=0$ for $z < 0$.
Now consider $0 \leq z < R$. We have $P(Z \leq z)=P(X^2+Y^2 \leq z^2)=\int_{x^2+y^2 \leq z^2}\frac{1}{\pi R^2}dA=\frac{z^2}{R^2}$.
Thus, the pdf of $Z$ is $f_{Z}(z)=\frac{d}{dz}F_{Z}(z)=\frac{2z}{R^2}I_{(0<z<R)}$.