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


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

Bug in Mathematica 7.0.1 multiple integration?

From Scott Hemphill <hemphill@hemphills.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Bug in Mathematica 7.0.1 multiple integration?
Date 2011-02-09 07:09 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <iitek5$jij$1@smc.vnet.net> (permalink)

Show all headers | View raw


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

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web