# Jacobian Transformation to find joint pdf of $Y_1$ and $Y_2$

Let $X_1$ and $X_2$ have the following joint density:

$$f_{X_{1},X_{2}}(x_1,x_2) = \begin{cases} {\frac{4}{\pi}e^{-(x_1^2+x_2^2)}} & \text{x_1 \gt 0, x_2 \gt 0} \\{0} & \text{otherwise}\end{cases}$$

Letting $Y_1=X_1^2$ and $Y_2 =X_1^2 + X_2^2$, give the joint pdf of $Y_1$ and $Y_2$.

I have avoided using Jacobian Transformations in the past because it seemed complicated, but I think using it would be much easier than alternative methods in this case. I wanted to make sure I'm doing this correctly.

\begin{align*} J(x_1,x_2) &= \begin{vmatrix}\frac{\partial x_1^2}{\partial x_1}&&\frac{\partial x_1^2}{\partial x_2}\\\frac{\partial x_1^2+x_2^2}{\partial x_1}&&\frac{\partial x_1^2+x_2^2}{\partial x_2}\end{vmatrix}\\\\ &= \begin{vmatrix}2x_1&&0\\2x_1&&2x_2\end{vmatrix}\\\\ &= 4x_1x_2 \end{align*}

For $x_1$ and $x_2$ we have

$x_1=\sqrt{y_1}$ and $x_2=\sqrt{y_2-y_1}$

Thus I have,

\begin{align*} f_{Y_1,Y_2}(y_1,y_2) &= f_{X_1,X_2}\left(\sqrt{y_1},\sqrt{y_2-y_1}\right) \cdot \left |J(x_1,x_2)\right|^{-1}\\\\ &= \frac{4}{\pi}\cdot e^{-(\sqrt{y_1}^2+\sqrt{y_2-y_1}^2)}\cdot\frac{1}{4x_1x_2}\\\\ &= \frac{1}{\pi\sqrt{y_1}\sqrt{y_2-y_1}}\cdot{e^{-y_2}} \\\\ \end{align*}

So the pdf I obtained is

$$f_{Y_{1},Y_{2}}(y_1,y_2) = \begin{cases} \frac{e^{-y_2}}{\pi\sqrt{y_1}\sqrt{y_2-y_1}} & \text{y_1 \gt 0, y_2 \gt 0} \\{0} & \text{otherwise}\end{cases}$$

Is this correct?

Edit:

If $Y_1 = X_1^2$ and $Y_2=X_1^2+X_2^2$ then $Y_2 \gt Y_1$ so

$$f_{Y_{1},Y_{2}}(y_1,y_2) = \begin{cases} \frac{e^{-y_2}}{\pi\sqrt{y_1}\sqrt{y_2-y_1}} & \text{y_1 \gt 0, y_2 \gt y_1} \\{0} & \text{otherwise}\end{cases}$$

Checking, I get that $$\int_0^\infty \int_x^\infty \frac{e^{-y_2}}{\pi\sqrt{y_1}\sqrt{y_2-y_1}} = 1$$