EDIT:
I need to evaluate a very complicated multi-dimensional Integral. The dimension of the Integral depends on a variable j. Let's make my point clear with the following example:
Clear["Global`*"];
j = 1;
b = 5;
xvars = Table[Symbol["x" <> ToString[i]], {i, 1, j + 1}];
xrange = Table[{xvars[[i]], 0, b}, {i, 1, j + 1}];
yvars = Table[Symbol["y" <> ToString[i]], {i, 1, j}];
yrange = Table[{yvars[[i]], -1, 1}, {i, 1, j}];
kvars = Table[Symbol["k" <> ToString[i]], {i, 1, j + 1}];
krange = Table[{kvars[[i]], 0, 1}, {i, 1, j + 1}];
f := 9.706509465469745` E^(-1.3507509720280906` k1^2 -
0.6753754860140453` k2^2 - 0.05555555555555558` x1 - y1^2/2)
Sin[1.7289432000093294` k2] Sin[7.748120838924868` k1 x1] Sin[
7.748120838924868` k2 x2] Sin[
7.748120838924868` k1 (x2 + (0.` + 0.15` I) y1)]
expression0 = Sum[f, Evaluate[Sequence @@ krange]]
expression1 = Integrate[expression0, Sequence @@ xrange]
Integrate[expression1, Sequence @@ yrange]
This integral is evaluated rather fast but my function f get's more and more complicated as the index j grows.
So do you have any tipps to speed up the calculation of the Integral, or which method should I use. Im not that familiar with numerical integration rules, especially multidimensional.
I used in the example Integrate which I think is not as fast as NIntegrate but I can't make NIntegrate work. How can I use NIntegratein this example?
And which method would you recommend? Any tipps greatly appreciated.
Method->"AdaptiveMonteCarlo"? – Xerxes Feb 6 at 21:19