Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2013

[Date Index] [Thread Index] [Author Index]

Search the Archive

Possible bug in 2D Integration over a Region

  • To: mathgroup at smc.vnet.net
  • Subject: [mg131442] Possible bug in 2D Integration over a Region
  • From: Peter Fischer <peter.fischer at ziti.uni-heidelberg.de>
  • Date: Tue, 23 Jul 2013 17:20:06 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-outx@smc.vnet.net
  • Delivered-to: mathgroup-newsendx@smc.vnet.net

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



  • Prev by Date: anyone know of software to recover .nb files from a reformatted PC HDD?
  • Next by Date: Re: Variable transformations
  • Previous by thread: Re: anyone know of software to recover .nb files from
  • Next by thread: "Complement" to the Risch Algorithm