Explanation on a double summation Hello: I was wondering if someone will help me understand what's going on in this summation. I don't think the terms are really important. I'm looking for an explanation why the left hand side is equal to the right hand side.
$$
\sum_{i,j=1}^N a_ib_j~P(k_{1,i} +\alpha k_{1,j}, \cdots, k_{M,i}+\alpha k_{M,j})e^{x_i+x_j} \\= \sum_{i=1}a_i^2 \left[ P(k_{1,i} + \alpha k_{1,i}, \cdots ,k_{M,i}+\alpha k_{M,i})\right]e^{2x_i}\\
+\sum_{1\leq i \lt j \leq N} a_ib_j\left[P(k_{1,i} + \alpha k_{1,j}, \cdots ,k_{M,i}+\alpha k_{M,j}) + P(k_{1,j} + \alpha k_{1,i}, \cdots ,k_{M,j}+\alpha k_{M,i})\right]e^{x_i+x_j}
$$

I think you should have $b_j$ in the first line, and you seem to need that $a_i=\pm b_i$ for all $i$.
Write the $(i,j)$-th term in the sum as $c_{ij}$. Then you get two cases; either $i=j$, which is where the first sum on the right hand side comes from (it's $\sum_ic_{ii}$), or $i\ne j$. The terms in this second case are $$\sum_{\substack{1\leq i,j\leq N\\i\ne j}}c_{ij}$$
but by grouping the terms $c_{ij}$ and $c_{ji}$ we can write this as
$$\sum_{1\leq i<j\leq N}(c_{ij}+c_{ji})$$
which gives the form on the right hand side. (To be clearer about the last step; every term for which the second index is smaller than the first is of the form $c_{ji}$ where $i<j$.)
