GetAlgebraics - Maple Help

Algebraic

 GetAlgebraics
 extract all algebraic objects from a given object

 Calling Sequence GetAlgebraics(f) GetAlgebraics(f, 'RootOf')

Parameters

 f - any expression

Description

 • GetAlgebraics(f) returns all the subexpressions of f that are of type AlgebraicObject.
 • GetAlgebraics(f, 'RootOf') returns all subexpressions of f that are of type algext.
 • For both calling sequences, GetAlgebraics descends recursively into tables.

Examples

 > $f≔\mathrm{array}\left(\left[1+I,x+\mathrm{sqrt}\left(2\right),\mathrm{RootOf}\left({y}^{2}-\mathrm{RootOf}\left({x}^{2}-3,\mathrm{index}=1\right),y,\mathrm{index}=1\right)\right]\right)$
 ${f}{≔}\left[\begin{array}{ccc}{1}{+}{I}& {x}{+}\sqrt{{2}}& {\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{3}{,}{\mathrm{index}}{=}{1}\right){,}{\mathrm{index}}{=}{1}\right)\end{array}\right]$ (1)
 > $\mathrm{Algebraic}\left[\mathrm{GetAlgebraics}\right]\left(f\right)$
 $\left\{{I}{,}\sqrt{{2}}{,}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{3}{,}{\mathrm{index}}{=}{1}\right){,}{\mathrm{index}}{=}{1}\right){,}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{3}{,}{\mathrm{index}}{=}{1}\right)\right\}$ (2)
 > $\mathrm{Algebraic}\left[\mathrm{GetAlgebraics}\right]\left(f,'\mathrm{RootOf}'\right)$
 $\left\{{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{3}{,}{\mathrm{index}}{=}{1}\right){,}{\mathrm{index}}{=}{1}\right){,}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{3}{,}{\mathrm{index}}{=}{1}\right)\right\}$ (3)