Re: RE: RE: RE: Re: How to integrate over a constrained domain
- To: mathgroup at smc.vnet.net
- Subject: [mg34302] Re: [mg34278] RE: [mg34258] RE: [mg34246] RE: [mg34217] Re: [mg34203] How to integrate over a constrained domain
- From: Andrzej Kozlowski <andrzej at platon.c.u-tokyo.ac.jp>
- Date: Tue, 14 May 2002 04:10:44 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
On Monday, May 13, 2002, at 06:54 PM, DrBob wrote: >>> Boole --- another undocumented feature. Sigh... > > That's all I said originally, and I stand by it. Boole is undocumented. > > I don't mean to quibble over trivialities, but if I sigh, and mention > that something isn't documented, why quibble with me in return? > > It doesn't seem too much to ask to put ALL standard package functions in > the Master Index. I don't think there's a defensible reason for > excluding ANY of them, and including them all seems easier than deciding > WHICH ones to include. > >>> there is also a lot more to Boole than turning True/False into 1/0 ! > > No, it does just that, and nothing else. (According to the > documentation you've pointed out, and everything Mathematica tells me.) > If there's more to it, how can we tell? > > Bobby Very easy. Just open the package and have a look! That's just what I did. > > -----Original Message----- > From: Andrzej Kozlowski [mailto:andrzej at platon.c.u-tokyo.ac.jp] To: mathgroup at smc.vnet.net > Subject: [mg34302] [mg34278] Re: [mg34258] RE: [mg34246] RE: [mg34217] Re: > [mg34203] How to > integrate over a constrained domain > > In the case of Mathematica it's quite hard for functions to get into the > > Kernel, and even many of those that make it end up in Developer, > Experimental or even Internal contexts. Those included in Standard > Packages are considered either not of sufficiently universal interest or > > just not good enough to qualify. Some of them are not programmed by > people at Wolfram and some don't even work properly! > Also, there is also a lot more to Boole than turning True/False into > 1/0 ! It is quite trivial to define a function that would do that > without needing to load the add on package Calculus`Integration` but it > will do nothing useful for you. This function needs the rest of the > package to work. And the main tool of this package package is the > function GenericCylindricalDecomposition (which I used in my answer to > the same problem, having forgotten all about Boole). It is this function > > that does all the hard work, but it itself has so far made it only into > the Experimental context, so one could hardly expect a function that > depends on it to do better. > Andrzej Kozlowski Toyama International University JAPAN http://platon.c.u-tokyo.ac.jp/andrzej/ > > > On Sunday, May 12, 2002, at 04:26 PM, DrBob wrote: > >>>> It's NOT undocumented -- in the Help Browser, go to Add-ons, > Standard >> Packages, Calculus, Integration. >> >> OK, but there's no particular reason for a function that turns >> True/False into 1/0 to be (a) part of an add-on, (b) related to >> Calculus, or (c) involved specifically in Integration. Why would I > look >> for it there? >> >> That's what I call "undocumented"... you can find it only if you've >> ALREADY found it... and didn't forget where. >> >> It should be mentioned in the documentation of True, False, TrueQ, If, >> etc. It's also conceptually related to UnitStep, DiracDelta, etc. >> >> And yes, definitely, it should be in the Master Index! >> >> Bobby >> >> -----Original Message----- >> From: Murray Eisenberg [mailto:murraye at attbi.com] To: mathgroup at smc.vnet.net >> Subject: [mg34302] [mg34278] [mg34258] Re: [mg34246] RE: [mg34217] Re: [mg34203] >> How to >> integrate over >> a constrained domain >> >> It's NOT undocumented -- in the Help Browser, go to Add-ons, Standard >> Packages, Calculus, Integration. >> >> However, it IS missing from the Master Index! >> >> DrBob wrote: >>> >>> Boole --- another undocumented feature. Sigh... >>> >>> Bobby >>> >>> -----Original Message----- >>> From: BobHanlon at aol.com [mailto:BobHanlon at aol.com] To: mathgroup at smc.vnet.net >>> Subject: [mg34302] [mg34278] [mg34258] [mg34246] [mg34217] Re: [mg34203] How to >>> integrate > >>> over a >> constrained >>> domain >>> >>> In a message dated 5/9/02 6:42:13 AM, maciej at maciejsobczak.com > writes: >>> >>>> Let's say I have a set on a (x,y) plane given by: >>>> >>>> x^2 + y^2 < r^2 >>>> >>>> and I want to compute its area. >>>> Yes, I know its Pi*r^2, but I want Mathematica tell me. >>>> >>>> As a generalization, I want to integrate over a domain given by one >> or >>>> more >>>> inequalities. >>>> The problem above can be solved like this: >>>> >>>> Integrate[1, {x, -r, r}, {y, -Sqrt[r^2-x^2], Sqrt[r^2-x^2]}] >>>> Simplify[%, {r>0}] >>>> >>>> which gives >>>> >>>> Pi r^2 >>>> >>>> That's nice, but requires solving the inequality for y, which is not >>> always >>>> viable. >>>> >>>> It would be nice to have syntax like: >>>> >>>> Integrate[1, {x, y}, {x^2 + y^2 < r^2}] >>>> >>>> but it does not work (of course). >>>> >>>> How can I achieve what I want? >>> >>> For specific numeric values it is easy >>> >>> Needs["Calculus`Integration`"]; >>> >>> Table[{r, >>> >>> Integrate[Boole[ x^2+y^2<r^2] , >>> >>> {x,-r,r}, {y,-r,r}]}, >>> >>> {r,0,5}] >>> >>> {{0, 0}, {1, Pi}, {2, 4*Pi}, {3, 9*Pi}, {4, 16*Pi}, >>> >>> {5, 25*Pi}} >>> >>> Bob Hanlon >>> Chantilly, VA USA >> >> -- >> Murray Eisenberg murray at math.umass.edu >> Mathematics & Statistics Dept. >> Lederle Graduate Research Tower phone 413 549-1020 (H) >> University of Massachusetts 413 545-2859 (W) >> 710 North Pleasant Street >> Amherst, MA 01375 >> >> >> >> >> >> > > > >