2

I want to find the coefficients of the $n$-th degree polynomial obtained from the expansion of the binomial product:

$$\prod_{i=1}^n{(x-a_i)}$$

where $x$ and $a_i$ are real numbers. Is there any efficient formula or recursive algorithm to calculate such coefficients? I found in wikipedia the formula for the more general case of the multi-binomial product but it does not seem very efficient.

Manuel
  • 77

1 Answers1

0

This is a case covered by Vieta's formulae: $$ \prod_{i=1}^n (x-a_i) = \sum_{k=1}^n A_k x^k, $$ where $ A_n = 1 $, and the others are given by \begin{align} A_{n-1} &= -\sum_i a_i, \\ A_{n-2} &= + \sum_{i_1 < i_2} a_{i_1} a_{i_2}, \\ &\,\,\vdots \\ A_0 &= (-1)^n a_1 a_2 \cdots a_n, \end{align} where $A_k$ contains all possible products of $n-k$ distinct $a_i$s. This is the simplest possible way of writing these in general.

Chappers
  • 67,606
  • Thank you, it looks good, what if not all $a_i$s are different? My other concern would be the efficiency of these formulas for large $n$. – Manuel May 03 '17 at 18:00
  • There isn't a major simplification if the $a_i$ are not distinct. This has some suggestions for efficient ways of computing the symmetric polynomials involved, but this is the extent of my knowledge on the matter. – Chappers May 03 '17 at 18:30
  • Now I'm trying to use the formulas, but I'm lost with the indices of the $A_{n-3}$ coefficient. I'm guessing they will be $i_1<i_2<i_3$, is it correct?. Also if I expand $\prod_{i=1}^n{(x+a_i)}$ instead of $\prod_{i=1}^n{(x-a_i)}$ would it mean that all coefficients $A_k$ will have a plus sign in front of the summation? – Manuel May 03 '17 at 20:48
  • Yes, correct on both. – Chappers May 03 '17 at 21:03