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

MathGroup Archive 2011

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

Search the Archive

Bug in Mathematica 7.0.1 multiple integration?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg116268] Bug in Mathematica 7.0.1 multiple integration?
  • From: Scott Hemphill <hemphill at hemphills.net>
  • Date: Wed, 9 Feb 2011 02:10:03 -0500 (EST)
  • Reply-to: hemphill at alumni.caltech.edu

I just observed this in a naive method for calculating the volume of a
hypersphere.  It works for n = 1..4, but fails for n greater than 4:

Mathematica 7.0 for Linux x86 (64-bit)
Copyright 1988-2009 Wolfram Research, Inc.

In[1]:= n=5

Out[1]= 5

In[2]:= vars = Table[Symbol["x"<>ToString[k]],{k,n}] 

Out[2]= {x1, x2, x3, x4, x5}

In[3]:= lims = Sqrt[Table[1-Take[vars,k-1].Take[vars,k-1],{k,n}]] 

                       2              2     2              2     2     2
Out[3]= {1, Sqrt[1 - x1 ], Sqrt[1 - x1  - x2 ], Sqrt[1 - x1  - x2  - x3 ], 
 
                2     2     2     2
>    Sqrt[1 - x1  - x2  - x3  - x4 ]}

In[4]:= args = Table[{vars[[k]],-lims[[k]],lims[[k]]},{k,n}] 

                                       2              2
Out[4]= {{x1, -1, 1}, {x2, -Sqrt[1 - x1 ], Sqrt[1 - x1 ]}, 
 
                      2     2              2     2
>    {x3, -Sqrt[1 - x1  - x2 ], Sqrt[1 - x1  - x2 ]}, 
 
                      2     2     2              2     2     2
>    {x4, -Sqrt[1 - x1  - x2  - x3 ], Sqrt[1 - x1  - x2  - x3 ]}, 
 
                      2     2     2     2              2     2     2     2
>    {x5, -Sqrt[1 - x1  - x2  - x3  - x4 ], Sqrt[1 - x1  - x2  - x3  - x4 ]}}

In[5]:= Integrate @@ Prepend[args,1]

Out[5]= 0

Scott
-- 
Scott Hemphill	hemphill at alumni.caltech.edu
"This isn't flying.  This is falling, with style."  -- Buzz Lightyear


  • Prev by Date: Re: Generated parameters
  • Next by Date: Re: Generated parameters
  • Previous by thread: Re: Polygon projection in CountryData incorrect?
  • Next by thread: Re: Bug in Mathematica 7.0.1 multiple integration?