Identity coming from contour integration Let $p(z) \in \mathbb{C}[z]$ be a monic polynomial of degree $n \ge 2$, and assume that it has distinct roots $z_1,\dots,z_n$. If we consider the contour integral $$\frac{1}{2\pi i}\oint_{\left|z\right|=R}\frac{dz}{p(z)}$$ for $R$ large enough so that all roots lie inside $\{\left|z\right|\le R\}$, then by the Residue Theorem this is equal to $$\sum_{i=1}^n \text{Res}\left(\frac{1}{p(z)},z_i\right)=\sum_{i=1}^n \frac{1}{\prod_{j \ne i}(x_i-x_j)}\,.$$ On the other hand, as $R \to \infty$ the ML estimate shows that the integral goes to $0$. Thus we have the identity $$\sum_{i=1}^n \frac{1}{\prod_{j \ne i}(x_i-x_j)}=0\,.$$ Is there another way of proving this identity (maybe from just algebraic manipulation)?
 A: You can prove this purely algebraically using partial fractions.  Write $$p_n=\sum_{i=1}^n \frac{1}{\prod_{j \ne i}(x_i-x_j)}$$ and consider $p_n$ as a rational function in $x_n$ with coefficients in the field $\mathbb{Q}(x_1,\dots,x_{n-1})$.  Note that each term of $p_n$ has denominator which divides $(x_n-x_1)(x_n-x_2)\dots(x_n-x_{n-1})$ and numerator which has degree strictly smaller than the degree of the denominator.  The theory of partial fractions thus says that $p_n$ has the form $$p_n=\sum_{i=1}^{n-1}\frac{q_i}{x_n-x_i}$$ for some $q_i\in \mathbb{Q}(x_1,\dots,x_{n-1})$.  Moreover, we can compute $q_i$ by multiplying $p_n$ by $x_n-x_i$ and then evaluating at $x_n=x_i$.  Doing this using the original formula for $p_n$, all terms except the $i$th and $n$th terms vanish.  The $i$th term gives $$\frac{-1}{\prod_{j\neq i,n}(x_i-x_j)}$$ (the minus sign because we multiplied by $x_n-x_i$ which cancelled the $x_i-x_n$ factor in the denominator) and the $n$th term gives $$\frac{1}{\prod_{j\neq i,n}(x_i-x_j)}.$$ These cancel, so $q_i=0$ for all $i$, and thus $p_n=0$.
(Or, without invoking partial fractions, the same calculation shows that $(x_n-x_1)(x_n-x_2)\dots(x_n-x_{n-1})p_n$ vanishes if you evaluate at $x_n=x_i$ for any $i$.  But $(x_n-x_1)(x_n-x_2)\dots(x_n-x_{n-1})p_n$ is a polynomial of degree less than $n-1$, and so if it has $n-1$ distinct roots, it must be $0$.)
