# N dimensional Numeric integral

I am trying to evaluate a N dimensional integral in MATLAB, is has a special form as following, does the special form helps me to evaluate my integral faster? simpler?

$$\int_{-\infty}^{\infty}... \int_{-\infty}^{\infty} g(\boldsymbol{x}) F(\boldsymbol{x}) d\boldsymbol{x} = \int_{-\infty}^{\infty}... \int_{-\infty}^{\infty} g(||x||^2,\sum_{i=1}^N x_i) f(x_1)...f(x_n) dx_1 ...dx_N$$

where $\boldsymbol{x}=[x_1,x_2,...x_N]^T$, and $||.||^2$ is norm of the vector.

• Have you looked into whether the Jacobian of the function $f(x)=(\| x \|^2,\sum_{i=1}^N x_i,x_3,x_4,\dots,x_N)$ is too complicated to be practically useful? – Ian Nov 23 '16 at 22:46
• @lan very very complicated – Alireza Nov 23 '16 at 22:51
• Is it really though? It's the determinant of a matrix where the first row is $a_{ij}=2x_j$, the second row is $a_{ij}$ all equal to $1$, and the other rows are just diagonal with a diagonal entry of $1$. Is it that hard to get the determinant of such a matrix? It seems to me that you could just cofactor expand across the last row a bunch of times... – Ian Nov 24 '16 at 0:56
• @lan unfortunately I don't get your point. You are not considering function $g(.)$ which is a function of $||x||^2$ and $\sum x_i$ . And I don't get your definition of $f(.)$ ! – Alireza Nov 24 '16 at 21:37
• My preliminary suggestion was to replace two of your variables, one with the sum of the squares and the other with the sum. Then g would only depend on two of your variables, and the rest of the integration would (hopefully) simplify through not depending on those two variables. But I missed that your domain of integration after this substitution would be complicated. So it was a bad idea. – Ian Nov 24 '16 at 21:52

Maybe try writing as a Fourier integral: $$g(||x||^2,\sum x)=\int dp dq G(p,q)e^{ip||x||^2+iq\sum x}$$ then $$g(||x||^2,\sum x)f(x_1)\cdots f(x_n)=\int dp dqG(p,q)\prod_j e^{ip x_j^2+iq x_j}f(x_j)$$ so that if you can evaluate numerically or otherwise $$F(p,q)=\int dx e^{ip x^2+iq x}f(x)$$ you can write the total integral as
$$\int dp dqG(p,q)F(p,q)^N$$