Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #15899 > unrolled thread

Bug in Mathematica 7.0.1 multiple integration?

Started byScott Hemphill <hemphill@hemphills.net>
First post2011-02-09 07:09 +0000
Last post2011-02-09 07:09 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Bug in Mathematica 7.0.1 multiple integration? Scott Hemphill <hemphill@hemphills.net> - 2011-02-09 07:09 +0000

#15899 — Bug in Mathematica 7.0.1 multiple integration?

FromScott Hemphill <hemphill@hemphills.net>
Date2011-02-09 07:09 +0000
SubjectBug in Mathematica 7.0.1 multiple integration?
Message-ID<iitek5$jij$1@smc.vnet.net>
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@alumni.caltech.edu
"This isn't flying.  This is falling, with style."  -- Buzz Lightyear

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web