Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #15236

Possible bug in 2D Integration over a Region

From Peter Fischer <peter.fischer@ziti.uni-heidelberg.de>
Newsgroups comp.soft-sys.math.mathematica
Subject Possible bug in 2D Integration over a Region
Date 2013-07-23 21:13 +0000
Message-ID <ksmrmc$4o$1@smc.vnet.net> (permalink)
Organization Time-Warner Telecom

Show all headers | View raw


Hi,

I may have identified a bug in Mathematica 8 when doing a
2D integral over a triangular region. Note that I am not an
experienced user, so my approach / syntax may be unprofessional.. 

- I first define a boolean expression describing a triangle in the xy-plane
  (with varying basewidth 2w). The 3 conditions define the three sides.
  (This expression is more complicated than it has to be, because of 
  my original problem geometry.)

TriangleCondition[w_] = 
  4 w + 3 y - 6 w y >= 6 x && 4 w + 6 x + 3 y >= 6 w y && 
   w (2 + 6 y) >= 3 y;

- I then convert this logical value to 1/0:

IsInAcceptance[w_] = Boole[TriangleCondition[w]];

- I want to integrate a 2D parabola in that region, so that the argument
  of the integrals will be

ARG = ({x, y}.{x, y}) * IsInAcceptance[w];

- Now I carry out the integral in 4 different ways, changing
  only the order and the way I write it down:

IntXFIRST = Integrate[
            Integrate[ARG, {x, -Infinity, Infinity}], {y, -Infinity, Infinity}]
IntYFIRST = Integrate[
            Integrate[ARG, {y, -Infinity, Infinity}], {x, -Infinity, Infinity}]
IntXY     = Integrate[ARG, {x, -Infinity, Infinity}, {y, -Infinity, Infinity}]
IntYX     = Integrate[ARG, {y, -Infinity, Infinity}, {x, -Infinity, Infinity}]

- It turs out that IntYX yields a DIFFERENT result:

IntXFIRST == IntYFIRST // Simplify   (* yields True *)
IntXFIRST == IntXY     // Simplify   (* yields True *)
IntXFIRST == IntYX     // Simplify   (* yields 2 w <= 1 !!!!!! *)

I am using Mathematica Version 8.0.4.0. I had indicated this issue 
to the Mathematica support, with basically no reaction. There was
one mail indicating there may be an issue. In Mathematica 9, the
problematic integral just does not evaluate...

What do experts think about this?

Cheers

   Peter

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Possible bug in 2D Integration over a Region Peter Fischer <peter.fischer@ziti.uni-heidelberg.de> - 2013-07-23 21:13 +0000

csiph-web