type/AlgebraicObject - Maple Help

type/AlgebraicObject

check for an algebraic number or algebraic function

 Calling Sequence type(expr,'AlgebraicObject')

Parameters

 expr - expression

Description

 • An expression is of type AlgebraicObject if and only if it is one of the following:
 –
 – a RootOf of type algext
 – $\mathrm{trig}\left(\mathrm{\pi }z\right)$ for some rational number z, where trig is one of the trigonometric functions sin,cos,tan,csc,sec,cot
 – ${ⅇ}^{I\mathrm{\pi }z}$ for some rational number z
 – I

Examples

 > $\mathrm{ex1}≔\left[I,2I,\mathrm{sqrt}\left(2\right),1+\mathrm{sqrt}\left(2\right),{x}^{\frac{2}{3}},{x}^{2},\mathrm{RootOf}\left({x}^{2}-2,\mathrm{index}=1\right),\mathrm{RootOf}\left(\mathrm{sin}\left(x\right)\right)\right]$
 ${\mathrm{ex1}}{≔}\left[{I}{,}{2}{}{I}{,}\sqrt{{2}}{,}{1}{+}\sqrt{{2}}{,}{{x}}^{{2}}{{3}}}{,}{{x}}^{{2}}{,}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{2}{,}{\mathrm{index}}{=}{1}\right){,}{\mathrm{RootOf}}{}\left({\mathrm{sin}}{}\left({\mathrm{_Z}}\right)\right)\right]$ (1)
 > $\mathrm{map}\left(\mathrm{type},\mathrm{ex1},'\mathrm{AlgebraicObject}'\right)$
 $\left[{\mathrm{true}}{,}{\mathrm{false}}{,}{\mathrm{true}}{,}{\mathrm{false}}{,}{\mathrm{true}}{,}{\mathrm{false}}{,}{\mathrm{true}}{,}{\mathrm{false}}\right]$ (2)
 > $\mathrm{ex2}≔\left[\mathrm{exp}\left(\frac{\mathrm{\pi }}{11}\right),\mathrm{exp}\left(\frac{\mathrm{\pi }I}{11}\right),\mathrm{sin}\left(\frac{3\mathrm{\pi }}{11}\right),\mathrm{cosh}\left(\frac{\mathrm{\pi }}{11}\right)\right]$
 ${\mathrm{ex2}}{≔}\left[{{ⅇ}}^{\frac{{\mathrm{\pi }}}{{11}}}{,}{{ⅇ}}^{\frac{{I}}{{11}}{}{\mathrm{\pi }}}{,}{\mathrm{sin}}{}\left(\frac{{3}{}{\mathrm{\pi }}}{{11}}\right){,}{\mathrm{cosh}}{}\left(\frac{{\mathrm{\pi }}}{{11}}\right)\right]$ (3)
 > $\mathrm{map}\left(\mathrm{type},\mathrm{ex2},'\mathrm{AlgebraicObject}'\right)$
 $\left[{\mathrm{false}}{,}{\mathrm{true}}{,}{\mathrm{true}}{,}{\mathrm{false}}\right]$ (4)