I am trying to solve this problem:
"A point is generated at random in the plane according to the following polar scheme. A radius R is chosen, where the distribution of R2 is χ2 with 2 degrees of freedom. Independently, an angle θ is chosen, where θ ~ uniform(0, 2π). Find the joint distribution of X = Rcosθ and Y = Rsinθ."
I am off the final answer by a factor. I thought the transformation from (X,Y) to (R,θ) is not a one-to-one transformation due to the nature of inverse tangent function θ = tan-1(Y/X). Therefore I need to separate the support and calculate probability density function. Apparently, this is not true. A little bit thought makes me realize that I can identify the angle using X and Y. However, this is not obvious from θ = tan-1(Y/X) which I used to calculate the transformed probability density function. Any argument to reconciles this or clarify it?
Edit: I don't think my question is really about deriving Box-Muller but rather to understand the concept of one-to-one transformation. Take a simple example: $Y = \sqrt X $ is one-to-one transformation. However, $Y=X^2$ is not a one-to-one transformation.
Take another example:
$$Y_1 = X_1^2 + X_2^2 \quad\text{and} \quad Y_2 = \frac{X_1}{\sqrt Y_1}$$
is not one-to-to transformation so that when calculate its PDF we need to account the non one-to-one transformation. In solving for PDF of X and Y in the problem above. It is normal to think that:
$$f_{R^2,\theta} = \frac{1}{4\pi}e^{-R^2/2}, \quad 0<t<\inf, \quad 0<\theta<2\pi$$
the transformation is :
$$X = R\cos\theta,\quad Y=R\sin\theta.\quad $$
The inverse transformation is: $$R^2=X^2+Y^2,\quad \theta = \tan^{-1}(Y/X)$$
Here comes the question that the inverse transformation given above is not one-to-one in inverse tangent. Do I need to add another contribution to the final probability as in the situation of finding the PDF of $Y$ if $Y=X^2$?