MathGroup Archive 2005

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

Search the Archive

Re: Integrate and Boole problems

  • To: mathgroup at smc.vnet.net
  • Subject: [mg58405] Re: Integrate and Boole problems
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Fri, 1 Jul 2005 02:01:57 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, England
  • References: <da0bq0$fm8$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Chris wrote:
> I'm using Mathematica 5.1 and I'm getting some inconsistent results
> when integrating the Boole function. For example:
> 
> Integrate[Boole[((x - 1)^2 + y^2 + z^2 - 3^2)*((x + 1)^2 + y^2 + z^2 -
> 3^2) = 0], {x, -Infinity, Infinity}, {y, -Infinity, Infinity}, {z,
> -Infinity, Infinity}];
> 
> 
> N[%]
> 
> 50.2654821239234 + 3.829918318813164*^-9*I
> 
> 
> NIntegrate[Boole[((x - 1)^2 + y^2 + z^2 - 3^2)*((x + 1)^2 + y^2 + z^2
> -3^2) = 0], {x, -Infinity, Infinity}, {y, -Infinity, Infinity}, {z,
> -Infinity, Infinity}]
> 
> 108.90854533339399 - 2.749275252793041*^-29*I
> 
> Am I doing something wrong or is this just a limit of the Integrate
> function?
> 
Hi Chris,

I am confused by -- or just do not understand -- what you attempt to do 
since the *Boole* function only returns 0 or 1 depending whether the 
expression given to *Boole* is true.

Furthermore, your expression does not work at all as entered: you must 
use a double = (==) to test equality (a single = is the assignment 
operator).

In[1]:=
Integrate[Boole[((x - 1)^2 + y^2 + z^2 - 3^2)*
      ((x + 1)^2 + y^2 + z^2 - 3^2) = 0],
   {x, -Infinity, Infinity}, {y, -Infinity, Infinity},
   {z, -Infinity, Infinity}]

\!\(Set::"write" \(\(:\)\(\ \)\)
     "Tag Times in \!\(\((\(-9\) + \((\(-1\) + x)\)\^2 + y\^2 + z\^2)\) 
\\\\ \
\((\(-9\) + \((1 + x)\)\^2 + y\^2 + z\^2)\)\) is Protected."\)

Integrate::idiv: Integral of Boole[0] does not converge on {-â??, â??}.

Out[1]=
Integrate[Boole[0], {x, -Infinity, Infinity},
   {y, -Infinity, Infinity}, {z, -Infinity, Infinity}]

In[2]:=
Integrate[Boole[((x - 1)^2 + y^2 + z^2 - 3^2)*
      ((x + 1)^2 + y^2 + z^2 - 3^2) == 0],
   {x, -Infinity, Infinity}, {y, -Infinity, Infinity},
   {z, -Infinity, Infinity}]

Out[2]=
0

In[3]:=
NIntegrate[Boole[((x - 1)^2 + y^2 + z^2 - 3^2)*
      ((x + 1)^2 + y^2 + z^2 - 3^2) == 0],
   {x, -Infinity, Infinity}, {y, -Infinity, Infinity},
   {z, -Infinity, Infinity}]

Out[3]=
0

(Tested on a Pentium IV 2.6GHz 512Mo Physical Ram, Windows XP SP2,
Mathematica 5.1.)

Best regards,
/J.M.

P.S. You should use the _InputForm_ when copying an expression from a 
Mathematica notebook to your email client: in Mathematica, select the 
cell(s) you want to include in your email, then within the *Cell* menu 
select either *Convert To* or *Display As* and choose *InputForm*. 
Finally, copy and paste as usual into your email.


  • Prev by Date: Re: Sudoku puzzle
  • Next by Date: Re: Periodic function Roots
  • Previous by thread: Re: Sudoku puzzle
  • Next by thread: Re: Integrate and Boole problems