(6 points) Plain Monte Carlo integration
∫0π dx/π ∫0π dy/π ∫0π dz/π [1-cos(x)cos(y)cos(z)]-1 = Γ(1/4)4/(4π3) ≈ 1.3932039296856768591842462603255
(3 points)
(1 point)
If N<nmin return N-point plain Monte Carlo estimate of integral and variance; Sample nmin points and estimate the integral and the variance; Find the dimension with largest sub-variance; Subdivide the volume along this dimension; Divide the remaning points between the two sub-volumes (proportional to sub-variances); Dispatch two recursive calls on the sub-volumes; Estimate the grand integral and grand error; Return the grand integral and the grand error;