Consider the example
NIntegrate[UnitStep[9-x^2-y^2],{x,0,xmax},{y,0,ymax},Method->"QuasiMonteCarlo"]
If xmax = ymax = 3
, the answer is meaningful. If xmax = ymax = 100
, the answer is slightly smaller, while for xmax = ymax = 1000
, the answer is zero. This means that QuasiMonteCarlo method evaluates the integral to zero if in most part of the integration domain the integrand is zero.
Could you please tell me whether there is some way to fix this problem?
Answer
xmax = ymax = 1000;
NIntegrate[UnitStep[9 - x^2 - y^2], {x, 0, xmax}, {y, 0, ymax},
Method -> {"QuasiMonteCarlo", "SymbolicProcessing" -> True}]
7.06875
Comments
Post a Comment