# Vieta’s formulas

Let

$$p(x) = ax^2 + bx + c, \quad a \neq 0$$

be the second degree polynomial. We can factorize it in the following way:

$$p(x) = a (x – x_1 ) (x-x_2),$$

where $x_1$ and $x_2$ are roots of the second degree polynomial.

By equating two polynomials above we obtain:

$$ax^2 + bx + c = a ( x^2 – x_2 x – x_1 x + x_1 x_2)$$

$$ax^2 + bx + c = a x^2 – a x_2x – a x_1 x + a x_1 x_2$$

$$ax^2 + bx + c = ax^2 – a(x_1 + x_2)x + a x_1 x_2$$

By the theorem of equality of polynomials (two polynomials are equal if their coefficients by the proper powers are equal) we obtain:

$$b = a (x_1 + x_2) \Rightarrow x_1 + x_2 = \displaystyle{- \frac{b}{a}}$$

and

$$c = a \cdot x_1 x_2 \Rightarrow x_1 x_2 = \displaystyle{\frac{c}{a}}.$$

Let

$$p(x) = a x^3 + b x^2 + c x + d, \quad a \neq 0$$

be the third degree polynomial. We can factorize it in the following way:

$$p(x) = a (x – x_1) (x-x_2) (x – x_3),$$

where $x_1, x_2$ and $x_3$ are its roots.

Analogous to the procedure described for a second degree polynomial, we obtain:

$$x_1 + x_2 + x_3 = \displaystyle{- \frac{b}{a}},$$

$$x_1x_2 + x_1 x_3 + x_2 x_3 = \displaystyle{\frac{c}{a}},$$

$$x_1 x_2 x_3 = \displaystyle{- \frac{d}{a}}.$$

Example 1.  For the equation

$$x^2 + 7x -1 = 0$$

determine $(x_1 + x_2)^2$ and $\displaystyle{\frac{1}{x_1} + \frac{1}{x_2}}$, where $x_1$ and $x_2$ are roots of the given equation.

Solution :

By using the Vieta’s formulas, we have:

$$x_1 + x_2 = -7,$$

$$x_1x_2 = 1.$$

Now we have:

$$(x_1 + x_2)^2 = 7 ^2 = 49.$$

On the other side

$$\frac{1}{x_1} + \frac{1}{x_2} = \frac{x_2 + x_1}{x_1x_2} = \frac{7}{1} =7.$$

###### The application of the Vieta’s formulas for solving the system of equations

Example 2.  Solve the following system of equations:

$$x + y + z = 2$$

$$x^2 + y^2 + z^2 = 6$$

$$x^3 + y^3 + z^3 = 8.$$

Solution :

Since

$$(x +y + z) ^2 = x^2 + y^2 + z^2 + 2 (xy + yz + xz)$$

$$\Rightarrow x^2 + y^2 + z^2 = (x + y + z)^2 – 2 (xy + yz + xz)$$

then, because  $(x + y + z)^2 = 4$ and $x^2 + y^2 + z^2 = 6$:

$$6 = 4 – 2 (xy + yz + xz) \Rightarrow 2 = – 2 (xy + yz + xz)$$

$$\Rightarrow xy + yz + xz = -1.$$

Since

$$(x + y + z)^3 =(x^3 + y^3 + z ^3) + 3 ( x + y + z) ( xy + xz + yz) -3 xyz$$

it follows

$$2 ^3 = 8 + 3 \cdot 2 \cdot -1 – 3xyz,$$

that is,

$$6 = – 3xyz \Rightarrow xyz = -2.$$

The given system of equations is equivalent to the following system:

$$x + y + z = 2$$

$$xy + yz + xz = -1$$

$$xyz = -2.$$

By the Vieta’s formulas now we have:

$$– a = 2$$

$$b = -1$$

$$-c = -2.$$

Substituting $a, b$ and $c$ in the third degree polynomial $p(t) = t^3 + a t ^2 + bt +c$, we obtain:

$$p(t) = t^3 – 2 t^2 – t +2.$$

If $t = \displaystyle{\frac{p}{q}}$, $q \neq 0$, is a rational root of $p(t)$, then $p$ is a factor of the free coefficient and $q$ is a factor of the leading coefficient.

If this polynomial has rational roots, then $t \in \{ -2 , -1 , 1 , 2\}$.

For $t = 1$ we have:

$$p(1) = 1^3 – 2 \cdot 1^2 – 1 + 2 = 1 – 2 -1 + 2 = 0,$$

that is $t=1$ is the one root of the polynomial  $p(t) = t^3 – 2 t^2 – t +6.$ The rest two we obtain by dividing $p(t)$ with $f(t)=t-1$:

$$t^3 – 2 t^2 – t +2 : t – 1 = t^2 – t -2,$$

that is, roots of the $h(t) = t^2 – t -2$ are:

$$t_{2,3} = \displaystyle{\frac{1 \pm \sqrt{1 + 8}}{2} = \frac{1 \pm 3 }{2}}$$

$$\Rightarrow t_2 = -1 , t_3 = 2.$$

Finally,

$$p(t) = f(t)\cdot h(t)$$

$$p(t) = (t-2) (t-1) (t+1).$$

The system is symmetrical in relation to the $x, y, z$ , so we have $6$ solutions:

$$(x, y, z) \in \{( -1, 1, 2) , (-1, 2, 1) , (2, -1, 1) , (2, 1, -1), ( 1, -1, 2), (1, 2, -1)\}.$$