This is not a new problem but I would like to understand why Mathematica gives the result that it does. (Volume of a hypersphere)
In[4]:= Integrate[
Boole[x1^2 + x2^2 + x3^2 + x4^2 + x5^2 + x6^2 < r^2], {x1, -Infinity,
Infinity}, {x2, -Infinity, Infinity}, {x3, -Infinity,
Infinity}, {x4, -Infinity, Infinity}, {x5, -Infinity,
Infinity}, {x6, -Infinity, Infinity}, Assumptions -> {r > 0}]
Out[4]= -(1/6) \[Pi]^3 r^6
A negative answer is obviously incorrect. Replace r^2 by 4
In[3]:= Integrate[
Boole[x1^2 + x2^2 + x3^2 + x4^2 + x5^2 + x6^2 < 4], {x1, -Infinity,
Infinity}, {x2, -Infinity, Infinity}, {x3, -Infinity,
Infinity}, {x4, -Infinity, Infinity}, {x5, -Infinity,
Infinity}, {x6, -Infinity, Infinity}, Assumptions -> {r > 0}]
Out[3]= (32 \[Pi]^3)/3
This is correct.
If we reduce the number of variables, then we obtain a correct answer:
In[5]:= Integrate[
Boole[(x1^2 + x2^2 + x3^2 + x4^2 ) < r^2], {x1, -Infinity,
Infinity}, {x2, -Infinity, Infinity}, {x3, -Infinity,
Infinity}, {x4, -Infinity, Infinity}, Assumptions -> {r > 0}]
Out[5]= (\[Pi]^2 r^4)/2
SetSystemOptions["SimplificationOptions"->{"AssumptionsMaxNonlinearVariables"->7}];
$\endgroup$ – Daniel Lichtblau Apr 26 '13 at 18:48