I was working on a problem of trying to determine synchronization of neurons and wanted to compare an analytical result to some numerical results I achieved. The analytical result depends upon evaluating this triple integral:
∫2π0∫2π0∫2π0√3+2cos(θ1−θ2)+2cos(θ2−θ3)+2cos(θ3−θ1)dθ1dθ2dθ3
The triple integral comes from trying to evaluate E[√|eiθ1+eiθ2+eiθ3|2] where the θ's are i.i.d uniform random variables on the unit circle.
Wolfram alpha wasn't able to produce a value so I question if it's even possible to evaluate, whether exactly or a decimal approximation.
Answer
It shouldn't be too hard to approximate this numerically. I did a quick Monte Carlo integration in R, taking n=108 samples:
set.seed(42)
n = 10^8
theta1 = runif(n, 0, 2*pi)
theta2 = runif(n, 0, 2*pi)
theta3 = runif(n, 0, 2*pi)
integrand = sqrt(3+2*cos(theta1-theta2)+2*cos(theta2-theta3)+2*cos(theta3-theta1))
mu = mean(integrand)
sigma = sd(integrand)
gives that the estimated mean of the integrand is μ=1.574591 and the standard deviation of the integrand is σ=0.7215917. This gives a standard error for that estimate of σ/√n=0.0000722.
Thus we get an estimated value for the integrand of
(8π3)(μ±σ√n)
since the region of integration has volume 8π3. This is 390.578±0.018.
As an analytical note, your integrand is unchanged when θ1,θ2,θ3 are rotated by the same angle around the unit circle. So you may as well set θ3=0. Let θ3=0 and you get
∫2π0∫2π0∫2π0√3+2cos(θ1−θ2)+2cosθ2+2cosθ1dθ3dθ2dθ1
and since θ3 isn't in the integrand and you're working over a rectangular region, this is
2π∫2π0∫2π0√3+2cos(θ1−θ2)+2cosθ2+2cosθ1dθ2dθ1
This probably isn't easier to do analytically but I'd think a double integral would be easier than a triple integral numerically.
No comments:
Post a Comment