I want to be able to do high dimensional integrals like,
(..naively I wrote it as this..)
Nc = 12; Nn = 12;
f [x_] := (Sin[x])^2;
g[n_, x_] := Cos[n*(x)];
Integrate[ (Times @@
Flatten@Table[
f[(a[i] - a[j])/2], {i, 1, Nc - 1}, {j, i + 1, Nc}])*
SeriesCoefficient [
Series [
Exp[ Plus @@
Flatten@Table [ ((4)/(n (x^(-n/2) + x^(n/2))))*(Plus @@
Flatten@
Table[g[n, a[i] - a[j]], {i, 1, Nc}, {j, 1, Nc}]), {n, 1,
Nn}] ], {x, 0, 1}], 1/2], {a[1], -\[Pi], \[Pi]} , {a[
2], -\[Pi], \[Pi]} , {a[3], -\[Pi], \[Pi]} , {a[
4], -\[Pi], \[Pi]}, {a[5], -\[Pi], \[Pi]}, {a[
6], -\[Pi], \[Pi]}, {a[7], -\[Pi], \[Pi]}, {a[
8], -\[Pi], \[Pi]}, {a[9], -\[Pi], \[Pi]} , {a[
10], -\[Pi], \[Pi]}, {a[11], -\[Pi], \[Pi]}, {a[12], -\[Pi], \[Pi]}]
But the above has been like running for ages without an output.
I would like to know how I can optimize this work so that I can push this to higher levels. For instance I would like to extract higher powers of $x$ rather than $1/2$ as in the above example and also to more variables than $12$ as above.
(15*Pi^5)/1024using the method described below for n=5. – chris Oct 26 '12 at 20:45