 Error, (in evalf/RootOf) there are ambiguous values encoded in RootOf(...) - Maple Programming Help

Home : Support : Online Help : System : Error Message Guide : AmbiguityInRoots

Error, (in evalf/RootOf) there are ambiguous values encoded in RootOf(...)

Error, (in convert/RootOf) there is ambiguity in RootOf(...)

 Description The error occurs when evalf or convert are passed expressions that have ambiguity in regards to specification of roots.

Examples

Example 1

The numerical approximation of used as a root selector is not helpful in distinguishing between the two roots, since both roots are a distance of exactly from $\frac{1}{2}.$

 > $e≔\mathrm{RootOf}\left({x}^{2}-x-1,\frac{1}{2}\right)$
 ${e}{:=}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{\mathrm{_Z}}{-}{1}{,}\frac{{1}}{{2}}\right)$ (2.1)
 > $\mathrm{evalf}\left(e\right)$

Example 2

 > ${r}_{1}≔\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-2,0\right)$
 ${{r}}_{{1}}{:=}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{2}{,}{0}\right)$ (2.2)
 > ${r}_{2}≔\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-2,\mathrm{index}=1\right)$
 ${{r}}_{{2}}{:=}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{2}{,}{\mathrm{index}}{=}{1}\right)$ (2.3)

The numeric selector, $0$, is not sufficient to distinguish whether ${r}_{1}$ is the positive or negative root. Therefore, the following gcd computation is ambiguous: if ${r}_{1}$ represents the positive root, then the GCD is $x-\sqrt{2}$, but if ${r}_{1}$ represents the negative root, then the GCD is 1. Hence an error is raised:

 > $\mathrm{gcd}\left(x-r\left[1\right],x-r\left[2\right]\right);$

Example 3

 > $\mathrm{convert}\left(\mathrm{RootOf}\left({x}^{2}-x-1,\frac{1}{2}\right),\mathrm{RootOf},\mathrm{form}=\mathrm{index}\right)$