This is very specific to your polynomial. In general, you should expect that the root of multiplicity m has a relative floating point error of mu^(1/m) , where mu=1e-15 is the accuracy of the machine. In this case, the multiplicity is m=3 , so the error is in the range of 10^(-5) . This is exactly the scale of the errors in your results.
The fact that this happens here with explicit integer coefficients is the result of using the matlab method, it calculates the eigenvalues ββof the matrix of related devices, and the eigenvalue algorithm converts the integer matrix into its own floating point matrix with the corresponding rounding errors in the first step of the algorithm.
Other algorithms have empirical tests for multiplicities and related clusters of approximative roots and, thus, are able to correct this error. In this case, you could achieve this by replacing each root with an average of three roots.
Mathematically you have some polynomial
p(x)=(xa)^m*q(x)
with a root in x=a multiplicity m . Due to floating point operations, the solver effectively "sees" the polynomial
p(x)+e(x)
where the coefficients e(x) have a size that is the value of the coefficients p times mu . Near the root a this perturbed polynomial is effectively replaced by
(xa)^m*q(a)+e(a) = 0 <==> (xa)^m = -e(a)/q(a)
so that the solutions form a m-oriented regular polygon or star centered at a with radius |e(a)/q(a)|^(1/m) , which should be in the region |a|*mu^(1/m)
Lutzl source share