# Variable dimensional integrals

I need to Integrate a function, but let the number of dimensions vary.

Integrate[Product[Exp[-( t[[i]] )^2], {i,1,4}], options]


with

t = {u,v,x,y}


and

options = {#,-Infinity,Infinity}&/@{u,v,x,y}


but the double braces on options doesn't allow this to work. I get this for options:

{{u, -Infinity, Infinity}, {v, -Infinity, Infinity}, {x, -Infinity, Infinity}, {y, -Infinity, Infinity}}

If I want a general list of variables, can these be added as variables into integrate, with the corresponding limits? I need a variable dimension, simply taken from the length of a list.

You can use Sequence to eliminate a set of brackets:

t = {u, v, x, y};
Integrate[
Product[
Exp[-( t[[i]] )^2],
{i,1,4}
],
Sequence @@ ({#,-Infinity,Infinity}&/@t)
]


π^2

However, it is simpler to use a Region specification instead:

Integrate[Exp[-p.p], p ∈ FullRegion]


π^2

• Thank you very much. Is p a vector, hence FullRegion? – apkg Jun 26 '19 at 18:20
• @AlexanderKartun-Giles Yes, p is a symbolic vector. – Carl Woll Jun 26 '19 at 18:21
• Ok I will look that up. Thank you. – apkg Jun 26 '19 at 18:22