Recognize the integrand as a Gaussian scale mixture. If has the unit Rayleigh distribution and is an independent standard normal distribution variable, then the conditional density of given is . Multiplying by the radius density gives
Thus use for the independent radius and for the normal output of the Box-Muller transform:
The mixture argument also proves that integrates to one, by the Tonelli theorem. As a check, is exponential of rate , so the characteristic function of is . This is the Rayleigh-normal scale mixture, with Laplace distribution density .
The Box-Muller transform uses independent uniforms to set
The radius has the unit Rayleigh distribution, with density for , and the angle is independently uniform on . Their joint density is . The Cartesian change of variables has absolute Jacobian determinant , so the joint density of is
The factorization proves that the outputs are independent random variables, each with a standard normal distribution.
An independent unit-scale Rayleigh distribution variable and standard normal distribution variable give with Laplace distribution of density . Indeed its characteristic function is .