3

I have this problem: given $N$, $1 \leq N\leq 100$ integers which are roots from a polynomial, calculate the sum of coefficients from that polynomial

for example: given $3$ integers $2$, $2$ and $3$, I can calculate the polynomial $$x^3 - 7x^2 +16x -12,$$ so the sum of coefficients is $-2$

but if I have $100$ integers, I think calculating the polynomial will be enormous, so is there some way to find this sum of coefficients?

5xum
  • 123,496
  • 6
  • 128
  • 204

2 Answers2

8

The sum of the coefficients is just the value of the polynomial in $1$, hence if the polynomial is monic with roots in $n_1,\ldots,n_k$, then $$p(1) = (1-n_1)\cdot\ldots\cdot(1-n_k).$$

Jack D'Aurizio
  • 353,855
1

If your polynomial is monic, it can be written as $$P(x)=(x-1)(x-2)(x-3)...(x-100)= x^{100}+a_{99}x^{99}+...a_1x+a_0$$ put $x=1,$ then $$0=1+a_{99}+a_{98}+...a_1+a_0.$$

Bumblebee
  • 18,220
  • 5
  • 47
  • 87