 ConvertRootOf - Maple Help

Algebraic

 ConvertRootOf
 convert algebraic objects to RootOf notation Calling Sequence ConvertRootOf(f, options) Parameters

 f - any Maple object options - (optional) equation(s) of the form keyword = value, where keyword is either 'makeindependent' or 'substitutions' Options

 • If the option 'makeindependent' = true is given, ConvertRootOf will attempt to rewrite all algebraic objects, including RootOfs that are present in f, in terms of independent RootOfs, using the command evala/Algfield. Note that this computation can be very expensive. If 'makeindependent' = false is given, then ConvertRootOf will not perform any independence checking, and the RootOfs in the output may not be independent. By default, 'makeindependent' = FAIL is assumed, and a rewrite in terms of independent RootOfs will only be attempted if there are at most $4$ distinct algebraic objects in f.
 • If the option 'substitutions' = true is given (or 'substitutions' for short), then ConvertRootOf does not actually perform the conversion but instead returns an expression sequence F, B, S, where
 – F is a set of forward substitutions, such that the result of subs(F, f) is equal to what ConvertRootOf returns without option substitutions,
 – B is a set of backward substitutions, essentially the inverse of the substitution induced by F, and
 – S, of type boolean, indicates whether the RootOfs in subs(F, f) are independent. Description

 • The ConvertRootOf command changes all occurrences of algebraic objects (typically radicals) in f to indexed RootOf notation.
 • Usually, the radical ${a}^{\frac{p}{m}}$, for integers $p, is transformed into the equivalent expression ${\mathrm{RootOf}\left({\mathrm{_Z}}^{m}-a,\mathrm{index}=1\right)}^{p}$.
 • The imaginary unit $I$ is replaced by $\mathrm{RootOf}\left({\mathrm{_Z}}^{2}+1,\mathrm{index}=1\right)$, unless it occurs in the second or third argument of a RootOf.
 • This command descends recursively into subexpressions, including tables. In particular, nested radicals are converted.
 • By default, this command performs a limited amount of independence checking, for efficiency reasons, unless the option 'makeindependent' is given (see below).
 • If the input is a single algebraic object, then ConvertRootOf always returns an irreducible RootOf. Examples

 > $\mathrm{Algebraic}\left[\mathrm{ConvertRootOf}\right]\left(\mathrm{sqrt}\left(5\right)\right)$
 ${\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{5}{,}{\mathrm{index}}{=}{1}\right)$ (1)
 > $\mathrm{Algebraic}\left[\mathrm{ConvertRootOf}\right]\left(I+\mathrm{sqrt}\left(5\right)\right)$
 ${\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{+}{1}{,}{\mathrm{index}}{=}{1}\right){+}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{5}{,}{\mathrm{index}}{=}{1}\right)$ (2)
 > $\mathrm{Algebraic}\left[\mathrm{ConvertRootOf}\right]\left(I+\mathrm{sqrt}\left(5\right),'\mathrm{substitutions}'\right)$
 $\left\{{I}{=}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{+}{1}{,}{\mathrm{index}}{=}{1}\right){,}\sqrt{{5}}{=}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{5}{,}{\mathrm{index}}{=}{1}\right)\right\}{,}\left\{{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{5}{,}{\mathrm{index}}{=}{1}\right){=}\sqrt{{5}}{,}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{+}{1}{,}{\mathrm{index}}{=}{1}\right){=}{I}\right\}{,}{\mathrm{true}}$ (3)
 > $\mathrm{Algebraic}\left[\mathrm{ConvertRootOf}\right]\left(\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-\mathrm{sqrt}\left(2\right)\mathrm{_Z}+1,\mathrm{index}=2\right)\right)$
 ${\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{2}{,}{\mathrm{index}}{=}{1}\right){}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{2}\right)$ (4)

The imaginary unit $I$ is replaced by $\mathrm{RootOf}\left({\mathrm{_Z}}^{2}+1,\mathrm{index}=1\right)$, unless it occurs in the second or third argument of a RootOf:

 > $\mathrm{Algebraic}\left[\mathrm{ConvertRootOf}\right]\left(x+I+\mathrm{RootOf}\left({\mathrm{_Z}}^{3}-I,0..1+I\right)\right)$
 ${x}{+}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{+}{1}{,}{\mathrm{index}}{=}{1}\right){+}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{+}{1}{,}{\mathrm{index}}{=}{1}\right){}{\mathrm{_Z}}{-}{1}{,}{\mathrm{index}}{=}{1}\right)$ (5)

