# Finding coefficients of a polynomial in several variables.

Let $P(x_1, x_2, \ldots, x_n) = (x_1 - x_2)(x_2 - x_3)\cdots (x_{n-1} - x_n)$ be a polynomial in $\mathbb{Z}[x_1, x_2, \ldots, x_n]$. How will this polynomial look like if we write this polynomial in the following form: $$P(x_1, x_2, \ldots, x_n) = \sum_{0 \leq i_1,i_2, \cdots , i_n\leq n-1\\i_1+i_2 + \cdots +i_n=n-1\\some~other~conditions}c(i_1,i_2,\ldots, i_{n})x_1^{i_1}x_2^{i_2}\cdots x_n^{i_n}?$$ I mean to determine the coefficients $c(i_1,i_2,\ldots, i_{n})$. It is clear that all the coefficients will be either $-1$ or $1$. But how to express these coefficients in terms of $i_1, \ldots, i_n$?

EDIT: "some other conditions" has been put in the range of summation in r.h.s. Now I have some other questions:

Also What should be the exact "some other conditions" on $(i_1, i_2, \ldots, i_n)$ for summation so that the monomial $x_1^{i_1}x_2^{i_2}\cdots x_n^{i_n}$ will appear in the sum ? In one words what is the formula for writing the given polynomial as the sum of monomials ?

It is obvious that $i_1$ and $i_n$ can take values only $0$ or $1$ and all other exponent of $x_i$ can take values only $0, 1$ or $2$. There will be some other restrictions also.

Hint

• $n \equiv 0,1 \mod{4}$ $$c(i_1,i_2,\cdots,i_n) = (-1)^{\sum n \, i_n}$$

• $n \equiv 2,3 \mod{4}$ $$c(i_1,i_2,\cdots,i_n) = (-1)^{1+\sum n \, i_n}$$

Example

For $n=5$ and $n=6$

Proof Sketch

Induction from $n$ to $n+2$

\begin{align} P(x_1, x_2, \ldots, x_{n+2}) &= \sum c(i_1,i_2,\ldots, i_{n+2})x_1^{i_1}x_2^{i_2}\cdots x_{n+2}^{i_{n+2}}\\ &= (x_{n}- x_{n+1})(x_{n+1}- x_{n+2}) \sum c(i_1,i_2,\ldots, i_{n})x_1^{i_1}x_2^{i_2}\cdots x_{n}^{i_{n}}\\ &= (x_{n}x_{n+1} + x_{n+1}x_{n+2} - x_{n}x_{n+2} -x_{n+1}x_{n+3}) \sum c(i_1,i_2,\ldots, i_{n})x_1^{i_1}x_2^{i_2}\cdots x_{n}^{i_{n}} \end{align} Since in the factor $$(x_{n}x_{n+1} + x_{n+1}x_{n+2} - x_{n}x_{n+2} -x_{n+1}^2)$$ the terms having odd index sum has coefficient $(+1)$ and even index sum has $(-1)$, from $n$ to $n+2$ we switch formulas.

Edit Which coefficients are nonzero?

$c(i_1,\cdots,i_n)\neq 0$ iff there exists $a_1,\cdots,a_{n-1}$ which are either $0$ or $1$ such that $$i_1 = a_1, \ i_2 = a_2 - a_1 +1 , \ i_3 = a_3 - a_2 +1 ,\cdots , \ i_{n-1} = a_{n-1} - a_{n-2} +1, \ i_n = 1 - a_{n-1}$$ Clearly there are $2^{n-1}$ choices. Each choice corresponds a coefficient. $a_k=1$ intuitively means choosing the left element in $k$th parenthesis, and $a_k=0$ means the right one.

• I am still checking the proof. It seems correct except some typos: $x_n x_{n+1} + x_{n+1}x_{n+2} - x_n x_{n+2} - x_{n+1} x_{n+3}$ should be $x_n x_{n+1} + x_{n+1}x_{n+2} - x_n x_{n+2} - x_{n+1}^2$. The expressions for the coefficients will be valid proovided the monomial $x_1^{i_1} \cdots x_n^{i_n}$ appears in the sum in view of recent correction in my question. Please see the EDIT. – Rajkumar Oct 11 '16 at 7:08
• Thank you for the typo. I didn't understand your new question. Are you wondering which coefficients are zero? – iamvegan Oct 11 '16 at 11:22
• Yes. For example, if we consider the polynomial $(x_1 - x_2)(x_2 - x_3)(x_3 - x_4)(x_4 - x_5)$, then $x_1 x_2^2 x_3$ is not a term in the expansion of above polynomial, and so $c(1, 2, 1, 0, 0) = 0$, though $1 + 2 + 1 + 0 + 0 = 4 = 5-1$. Therefore, we have to put some more restriction on (i_1, i_2, \ldots, i_n). More precisely, my questions is find the coreect expression to write the given polynomial as a sum of monomials. For example, we write \begin{quation} (x + y)^n = \sum_{r =0}^{r =n}n\choose r x^r y^{n-r} . – Rajkumar Oct 11 '16 at 11:35
• For example, binomial formula: $(x + y)^n = \sum_{r =0}^{r =n}n\choose r x^r y^{n-r}$. – Rajkumar Oct 11 '16 at 11:42
• I added that, please see my edit – iamvegan Oct 11 '16 at 13:53