2

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.

chris
  • 22,860
  • 5
  • 60
  • 149
user6818
  • 1,171
  • 1
  • 12
  • 27
  • ...I don't think it's reasonable to expect a 12-fold integral with some amount of complexity to execute quickly. You may want to figure out if you can simplify the beastie further (e.g. integrating "easy parts") before proceeding further. – J. M.'s missing motivation Oct 25 '12 at 16:42
  • I think there was a bug that required becalming. Is 0 the expected result? – Daniel Lichtblau Oct 25 '12 at 22:15
  • The results for Nc from 1 to 6 seem to be {8Pi, 8Pi^2, 3Pi^3, (3Pi^4)/8, (15Pi^5)/1024, (45Pi^6)/262144} so I do not think it will be 0 for 12 – Rolf Mertig Oct 26 '12 at 14:21
  • @RolfMertig I also get (15*Pi^5)/1024 using the method described below for n=5. – chris Oct 26 '12 at 20:45
  • 1
    @RolfMertig and (45Pi^6)/262144 for n=6 ;-) – chris Oct 26 '12 at 21:05
  • @chris can you get n=7? How long does it take to get to n=6? – Rolf Mertig Oct 26 '12 at 21:36
  • @chris: for n=7 my code needs 35 minutes and I get (315 Pi^7)/536870912 – Rolf Mertig Oct 26 '12 at 22:05
  • And for n=8 I get Out of Memory ... I doubt that this is solvable in Mathematica alone for Nc=12. – Rolf Mertig Oct 26 '12 at 22:26
  • @user6818 Where did this type of integral show up? How important is it to find a solution? Did you try to solve it numerically? – Rolf Mertig Oct 26 '12 at 22:27
  • @chris (..and Rolf Mertig..) thanks for all the efforts. But something seems to be going wrong here - I am expecting the value of the integral to asymptote for higher and higher values of $Nc$ - and the asymptotic value is to be some small rational number - – user6818 Oct 27 '12 at 03:24
  • @RolfMertig (and chris) May be you can look into this other question of mine (http://mathematica.stackexchange.com/questions/13721/about-finding-residues-of-multi-dimensional-complex-functions)where I have asked about a possible reformulation of the integration that I want to do. – user6818 Oct 27 '12 at 03:33

1 Answers1

1

This integral is doable using the following method:

1) Expand the integrant

2) TrigExpand the result

3) apply the following rule (to collect for a[1])

 Exp[x_] :> Exp[Collect[x, a[1]]]

4) apply (possibly in //) this rule to the terms which do not involve a[1]

 Exp[Complex[0, c_] a[1] +  b_.] -> (2*E^b*Sinh[Pi*(Complex[0, c])])/(Complex[0, c])}

(which corresponds to integrating over a[1]) and multiply terms which do not involve a[1] by 2Pi

5) iterate step 3 and 4) but for a[2]... a[12]

In short, we just tell give mathematica a rule for each brick element integration. I tried it for 1/63th of the terms involved in step 1 and it works. Interestingly this part of the integration did give me a zero contribution for terms depending on a[1].

I can't give you the full answer because my laptops gets too hot ;-) I ll run it on a workstation and let you know.

chris
  • 22,860
  • 5
  • 60
  • 149