Im trying to compute double sums of (anti)symmetric expressions like
$\sum_{i<j=1}^n (a_i \pm a_j)^2$
For the antisymmetric case I believe that the result should be something like
$\sum_{i<j=1}^n (a_i - a_j)^2 = \frac{1}{2} \sum_{i=1}^n \sum_{j=1}^n (a_i - a_j)^2$ And this seems to work.
Nevertheless for the symmetric case this doesn't work. I've tried to do something like:
$\sum_{i<j=1}^n (a_i + a_j)^2 = \sum_{i=1}^n \sum_{j=i+1}^n (a_i + a_j)^2 + \sum_{i=1}^n \sum_{j=1}^n (a_i + a_j)^2 -\sum_{i=1}^n \sum_{j=1}^n (a_i + a_j)^2 = \sum_{i=1}^n \sum_{j=1} (a_i + a_j)^2 - \sum_{i=1}^n \sum_{j=1}^n (a_i + a_j)^2$
but this last term is disturbing me...
Whats the best way to attack such double sums expressions?
In general, with OP's notation:
$$\sum_{i=1}^n \sum_{j=1}^n f(a_i,a_j)=\sum_{i<j=1}^n f(a_i,a_j)+\sum_{i=1}^n f(a_i,a_i)+\sum_{i>j=1}^n f(a_i,a_j) \tag{1}$$
In this case $\,f(a_i,a_j)=(a_i-a_j)^2\,$, therefore $\,f(a_i,a_j)=f(a_j,a_i)\,$ and $\,f(a_i,a_i)=0\,$, so the above follows directly from $(1)\,$.
In this case $\,f(a_i,a_j)=(a_i+a_j)^2\,$, therefore $\,f(a_i,a_j)=f(a_j,a_i)\,$ and $\,f(a_i,a_i)=4a_i^2\,$, so:
$$\sum_{i=1}^n \sum_{j=1}^n (a_i+a_j)^2 = 2 \sum_{i<j=1}^n (a_i+a_j)^2 + 4 \sum_{i=1}^n a_i^2 \\ \quad \iff \quad \sum_{i<j=1}^n (a_i+a_j)^2 = \frac{1}{2} \sum_{i=1}^n \sum_{j=1}^n (a_i+a_j)^2 - 2 \sum_{i=1}^n a_i^2$$