Repeated roots in Vieta's formulas (source code)

= Repeated roots in Vieta's formulas

For the <polynomial> $(x-2)^2(x+1)=x^3-3x^2+4$, the root list is $2,2,-1$, not $2,-1$. Its <elementary symmetric polynomials> are
$$
e_1=2+2-1=3,\qquad e_2=(2)(2)+(2)(-1)+(2)(-1)=0,\qquad e_3=(2)(2)(-1)=-4.
$$
The zero <coefficient> of $x$ is accounted for by the cancellation in $e_2$. Omitting one occurrence of the double <root of a polynomial> loses both the <polynomial degree> and the correct <coefficients>. <Multiplicity of a root> is part of the root data.