The output y has symbolic data type if any input argument. So that the solutions form an m-pointed regular polygon or star centered at a with radius |e(a)/q(a)|^(1/m) which should be in the region of |a|*mu^(1/m). y nthroot( x, n ) returns the n th root of x with the phase angle closest to the phase of x. In Symbolic Math Toolbox, the root function represents the roots of a. Close to the root a, this perturbed polynomial can be effectively replaced by (x-a)^m*q(a)+e(a) = 0 (x-a)^m = -e(a)/q(a) Polynomial Roots - Zero finding in Matlab To find polynomial roots (aka zero. Where the coefficients of e(x) have a size that is the magnitude of the coefficients of p times mu. Due to floating point operations, the solver effectively "sees" a polynomial p(x)+e(x) For example, p 3 2 -2 represents the polynomial 3 x 2 + 2 x 2. A coefficient of 0 indicates an intermediate power that is not present in the equation. Input p is a vector containing n+1 polynomial coefficients, starting with the coefficient of x n. Mathematically, you have some polynomial p(x)=(x-a)^m*q(x) r roots(p) returns the roots of the polynomial represented by p as a column vector.
![matlab symbolic toolbox root finder matlab symbolic toolbox root finder](https://www.mathworks.com/help/examples/symbolic/win64/SolveAlgebraicEquationLETTopicExample_05.png)
In this case you could achieve this by replacing each root by the average of the 3 roots. Other algorithms have empirical tests for multiplicities and associated clusters of approximative roots and thus are able to correct this error. That this happens here with clear integer coefficients is a result of the method matlab uses, it computes the eigenvalues of the companion matrix, and the eigenvalue algorithm will transform the integer matrix into a proper floating point matrix with corresponding rounding errors in the first step of the algorithm. Which is exactly the scale of the errors in your results. In this case the multiplicity is m=3, thus the error in the range of 10^(-5).
![matlab symbolic toolbox root finder matlab symbolic toolbox root finder](https://cdn.educba.com/academy/wp-content/uploads/2020/10/Matlab-Syms.jpg)
In general you have to expect that a root of multiplicity m has a relative floating point error of magnitude mu^(1/m) where mu=1e-15 is the machine precision. This is very specific to your polynomial.