# What are the coefficients of an expanded polynomial with given roots

I want to find the coefficients $$h$$ of an $$n^{th}$$ order polynomial with given roots $$a$$. The $$n^{th}$$ order polynomial is given by the geometric series and summation:

$$\prod_{k=0}^{n-1} x+a_k = \sum_{k=0}^{n-1} h_kx^k$$

Where all values of $$a$$ are known.

What I ultimately need to know how to express the $$k^{th}$$ coefficient $$h_k$$ as a function of the roots $$a_0,a_1,...$$. For example, I have found the following by expanding the product by hand and looking for patterns by inspection:

$$h_{n-1} = 1$$

$$h_{n-2} = \sum_{k=0}^{n-1}a_k$$

$$h_{n-3} = \sum_{k=1}^{n-1}a_k\sum_{j=0}^{k-1}a_j$$

$$h_{0} = \prod_{k=0}^{n-1}a_k$$

However, I struggle to find the general form for $$h_k$$

• You have the general idea already. $h_{n-4}$ is a triple sum similar to the double sum for $h_{n-3}$, etc. Commented Apr 22, 2020 at 23:46
• If the roots are $a_0, \dots, a_{n-1}$ you're interested in the polynomial $\prod_{k=0}^{n-1} (x - a_k)$. Commented Apr 22, 2020 at 23:46
• Yeah, but for simplicity I left the product with $+$ Commented Apr 22, 2020 at 23:48

If I understand correctly, I believe you're looking for what the Vieta's formulas gives. Note your $$4$$ results for $$h_0$$, $$h_{n-1}$$, $$h_{n-2}$$ and $$h_{n-3}$$ are shown there.

In particular, it states that for the $$n$$'th degree polynomial

$$P(x)=a_{n}x^{n}+a_{n-1}x^{n-1}+\cdots +a_{1}x+a_{0} \tag{1}\label{eq1A}$$

with $$a_n \neq 0$$ and the $$r_i$$ for $$1 \le i \le n$$ roots being real or complex numbers, you have the general expression of

$$\sum _{1\leq i_{1}

for $$k = 1, 2, \ldots, n$$, and with the indices $$i_k$$ being sorted in increasing order to ensure each product of $$k$$ roots is used exactly once.

In your case, the $$r_i$$ are your $$-a_i$$ and its $$a_i$$ are your $$h_i$$, with their $$a_n = 1$$ in your particular case. Using your symbols, \eqref{eq2A} becomes

\begin{aligned} & \sum _{1\leq i_{1}

Let $$a_1, \dots, a_n$$ be the roots. We want to compute the coefficients $$h_0, \dots, h_n$$ of the polynomial $$P := \prod_{k=0}^{n-1} (x - a_k)$$.

Fix $$0\leqslant k \leqslant n$$. Let $$P_k :=\mathcal{P}_k(\{1,\dots, n\})$$ be the set of all subsets of $$\{1,\dots, n\}$$ of size $$k$$. One gets :

$$h_k = \sum_{I \in P_{n-k}} (-1)^{n -k} \prod_{i \in I} a_i$$

• Thank-you, your answer has easy to digest notation! I think you might have made some indexing mismatches in your answer. In my question I have all subscripts go from $0$ to $n-1$. Commented Apr 23, 2020 at 0:13
• @Condensation it barely changes anything and I was too lazy to have $n - 1$ in subscripts. ;) Oh and don't forget tu upvote/accept the answer if it suits you. ;) Commented Apr 23, 2020 at 0:22