Let $X,Y$ be independent normally distributed random variables. Find the density of $\frac{X^2}{Y^2+X^2}$ 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?

Observe that the distribution of the vector $(X,Y)$ is rotationally invariant. That is, if we rotate it at any angle, the resulting vector has the same distribution as $(X,Y)$. 
Why? Rotation  $\alpha$ radians counterclockwise gives the vector $(X\cos \alpha-Y\sin \alpha,X\sin \alpha+Y \cos \alpha)$, which is centered gaussian whose covariance matrix is the identity, hence the components are independent standard normal. 
Since the distribution of $(X,Y)$ is invariant under rotation, the angle it makes with the positive $x$-axis, $\Theta$ is uniformly distributed on $[0,2\pi)$. 
Let   $Z= X^2/(X^2+Y^2)$. Then from the definition of $\Theta$, 
$Z = \cos^2 \Theta$, so this is nothing but a transformation of a uniform RV, which after a routine calculation gives us the density 
$$f_Z (z) = \frac{1}{\pi\sqrt{(1-z)z}},~z \in (0,1).$$ 
