# Differentiating a product symbol

Can someone explain how to differentiate something like

$$\prod\limits_{i<j}^N {(x_i-x_j)}$$

with respect to $x_i$

The product starts from 1 and goes to N. I started off by ignoring the $x_j$ as it doesn't depend on $i$ but I have a feeling that's not correct. What confuses me is the $i<j$

I have tried this on Maple but the answer doesn't make sense to me. Could someone help me out? Is there an explicit formula I should use?

-
Is $i$ your index variable and is $j$ fixed or does it change? – Cameron Williams Feb 6 '14 at 17:01
They both change so essentially the first few terms are $$(x_1-x_2)(x_2-x_3)\dots$$ – user113905 Feb 6 '14 at 17:05
The notation $\displaystyle\prod_{i<j}$ sometimes means $\displaystyle\prod_{j\;:\;i<j}$ and sometimes means $\displaystyle\prod_{i,j\;:\;i<j}$ and sometimes means $\displaystyle\prod_{i\;:\;i<j}$. When not disambiguated by the context, this should be made explicit. – Michael Hardy Feb 6 '14 at 17:22
Do you think you can edit your post to give an example i.e. the product for $N=3$ or $N=4$ say? I'm not sure whether $N=3$ is $(x_1-x_2)(x_2-x_3)(x_1-x_3)$ for example or just $(x_1-x_2)(x_2-x_3)$. – TooTone Feb 6 '14 at 17:23
If BOTH variables change, i.e. if you mean $\displaystyle\prod_{i,j\;:\;i<j}$, then what would it mean to differentiate it with respect to $x_i$? Which variable is $x_i$? For example, if $i,j$ range from $1$ to $3$, then the product is $(x_2-x_1)(x_3-x_1)(x_3-x_2)$. In the first two factors, $i$ is $1$, and in the last factor $i$ is $2$. Which variable are you differentiating with respect to? – Michael Hardy Feb 6 '14 at 17:42

Since $i$ and $j$ are both bound variables of the expression, you should at most differentiate with respect to something "new", $x_k$ say. Then use the product rule: Since $$\frac\partial{\partial x_k}(x_i-x_j)=\begin{cases}1&\text{if }k=i\\-1&\text{if }k=j\\0&\text{otherwise}\end{cases}$$ we obtain \begin{align} \frac\partial{\partial x_k}\prod_{1\le i<j\le n}(x_i-x_j)&=\sum_{1\le i<j\le n} \frac{\partial(x_i-x_j)}{\partial x_k}\cdot\prod_{1\le \iota<\nu\le n\atop(\iota,\nu)\ne(k,j)}(x_\iota-x_\nu)\\ &=\sum_{k<j\le n} \prod_{1\le \iota<\nu\le n\atop(\iota,\nu)\ne(i,j)}(x_\iota-x_\nu)-\sum_{1\le i<k} \prod_{1\le \iota<\nu\le n\atop(\iota,\nu)\ne(i,k)}(x_\iota-x_\nu)\\ &=\sum_{j=k+1}^n \prod_{1\le \iota<\nu\le n\atop(\iota,\nu)\ne(i,j)}(x_\iota-x_\nu)-\sum_{i=1}^{k-1} \prod_{1\le \iota<\nu\le n\atop(\iota,\nu)\ne(i,k)}(x_\iota-x_\nu).\end{align} It may be easier to try with the logarithmic derivative: $$\frac{\frac\partial{\partial x_k}f}{f}= \frac\partial{\partial x_k}\ln f =\frac\partial{\partial x_k}\sum_{1\le i<j\le n}\ln(x_i-x_j)=\sum_{k<j\le n}\frac1{x_k-x_j}-\sum_{1\le i<k}\frac1{x_i-x_k}$$ although this is formally correct only if $x_1>x_2>\ldots >x_n$.