Let $X,Y$ be independent standard normally distributed random variables and $X,Y\neq 0$. Find the density of $\frac{X^2}{Y^2+X^2}$
I was given the tip of first calculating the density of $(X^2,Y^2)$ and then calculate the density of $(\frac{X^2}{Y^2+X^2},Y^2+X^2)$
When I follow the tips: I know that $X^2\sim\Gamma(\frac{1}{2},\frac{1}{2})$ and $Y$ too. Furthermore, $X^2$ and $Y^2$ are still independent. Therefore the density $f_{(X^2,Y^2)}(x,y)$ can be written as $f_{X^2}(x)f_{Y^2}(y)$ where $f_{X^2}$ and $f_{Y^2}$ are the density functions of $X^2$ and $Y^2$
My next idea, with the tip above in mind is to consider a map $\varphi: (x,y) \mapsto (\frac{x}{x+y},x+y)$
It then follows that $(\frac{X^2}{Y^2+X^2},Y^2+X^2)=\varphi(X^2,Y^2)$ and $f_{\frac{X^2}{Y^2+X^2},Y^2+X^2}(a,b) = f_{\varphi(X^2,Y^2)}(a,b) $
Note that $\varphi^{-1}: (a,b)\mapsto (ba,b-ba)$ and thus $\det D \varphi^{-1}(a,b)=\det\begin{pmatrix} b & a \\ -b & 1-a \end{pmatrix}=b(1-a)+ab\implies \det D \varphi^{-1}(\frac{X^2}{Y^2+X^2},Y^2+X^2)=(Y^2+X^2)(1-\frac{X^2}{Y^2+X^2})+(\frac{X^2}{Y^2+X^2})(Y^2+X^2)=Y^2+X^2$
And hence $P_{(\frac{X^2}{Y^2+X^2},Y^2+X^2)}(A)=\int_A f_{(\frac{X^2}{Y^2+X^2},Y^2+X^2)}(x,y)\,dx\,dy = \int_{\varphi^{-1}(A)}f_{(X,Y)}(x,y)\times (X^2+Y^2)\,dx\,dy = \int_{\varphi^{-1}(A)} f_X(x)\times f_Y(y)\times (X^2+Y^2)\,dx\,dy$
Where do I go from here?