Integrating the equations of motion 103
Gaussian random number. If the equation is solved forMvaluesξ 1 ,...,ξMto yield
valuesX 1 ,...,XM, then we simply setxi=Xi, and we have a sampling off(x) (see
Chapter 7 for a more detailed discussion).
Unfortunately, we do not have a simple closed form expression forP(X) that allows
us to solve the equationP(X) =ξeasily forX. The trick we need comes from recog-
nizing that if we square eqn. (3.8.13), we obtain a probability distribution for which a
simple closed form does exist. Note that squaring the cumulative probability requires
introduction of another variable,Y, yielding a two-dimensional Gaussian cumulative
probability
P(X,Y) =
(
1
2 πσ^2
)∫X
−∞
∫Y
−∞
dxdye−(x
(^2) +y (^2) )/ 2 σ 2
. (3.8.14)
The integral in eqn. (3.8.14) can be carried out analytically by introducing polar
coordinates:
x=rcosφ, y=rsinφ
X=Rcos Φ, Y=Rsin Φ. (3.8.15)
Using this transformation, we obtain the cumulative probability ofRand Φ as
P(R,Φ) =
1
2 π
∫Φ
0
dφ
1
σ^2
∫R
0
dr re−r
(^2) / 2 σ 2
. (3.8.16)
These are now elementary integrals, which can be performed to yield
P(R,Φ) =
(
Φ
2 π
)(
1 −e−R
(^2) / 2 σ 2 )
. (3.8.17)
Note that eqn. (3.8.17) is in the form of a product of two independent probabilities.
One is a uniform probability thatφ≤Φ and the other is the nonuniform radial
probability thatr≤R. We may, therefore, set each of these equal to two different
random numbers,ξ 1 andξ 2 , drawn from [0,1]:
Φ
2 π
=ξ 1
1 −e−R
(^2) / 2 σ 2
=ξ 2. (3.8.18)
Introducingξ 2 ′ = 1−ξ 2 (which is also a random number uniformly distributed on
[0,1]) and solving forRand Φ yields
Φ = 2πξ 1
R=σ
√
−2 lnξ′ 2. (3.8.19)
Therefore, the values ofXandYare