Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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?

share|improve this question
2  
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 –  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 don't know am I right or not but it seems that over this region the shape of the function is common(It doesn't have singularity, It is not highly osccillating or...), then what is the problem? With Boole does it calculate the function in the region only? Because I know out of this region function has singularity. –  Soodeh Z. Sep 6 '12 at 13:45
    
@soodeh What's the point of defining function = Abs[...]^2 ? Why not function = (...)^2 ? –  b.gatessucks Sep 6 '12 at 13:45
    
@b.gatessucks You are right. I can omit it. –  Soodeh Z. Sep 6 '12 at 13:46
show 7 more comments

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.