$(X,Y) $ is a random vector such that $$ f_{(X,Y)}(x,y)=\begin{cases} \frac{1}{\pi} & \text{if} & x^2+y^2\leq 1 \\ 0 & \text{if} & x^2+y^2> 1 \end{cases} $$ I want to find $ f_R(r)$ where $R=\sqrt{X^2+Y^2} $. I know that someone has already asked this question (Here is the link) but I think I have a different solution which involves more calculus. Here it is:
Define $g:\mathbb{R}^2 \to \mathbb{R}^2 $ by $g(x,y)=(\sqrt{x^2+y^2},x) $, this function is inyective in the set $ S_o=\{ (x,y)|y\geq 0\}$ and has inverse $ g^{-1}(u,v)=\left( \sqrt{v^2-u^2},v\right)$. The jacobian: $$J_{g^{-1}}(u,v)= \begin{pmatrix} \frac{-u}{\sqrt{v^2-u^2}} & \frac{v}{\sqrt{v^2-u^2}} \\ 0 & 1 \end{pmatrix}\rightarrow |\det(J_{g^{-1}}(u,v))|=\frac{|u|}{\sqrt{v^2-u^2}}$$ Therefore $$ f_{(U,V)}=\frac{f_{(X,Y)}(\sqrt{v^2-u^2})|u|}{\sqrt{v^2-u^2}} $$ Since we want to find $f_{R}=f_{U} $ it suffies to calculate $$ f_{U}(u)=\int_{\mathbb{R}} \frac{f_{(X,Y)}(\sqrt{v^2-u^2})|u|}{\sqrt{v^2-u^2}} \;dv$$
Am I right in this idea? Thank you all in advance
I'm not sure if what I asked is right (I think it is) but now I have a diferent and probably easier solution for the problem, thanks to a hint given in Probability Essentials by Jean Jacod Philip Protter:
Consider the following function: $$ g:\mathbb{R}^2\to \mathbb{R}^2 \quad g(x,y)=\left(\sqrt{x^2+y^2},\arctan\left(\frac{x}{y}\right)\right) $$ It is inyective and has inverse $ g^{-1}(r,s) =(r\sin(s),r\cos(s)) $ then $$ f_{g(X,Y)}(r,s)=f_{(X,Y)}(g^{-1}(r,s))|\det(J_{g^{-1}})(r,s)| =\frac{r}{\pi}1_{[0,1]}(r^2)=\frac{r}{\pi}1_{[-1,1]}(r) $$ Recall that we want to know $f_R $ which is the marginal distribution of $ f_{g(X,Y)}$: $$ f_R(r)= \int_{\mathbb{R}} f_{g(X,Y)}(r,s) \; ds = \int_{0}^{2\pi} \frac{r}{\pi}1_{[-1,1]}(r) \; ds =2r 1_{[-1,1]}(r) $$