Groups | Search | Server Info | Login | Register


Groups > comp.soft-sys.math.maple > #164

Re: Integration over a complicated region in Maple?

From "G. A. Edgar" <edgar@math.ohio-state.edu.invalid>
Newsgroups comp.soft-sys.math.maple
Subject Re: Integration over a complicated region in Maple?
Date 2011-05-23 10:21 -0600
Organization Ohio State Univ
Message-ID <230520111021525632%edgar@math.ohio-state.edu.invalid> (permalink)
References <7d724e7e-0494-4dec-a75d-66a736c02c3f@k15g2000pri.googlegroups.com> <irc0ju$3pk$1@online.de>

Show all headers | View raw


In article <irc0ju$3pk$1@online.de>, Peter Pein <petsie@dordos.net>
wrote:

> Am 22.05.2011 21:01, schrieb Ray Vickson:
> > In a recent positing in "sci.math" the following Mathematica command
> > was given as the solution to a problem:
> > Timing[12 Integrate[If[x1 > x2 && y1 > y2 && y2 > y3 &&
> >   x2 + y2 < x3 + y3 && x3 + y3 < x1 + y1 && x3 > x1, 8, 0],
> >     {x1, 0, 1}, {y1, 0, 1 - x1}, {x2, 0, 1}, {y2, 0, 1 - x2},
> >     {x3, 0, 1}, {y3, 0, 1 - x3}]]
> > 
> > {77.766, 1/5}
> > 
> > So, the integration is that of the characteristic function of the set
> > {(x1,y1,x2,y2,x3,y3): x1 > x2, y1 > y2, y2 > y3, x2 + y2 < x3 + y3, x3
> > + y3 < x1 + y1, x3 > x1}, and Mathematical got the answer as 1/5.
> > 
> > Can this also be done in Maple? So far, I have not managed to do it.
> > 
> > (For the origin of the problem, see the "sci.math" thread with the
> > delightful title "Non-transitive vampire breakfast cereal
> > probabilities".)
> > 
> > RGV
> obviously Maple fails:

Yes, Maple thinks it means the outer integral is y3 from 0 to 1-x3,
whereas x3 has already been integrated away by that point...

Working by hand, I think that 1/5 is too large for this answer, however.

> eval(convert("12 Integrate[If[x1 > x2 && y1 > y2 && y2 > y3 &&
> >   x2 + y2 < x3 + y3 && x3 + y3 < x1 + y1 && x3 > x1, 8, 0],
> >     {x1, 0, 1}, {y1, 0, 1 - x1}, {x2, 0, 1}, {y2, 0, 1 - x2},
> >     {x3, 0, 1}, {y3, 0, 1 - x3}]",FromMma));
> gives an unevaluated nested integral, while Mma gives on my machine:
> 
> In[1]:= Timing[12
>
> Integrate[If[x1>x2&&y1>y2&&y2>y3&&x2+y2<x3+y3&&x3+y3<x1+y1&&x3>x1,8,0],{x1,0,1}
> ,{y1,0,1-x1},{x2,0,1},{y2,0,1-x2},{x3,0,1},{y3,0,1-x3}]]
> Out[1]= {79.217,1/5}

-- 
G. A. Edgar                              http://www.math.ohio-state.edu/~edgar/

Back to comp.soft-sys.math.maple | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Integration over a complicated region in Maple? Ray Vickson <RGVickson@shaw.ca> - 2011-05-22 12:01 -0700
  Re: Integration over a complicated region in Maple? Peter Pein <petsie@dordos.net> - 2011-05-22 23:53 +0200
    Re: Integration over a complicated region in Maple? "G. A. Edgar" <edgar@math.ohio-state.edu.invalid> - 2011-05-23 10:21 -0600
      Re: Integration over a complicated region in Maple? "G. A. Edgar" <edgar@math.ohio-state.edu.invalid> - 2011-05-23 11:38 -0600

csiph-web