 RootOf indexed - Maple Help

Indexed RootOf Calling Sequence RootOf(expr, x, index=i) Parameters

 expr - algebraic expression or equation x - variable name i - integer Description

 • An index can be specified to select a particular root of an equation. If the index i is an integer, then the RootOf represents the ith root of the equation in an order described below.
 • Indices are understood by Maple in the following cases:
 1 The equation expr is a polynomial in x whose coefficients can be numerically evaluated (see complexcons). The RootOf represents the ith complex root (multiplicities taken into account) of the polynomial. The roots are ordered counter-clockwise, with ties broken by increasing modulus. The first root is chosen as follows:
 – roots with the smallest argument in absolute value are selected,
 – roots with positive argument, if any, are then chosen,
 – the root with the smallest modulus amongst the remaining roots is the root number 1.
 If the RootOf represents an $n$th root, that is, if expr is a binomial of degree $n$, then the index i corresponds to ${ⅇ}^{\frac{2I\left(i-1\right)\mathrm{\pi }}{n}}{\mathrm{expr}}^{\frac{1}{n}}$ where ${\mathrm{expr}}^{\frac{1}{n}}$ is the principal branch of the nth root function.
 The default ordering may be changed by over-writing the function called RootOf/sort. The argument of this function is a list of complexcons and the result must be the list of sorted elements. If the default ordering is modified, some functions may not work as expected (convert/radical for instance). The evala function will still behave as expected.
 2 The equation is a polynomial in x with polynomial coefficients in a set of variables X. In this case, the RootOf defines an algebraic function. The definition of the function which is identified by the index is inherited from the ordering of the roots in the constant case above: For each complex number c, the value of RootOf(expr(X), index=i) at c is given by RootOf(expr(c), index=i). Examples

 > $\mathrm{r1}≔\mathrm{RootOf}\left({x}^{5}+x+3,x,\mathrm{index}=1\right)$
 ${\mathrm{r1}}{≔}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{5}}{+}{\mathrm{_Z}}{+}{3}{,}{\mathrm{index}}{=}{1}\right)$ (1)
 > $\mathrm{r2}≔\mathrm{RootOf}\left({x}^{5}+x+3,x,\mathrm{index}=2\right)$
 ${\mathrm{r2}}{≔}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{5}}{+}{\mathrm{_Z}}{+}{3}{,}{\mathrm{index}}{=}{2}\right)$ (2)
 > $\mathrm{evalf}\left(\mathrm{r1}\right),\mathrm{evalf}\left(\mathrm{r2}\right)$
 ${1.041879540}{+}{0.8228703381}{}{I}{,}{-0.4753807567}{+}{1.129701725}{}{I}$ (3)
 > $\mathrm{alias}\left(\mathrm{α}=\mathrm{RootOf}\left({x}^{4}+{x}^{2}+2,x,\mathrm{index}=2\right)\right)$
 ${\mathrm{\alpha }}$ (4)
 > $\mathrm{factor}\left({x}^{6}+7,\mathrm{α}\right)$
 ${-}\left({-}{{x}}^{{3}}{+}{2}{}{{\mathrm{\alpha }}}^{{2}}{+}{1}\right){}\left({{x}}^{{3}}{+}{2}{}{{\mathrm{\alpha }}}^{{2}}{+}{1}\right)$ (5)
 > $S≔{\sum }_{i=1}^{5}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}\frac{1}{{\mathrm{RootOf}\left({x}^{5}+x+3,x,\mathrm{index}=i\right)}^{5}}$
 ${S}{≔}{\sum }_{{i}{=}{1}}^{{5}}{}\frac{{1}}{{{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{5}}{+}{\mathrm{_Z}}{+}{3}{,}{\mathrm{index}}{=}{i}\right)}^{{5}}}$ (6)
 > $\mathrm{evala}\left(\mathrm{Simplify}\left(\mathrm{value}\left(S\right)\right)\right)$
 ${-}\frac{{406}}{{243}}$ (7)
 > $\mathrm{R1}≔\mathrm{RootOf}\left({x}^{3}-y,x,\mathrm{index}=1\right)$
 ${\mathrm{R1}}{≔}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{-}{y}{,}{\mathrm{index}}{=}{1}\right)$ (8)
 > $\mathrm{R2}≔\mathrm{RootOf}\left({x}^{3}-y,x,\mathrm{index}=2\right)$
 ${\mathrm{R2}}{≔}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{-}{y}{,}{\mathrm{index}}{=}{2}\right)$ (9)
 > $\mathrm{evala}\left(\mathrm{Simplify}\left(\frac{\partial }{\partial y}\left(\frac{\mathrm{R1}}{\mathrm{R2}}\right)\right)\right)$
 ${0}$ (10)
 > $\mathrm{cons}≔\mathrm{evalf}@\mathrm{unapply}\left(\frac{\mathrm{R1}}{\mathrm{R2}},y\right)$
 ${\mathrm{cons}}{≔}{\mathrm{@}}{}\left({\mathrm{evalf}}{,}{y}{↦}\frac{{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{-}{y}{,}{\mathrm{index}}{=}{1}\right)}{{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{-}{y}{,}{\mathrm{index}}{=}{2}\right)}\right)$ (11)
 > $\mathrm{cons}\left(1\right)$
 ${-0.5000000000}{-}{0.8660254038}{}{I}$ (12)
 > $\mathrm{cons}\left(-1\right)$
 ${-0.5000000000}{-}{0.8660254038}{}{I}$ (13)