I have the following summation
L=24;
sind=Range[-Pi,Pi,2*Pi/L];
Sum[f, {x, sind}, {y, sind}, {x1, sind}, {y1, sind}, {x2, sind}, {y2, sind}]
where f
has been evaluated at a previous step and is a function of x,y,x1,x2,y1,y2
.
However f
contains symbols, e.g f= Cos[x]*Sin[y]*Sin[x+x1]*Cos[y+y1]*a[x,y]+g[x,y]*Cos[x2-y2]*Sin[x+x1+x2,y+y1+y2]
where a, g
are symbols that don’t take explicit real values.
Is there a way to speed up such sums? They are very slow…