If there are at most 4 algebraic numbers in the input, the output RootOfs will be independent by default:

 > $\mathrm{Algebraic}\left[\mathrm{ConvertRootOf}\right]\left(\left[\mathrm{sqrt}\left(2\right),\mathrm{sqrt}\left(3\right),\mathrm{sqrt}\left(6\right)\right]\right)$
 $\left[{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{2}{,}{\mathrm{index}}{=}{1}\right){,}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{3}{,}{\mathrm{index}}{=}{1}\right){,}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{3}{,}{\mathrm{index}}{=}{1}\right){}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{2}{,}{\mathrm{index}}{=}{1}\right)\right]$ (6)
 > $\mathrm{Algebraic}\left[\mathrm{ConvertRootOf}\right]\left(\left[\mathrm{sqrt}\left(2\right),\mathrm{sqrt}\left(3\right),\mathrm{sqrt}\left(6\right)\right],'\mathrm{substitutions}'\right)$
 $\left\{\sqrt{{2}}{=}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{2}{,}{\mathrm{index}}{=}{1}\right){,}\sqrt{{3}}{=}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{3}{,}{\mathrm{index}}{=}{1}\right){,}\sqrt{{6}}{=}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{3}{,}{\mathrm{index}}{=}{1}\right){}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{2}{,}{\mathrm{index}}{=}{1}\right)\right\}{,}\left\{{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{3}{,}{\mathrm{index}}{=}{1}\right){=}\sqrt{{3}}{,}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{2}{,}{\mathrm{index}}{=}{1}\right){=}\sqrt{{2}}\right\}{,}{\mathrm{true}}$ (7)

If the input contains more than 4 algebraic objects, the output RootOfs are not necessarily independent:

 > $\mathrm{Algebraic}\left[\mathrm{ConvertRootOf}\right]\left(\left[I,\mathrm{sqrt}\left(2\right),\mathrm{sqrt}\left(3\right),\mathrm{sqrt}\left(5\right),\mathrm{sqrt}\left(6\right)\right]\right)$
 $\left[{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{+}{1}{,}{\mathrm{index}}{=}{1}\right){,}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{2}{,}{\mathrm{index}}{=}{1}\right){,}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{3}{,}{\mathrm{index}}{=}{1}\right){,}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{5}{,}{\mathrm{index}}{=}{1}\right){,}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{6}{,}{\mathrm{index}}{=}{1}\right)\right]$ (8)
 > $\mathrm{Algebraic}\left[\mathrm{ConvertRootOf}\right]\left(\left[I,\mathrm{sqrt}\left(2\right),\mathrm{sqrt}\left(3\right),\mathrm{sqrt}\left(5\right),\mathrm{sqrt}\left(6\right)\right],'\mathrm{makeindependent}'\right)$
 $\left[{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{+}{1}{,}{\mathrm{index}}{=}{1}\right){,}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{2}{,}{\mathrm{index}}{=}{1}\right){,}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{3}{,}{\mathrm{index}}{=}{1}\right){,}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{5}{,}{\mathrm{index}}{=}{1}\right){,}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{3}{,}{\mathrm{index}}{=}{1}\right){}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{2}{,}{\mathrm{index}}{=}{1}\right)\right]$ (9)

ConvertRootOf recognizes trigonometric algebraic numbers:

 > $\mathrm{Algebraic}\left[\mathrm{ConvertRootOf}\right]\left(\mathrm{sin}\left(\frac{\mathrm{\pi }}{5}\right)\right)$
 $\frac{{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{4}}{-}{5}{}{{\mathrm{_Z}}}^{{2}}{+}{5}{,}{\mathrm{index}}{=}{1}\right)}{{2}}$ (10)

Unless the only algebraic object in the input is a trigonometric algebraic number, ConvertRootOf first converts to radicals and then to RootOfs:

 > $\mathrm{Algebraic}\left[\mathrm{ConvertRootOf}\right]\left(\mathrm{sin}\left(\frac{\mathrm{\pi }}{5}\right)+I\right)$
 $\frac{{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{2}{,}{\mathrm{index}}{=}{1}\right){}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{5}{+}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{5}{,}{\mathrm{index}}{=}{1}\right){,}{\mathrm{index}}{=}{1}\right)}{{4}}{+}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{+}{1}{,}{\mathrm{index}}{=}{1}\right)$ (11)