Today, I encountered a problem related to higher-order equations. The problem is as follows:

then $ab + ac + ad + ae + bc + bd + be + cd + ce + de = \underline{\qquad}$?

This problem involves a quintic equation, and the required expression is very long. My intuition tells me that brute force calculation is not feasible for this problem, and there must be a specific formula or theorem that can solve it quickly. Upon observation, I found that $a, b, c, d, e$ are the roots of the quintic equation, and the required result is the product of all pairs of these five roots. My intuition tells me that this problem must be related to **Vieta's formula**.

## Vieta's formula

The well-known Vieta's formula provides the relationship between the roots and the coefficients of a quadratic equation. That is, If $x_1$ and $x_2$ā are the roots of the quadratic equation $x^2+bx+c=0$, then according to Vieta's formula, we have:

$$

\begin{align*}

x_1 + x_2 &= -\frac{b}{a} \\

x_1 \cdot x_2 &= \frac{c}{a}

\end{align*}

$$

Vieta's formula is easy to prove.

Since $x_1$ā and $x_2$ā are the roots of a quadratic equation, according to the **factor theorem**, the quadratic equation can be written as $(x-x_1)(x-x_2)=0$. Therefore,

$$ax^2+bx+c = (x-x_1)(x-x_2) = 0$$

Expanding the formula on the right side and dividing the formula on the left side by the coefficient of the quadratic term, we get:

$$x^2+\frac{b}{a}x+\frac{c}{a} = x^2-(x_1+x_2)x+x_1x_2 = 0$$

If two polynomials are equal, then their corresponding coefficients are equal. Therefore:

$$x_1+x_2 = -\frac{b}{a} \quad \text{and} \quad x_1x_2 = \frac{c}{a} \qquad \blacksquare$$

## Return to the problem

Let's return to the topic. The equation on the right-hand side of the problem is a factorization of the equation on the left-hand side, which indicates that $a,b,c,d,e$ are the roots of the equation $x^5 - 4x^4 + 7x^3 - 6x^2 + 2x + 9=0$. Can we use a similar approach to proving Vieta's formula to find the relationship between the roots and the coefficients? Let's give it a try.

Expand the formula on the right-hand side. $(x-a)(x-b)(x-c)(x-d)(x-e) =$

$$

\begin{align*}

&x^5\\

-(a+b+c+d+e)&x^4\\

+(ab+ac+bc+ad+bd+cd+ae+be+cd+de)&x^3\\

-(abc+abd+cd+bcd+abe+ace+bce+ade+bde+cde)&x^2\\

+(abcd+abce+abde+acde+bcde)&x\\

-abcde

\end{align*}

$$

Observe that the required term $ab + ac + ad + ae + bc + bd + be + cd + ce + de$ is exactly the coefficient of the 3rd degree term, which is $7$.

Therefore, the answer is $7$.

## Generalize Vieta's formula

From the expanded form above, we can observe that the coefficients of the polynomial follow a certain pattern. The coefficient of the $n$-th term is a constant $1$, the coefficient of the $(nā1)$-th term is the negative sum of all the roots, the coefficient of the $(nā2)$-th term is the sum of the products of each two-pair roots, the coefficient of the $(nā3)$-th term is the negative sum of the products of each three-pair roots, and so on. The last term is $(-1)^n$ times the product of all the roots. This is essentially the **Vieta's formulas for higher-degree polynomials**.

Suppose $x_1, x_2, \dots , x_n$ are roots of equation $$P(x) = a_nx^n + a_{n-1}x^{n-1} + \dots + a_1x + a_0 = 0,$$ then

$$

\begin{align*}

x_1+x_2+x_3 + \dots x_n &= -\frac{a_{n-1}}{a_n} \\

x_1x_2+x_1x_3 + \dots x_nx_{n-1} &= \frac{a_{n-2}}{a_n} \\

\vdots \\

x_1x_2x_3 \dots x_n &= (-1)^n\frac{a_0}{a_n}

\end{align*}

$$

Specifically, when $n=2$, we get the following:

$$ x_1+x_2=-\frac{a_1}{a_2} \quad\text{and}\quad x_1x_2 = \frac{a_0}{a_2} $$

which is the Vieta's theorem for quadratic equations that we are familiar with!

Therefore, if you know the Vieta's formula for higher degree polynomials, this problem can be solved in seconds.