In this CMSP online lecture the following derivation of the eigenvalue spacing of a 2 by 2 matrix is carried out. I have a question about the change in coordinates below (in red):
To calculate the spacing distribution of a $2\times 2$ random matrix we start off with a real symmetric matrix
$$X_{[2\times 2]}=\begin{bmatrix} x_1&x_3\\x_3&x_2 \end{bmatrix}$$
with $X_1, X_2 \sim N(0,1),$ and the off-diagonal elements as $X_3 \sim N(0,\frac{1}{2}).$
The pdf of the spacing, $S,$ between eigenvalues is
$S=\lambda_2 - \lambda_1.$
The characteristic equation is
$$\begin{align} \lambda^2 -\left(\mathrm {Tr} X \right)\lambda +\det X &= 0\\[2ex] \lambda^2 -(x_1 + x_2)\lambda + x_1x_2 - x_3^2 &=0\\[2ex] \lambda_{1,2} &= \frac{1}{2}\Bigg[x_1 + x_2 \pm \sqrt{(x_1+x_2)^2-4(x_1x_2 - x_3^2)}\Bigg]\\[2ex] S&=\sqrt{(x_1-x_2)^2 +4 x_3^2} \end{align}$$
Now,
$$f_S(s)=\int_{-\infty}^{\infty} \frac{dx_1}{\sqrt{2\pi}} \frac{dx_2}{\sqrt{2\pi}} \frac{dx_3}{\sqrt{\pi}}\exp\left\{-\frac{1}{2}(x_1^2+x_2^2)-x_3^2\right\}\delta\left(s-\sqrt{(x_1 - x_2)^2 + 4 x_3^2} \right)$$
At this point there is the following change of coordinates:
$$ \left\{ \begin{aligned} \color{red}{x_1 - x_2 = r \cos \theta}\\ \color{red}{2x_3 = r\sin\theta}\\ x_1 + x_2 =\psi \end{aligned} \right. $$
The question is: Are we just making these $X_1, X_2, X_3$ independent random variables dependent by using $r$ and $\theta$ for all of them? Is this change of variables legitimate, and why?