# Integrating over a region without singularity gives an error indicating the function has singularity in that region

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"}]


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]]]


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?

• 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 – Dr. belisarius Sep 6 '12 at 13:29
• what should I do to solve this problem? Because I know this integral should have an answer about 0.0000872 – Soodeh Z. Sep 6 '12 at 13:34
• 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. – m_goldberg Sep 30 '15 at 2:10
• @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. – Sjoerd C. de Vries Sep 30 '15 at 6:39
• 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. – m_goldberg Sep 30 '15 at 13:14