# General identity for a double summation theorem

I've been reading a research paper, and I'm interested in generalizing a certain theorem but I can't seem to understand how the following results are derived:

$$\sum_{i=1}^{n}\sum_{j\neq i}^n \frac{1}{z_i-z_j}=0$$ $$\sum_{i=1}^{n}\sum_{j\neq i}^n \frac{z_i}{z_i-z_j}=\frac{1}{2}n(n-1)$$ $$\sum_{i=1}^{n}\sum_{j\neq i}^n \frac{z_i^2}{z_i-z_j}=(n-1)\sum_{i=1}^n z_i$$ $$\sum_{i=1}^{n}\sum_{j\neq i}^n \frac{z_i^3}{z_i-z_j}=(n-1)\sum_{i=1}^n z_i^2 + \sum_{i<j}^n z_i z_j$$

I assume the $z_i$ are distinct, let us say they are independent indeterminates.

Then the first identity appears to be simple, as a particular summand appears once as $\dfrac{1}{z_a - z_b}$ (for $i = a$ and $j = b$) and another time as $\dfrac{1}{z_b - z_a}$ (for $i = b$ and $j = a$), so the two cancel out.

In the second one if you fix two distinct indices $a$ and $b$, with $a < b$, you will have two terms $$\frac{z_a}{z_a-z_b} + \frac{z_b}{z_b-z_a} = 1,$$ and there are $\dbinom{n}{2}$ such pairs $a, b$.

As to the third one, the two relevant terms here are $$\frac{z_a^2}{z_a-z_b} + \frac{z_b^2}{z_b-z_a} = \frac{z_a^2-z_b^2}{z_a-z_b} = z_a + z_b,$$ so you see that for a fixed $a$ you get a term $z_a$ for each of the $n-1$ elements $b \in \{ 1, \dots, n\} \setminus \{ a\}$.

The pattern should now be clear also for the last equality.

The general formula for $k \ge 2$ should be $$\sum_{i=1}^{n}\sum_{j\neq i}^n \frac{z_i^k}{z_i-z_j}=(n-1)\sum_{i=1}^n z_i^{k-1} + \sum_{i < j}\sum_{s=1}^{k-1} z_i^s z_j^{k-1-s}$$

Just note that each term $$\frac{1}{z_i-z_j}$$ appears twice, the second time with opposite sign, and hence their sum is zero.

Let $$S_2=\sum_{i=1}^{n}\sum_{j\neq i}^n \frac{z_i}{z_i-z_j}.$$ Then $$S_2=\sum_{i=1}^{n}\sum_{j\neq i}^n \frac{(z_i-z_j)+z_j}{z_i-z_j}=\sum_{i=1}^{n}\sum_{j\neq i}^n \left(1+\frac{z_j}{z_i-z_j} \right)=\sum_{i=1}^{n}\sum_{j\neq i}^n 1+\sum_{i=1}^{n}\sum_{j\neq i}^n \frac{z_j}{z_i-z_j}=\\ \sum_{i=1}^{n}\sum_{j\neq i}^n 1-\sum_{i=1}^{n}\sum_{j\neq i}^n \frac{z_i}{z_i-z_j}=n(n-1)-S_2.$$ Thus $$S_2=\frac{n(n-1)}{2}.$$

Let $$S_3=\sum_{i=1}^{n}\sum_{j\neq i}^n \frac{z_i^2}{z_i-z_j}.$$ Then $$S_3=\sum_{i=1}^{n}\sum_{j\neq i}^n \frac{(z_i^2-z_j^2)+z_j^2}{z_i-z_j}=\sum_{i=1}^{n}\sum_{j\neq i}^n \left(\frac{z_i^2-z_j^2}{z_i-z_j} +\frac{z_j^2}{z_i-z_j}\right)=\\ \sum_{i=1}^{n}\sum_{j\neq i}^n(z_i+z_j)-\sum_{i=1}^{n}\sum_{j\neq i}^n\frac{z_j^2}{z_j-z_i}=2(n-1)\sum_i^n z_i-S_3.$$ Thus $$S_3=(n-1)\sum_{i=1}^n z_i.$$