Re: issues with integrating Boole
- To: mathgroup at smc.vnet.net
- Subject: [mg61887] Re: issues with integrating Boole
- From: "antononcube" <antononcube at gmail.com>
- Date: Thu, 3 Nov 2005 04:59:00 -0500 (EST)
- References: <dka05c$6us$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
A note on why QuasiMonteCarlo fails to evaluate the bool2 integral. When Method option is given the value MonteCarlo or QuasiMonteCarlo, then the symbolic preprocessing is skipped. So the integration will be in the region over the entire region {a, -2, 2}, {b, -1, 1}, which is symmetric over 0 along both axises. The ordinate of the first point in the low discrepancy (Hammersley) sequence used in QuasiMonteCarlo is 0. The integration stops since b is in the denominator in boole2. (NIntegrate should give a message, but it doesn't in this case). We can do two things: 1. Perturb the integration boundaries In[40]:= NIntegrate[boole2, {a, -2, 2}, {b, -1.000001, 1}, Method -> QuasiMonteCarlo] Out[40]= 3.99961 2. Use QuasiMonteCarlo together with the method SymbolicPiecewiseSubdivision (which gives wrong result in this case) In[33]:= NIntegrate[boole2, {a, -2, 2}, {b, -1, 1}, Method -> {SymbolicPiecewiseSubdivision, Method -> QuasiMonteCarlo}] Out[33]= 1.33333 If Method->MultiDimensional is used, the sampling point {0,0} of the multidimensional rule makes the integration stop as with Method->QuasiMonteCarlo (this time a message is given though): In[78]:= NIntegrate[boole2, {a, -2, 2}, {b, -1, 1}, Method -> MultiDimensional] NIntegrate::inum: 2 -a + Sqrt[a + 4 b] Abs[-------------------] b Abs[<<1>>] Integrand Boole[------------------------ > 1 && ---------- > 1] 2 2 is not numerical at {a, b} = {0., 0.}. Out[78]= NIntegrate[boole2,{a,-2,2},{b,-1,1},Method->MultiDimensional] If Method->MultiDimensional is used with perturbed boundaries we get an answer close to 4 for bool2: In[63]:= NIntegrate[boole2, {a, -2, 2}, {b, -1.000001, 1}, Method -> MultiDimensional] NIntegrate::slwcon:Numerical integration converging too slowly; suspect one of the following: singularity, value of the integration being 0, oscillatory integrand, or insufficient WorkingPrecision. If your integrand is oscillatory try using the option Method->Oscillatory in NIntegrate. NIntegrate::ncvb: NIntegrate failed to converge to prescribed accuracy after 13 recursive bisections in a near {a, b} = {0.048584, 0.951501}. Out[63]=4.