Here's a Gaussian integral
NIntegrate[E^-(x^2 + y^2) E^(Sqrt[3] x y), {x,y} ∈ FullRegion[2]]
which evaluates to 2π // N. This is fine for a 2D integral, but to extend this to higher dimensions, it would be more convenient to write it as
NIntegrate[E^-r.r E^(Sqrt[3] Most[r].Rest[r]), r ∈ FullRegion[2]]
This evaluates to the correct answer, but gives errors saying that Most and Rest have been applied to the atomic expression r. This is presumably happening because NIntegrate tries to evaluate its first argument before substituting in values for r.
What's the most sensible way to avoid these error messages? (I would rather not just silence them, in case it leads to unanticipated problems with a more complicated example.)
(The same is true with Integrate instead, but I suspect there will be different solutions for the two cases, and I'm more interested in NIntegrate.)
(x[i]-x[i+1])^2.) I just choseSqrt[3]to make the integral give a nice result, but it was obviously a bad choice, as your answer shows. – Stephen Powell Aug 19 '16 at 09:59