2
$\begingroup$

Bug introduced in 8.0.0 or earlier and fixed in 8.0.4


I have the following 2D region over which I want to integrate a function:

r1  = Sqrt[mη^2 + (Sqrt[w1^2 - mπ^2] + Sqrt[w2^2 - mπ^2])^2] // Expand;
r2  = Sqrt[mη^2 + (Sqrt[w1^2 - mπ^2] - Sqrt[w2^2 - mπ^2])^2] // Expand;
mη  = 0.547;
mηp = 0.958;
mπ  = 0.137;

RegionPlot[mηp - w1 - w2 < Re[r1] && mηp - w1 - w2 > Re[r2], 
   {w1, .1, .25}, {w2, .1, .25}, BoundaryStyle -> Blue, FrameLabel -> {"w1", "w2"}]

Mathematica graphics

Now I want to integrate the following function over this region:

function[w1_, w2_]=Abs[1.05133+ (6.16152 (0.656093- 1.916 w1 - 1.916 w2)
    (0.958- 1. w1 - 1. w2))/(0.921055- 1.916 w1 - 1.916 w2) - 
    (10.1147 (0.656093- 1.916 w1 - 1.916 w2) (0.958- 1. w1 - 1. w2))/
    (1.57895- 1.916 w1 - 1.916 w2) - 55.0594 (-((0.479 w1 (-0.618555 + 1.916 w1))/
    (0.0307393+ 1.916 w1)) - ( 0.479 w2 (-0.618555 + 1.916 w2))/(0.0307393+ 1.916 w2))]^2

When I plot the function it doesn't have any singularity:

Plot3D[function[w1,w2],{w1, 0.137, 0.2445}, {w2, 0.137, 0.2445}, BoxRatios -> {1, 1, 4},
   RegionFunction -> Function[{w1, w2, z}, mηp - w1 - w2 < Re[r1] && mηp - w1 - w2 > Re[r2]]]

Mathematica graphics

But when I use the following command:

NIntegrate[function[w1,w2] Boole[Re[r2]< mηp - w1 - w2 <  
   Re[r1]], {w1, 0.137, 0.2445}, {w2, 0.137, 0.2445}]

Mathematica says it has a singularity. Why?

$\endgroup$
19
  • 2
    $\begingroup$ Mma is not saying it has a singularity: Numerical integration converging too slowly; suspect one of the \ following: singularity, value of the integration is 0, highly \ oscillatory integrand, or WorkingPrecision too small $\endgroup$ Commented Sep 6, 2012 at 13:29
  • $\begingroup$ what should I do to solve this problem? Because I know this integral should have an answer about 0.0000872 $\endgroup$
    – Kheeyal
    Commented Sep 6, 2012 at 13:34
  • 4
    $\begingroup$ I'm voting to close this question as off-topic because it seems the OP's problem was caused by a bug in V8.0.0 that was fixed by V8.0.4. $\endgroup$
    – m_goldberg
    Commented Sep 30, 2015 at 2:10
  • 2
    $\begingroup$ @m_goldberg we don't usually close questions caused by Mathematica bugs. When confirmed they get the bugs tag and a header indicating introduction and fix versions. $\endgroup$ Commented Sep 30, 2015 at 6:39
  • 2
    $\begingroup$ I voting to reopen this question because as Sjoerd has pointed out it should be marked as a bug report and then get a confirming answer. I will write one as a CW answer. $\endgroup$
    – m_goldberg
    Commented Sep 30, 2015 at 13:14

1 Answer 1

4
$\begingroup$

The comments show that this is a bug in V8.0.0. b.gatessucks and Fred Kline confirm was fixed in V8.0.4.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.