 Simplify - Maple Programming Help

Home : Support : Online Help : Mathematics : Evaluation : evala : evala/Simplify

Simplify

simplification rules for algebraic numbers and functions

 Calling Sequence evala(Simplify(a)) evala(Simplify(a), opts)

Parameters

 a - expression involving algebraic numbers or algebraic functions opts - (optional) literal name or a set of names: symmetry, expanded, eliminate, 'minpoly'

Description

 • This function applies some simplification algorithms to an expression involving algebraic numbers or algebraic functions.
 • Algebraic functions and algebraic numbers may be represented by radicals or with the RootOf notation (see type,algnum, type,algfun, type,radnum, type,radfun).
 • The result will have the form P/Q, where P and Q are polynomials over the extension field. The powers of the RootOfs in the coefficients are positive and lower than the degree of the defining polynomials. In other words, the result is reduced.
 • Each option correspond to a simplification algorithm. If an option or a set of options is specified, then only the selected algorithms will be applied. If no option is specified, then all the methods will be used.
 • Supported options are described below:
 – symmetry : Attempt to eliminate indexed RootOf using properties of symmetric functions of the roots. This option essentially acts on expressions which are symmetric in the roots of a polynomial.
 – expanded : Expand the numerator P and the denominator Q. By default, partial factorization of polynomials are preserved.
 – eliminate : Attempt to eliminate indexed RootOf using simple relations satisfied by the roots a polynomial. Roots with the highest index are eliminated first.
 – 'minpoly' : simplify the defining polynomial of the RootOfs.
 • Unlike evala@Normal, the function Simplify does not rationalize algebraic numbers and functions and does not rationalize leading coefficients of rational functions and polynomials. It does not neither cancel the greatest common divisor of the numerator and the denominator of a rational function.
 • If the RootOfs appearing in the input are independent, then this function will return 0 if and only if the input is mathematically equal to 0. It may not be so if the RootOfs are dependent or if the polynomial defining a RootOf is reducible.
 • If a contains functions, their arguments are reduced recursively and the functions are frozen before the computation proceeds.
 • Since the ordering of objects may vary from a session to another, the result may change accordingly.
 • Other objects are frozen and considered as variables, except in the cases below.
 • If a is a set, a list, a range, a relation, or a series, then Simplify is mapped over the object.

Examples

 > $\mathrm{s1}≔\mathrm{RootOf}\left({\mathrm{_Z}}^{2}+3\mathrm{_Z}+1,\mathrm{index}=1\right)$
 ${\mathrm{s1}}{≔}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{+}{3}{}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{1}\right)$ (1)
 > $\mathrm{s2}≔\mathrm{RootOf}\left({\mathrm{_Z}}^{2}+3\mathrm{_Z}+1,\mathrm{index}=2\right)$
 ${\mathrm{s2}}{≔}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{+}{3}{}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{2}\right)$ (2)
 > $p≔{\mathrm{s1}}^{2}+{\mathrm{s2}}^{2}$
 ${p}{≔}{{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{+}{3}{}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{1}\right)}^{{2}}{+}{{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{+}{3}{}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{2}\right)}^{{2}}$ (3)
 > $\mathrm{evala}\left(\mathrm{Simplify}\left(p\right),\mathrm{symmetry}\right)$
 ${7}$ (4)
 > $d≔{\left(\mathrm{s1}-\mathrm{s2}\right)}^{2}$
 ${d}{≔}{\left({\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{+}{3}{}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{1}\right){-}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{+}{3}{}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{2}\right)\right)}^{{2}}$ (5)
 > $\mathrm{evala}\left(\mathrm{Simplify}\left(d\right),\mathrm{symmetry}\right)$
 ${5}$ (6)
 > $\mathbf{for}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}i\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{to}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}3\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{do}\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\phantom{\rule[-0.0ex]{2.0em}{0.0ex}}\mathrm{alias}\left(\mathrm{\alpha }\left[i\right]=\mathrm{RootOf}\left({\mathrm{_Z}}^{3}+\mathrm{_Z}+1,\mathrm{index}=i\right)\right)\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\mathbf{end}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{do}:$$\mathrm{p1}≔\left(x-\mathrm{\alpha }\left[1\right]\right)\left(x-\mathrm{\alpha }\left[2\right]\right)\left(x-\mathrm{\alpha }\left[3\right]\right)$
 ${\mathrm{p1}}{≔}\left({x}{-}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{1}\right)\right){}\left({x}{-}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{2}\right)\right){}\left({x}{-}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{3}\right)\right)$ (7)
 > $\mathrm{evala}\left(\mathrm{Simplify}\left(\mathrm{p1}\right),\mathrm{symmetry}\right)$
 ${{x}}^{{3}}{+}{x}{+}{1}$ (8)
 > $\mathrm{p2}≔\frac{1}{\mathrm{\alpha }\left[2\right]+\mathrm{\alpha }\left[1\right]}+\frac{1}{\mathrm{\alpha }\left[1\right]+\mathrm{\alpha }\left[3\right]}+\frac{1}{\mathrm{\alpha }\left[2\right]+\mathrm{\alpha }\left[3\right]}$
 ${\mathrm{p2}}{≔}\frac{{1}}{{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{2}\right){+}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{1}\right)}{+}\frac{{1}}{{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{1}\right){+}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{3}\right)}{+}\frac{{1}}{{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{2}\right){+}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{3}\right)}$ (9)
 > $\mathrm{evala}\left(\mathrm{Simplify}\left(\mathrm{p2}\right),\mathrm{symmetry}\right)$
 ${1}$ (10)
 > $\mathrm{p3}≔\mathrm{\alpha }\left[1\right]{\mathrm{\alpha }\left[2\right]}^{2}{\mathrm{\alpha }\left[3\right]}^{3}$
 ${\mathrm{p3}}{≔}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{1}\right){}{{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{2}\right)}^{{2}}{}{{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{3}\right)}^{{3}}$ (11)
 > $\mathrm{evala}\left(\mathrm{Simplify}\left(\mathrm{p3}\right),\mathrm{eliminate}\right)$
 ${-}{1}{+}{{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{1}\right)}^{{2}}{}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{2}\right){+}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{2}\right)$ (12)
 > $\mathrm{p4}≔\frac{\left(x-\mathrm{\alpha }\left[1\right]\right)\left({x}^{2}-\mathrm{\alpha }\left[1\right]\right)}{{\left(\mathrm{\alpha }\left[1\right]+\mathrm{\alpha }\left[2\right]\right)}^{2}}$
 ${\mathrm{p4}}{≔}\frac{\left({x}{-}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{1}\right)\right){}\left({{x}}^{{2}}{-}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{1}\right)\right)}{{\left({\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{2}\right){+}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{1}\right)\right)}^{{2}}}$ (13)
 > $\mathrm{evala}\left(\mathrm{Simplify}\left(\mathrm{p4}\right)\right)$
 $\frac{\left({-}{x}{+}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{1}\right)\right){}\left({-}{{x}}^{{2}}{+}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{1}\right)\right)}{{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{1}\right){}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{2}\right){-}{1}}$ (14)
 > $\mathrm{evala}\left(\mathrm{Simplify}\left(\mathrm{p4}\right),\mathrm{expanded}\right)$
 $\frac{{-}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{1}\right){}{{x}}^{{2}}{+}{{x}}^{{3}}{+}{{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{1}\right)}^{{2}}{-}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{1}\right){}{x}}{{{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{1}\right)}^{{2}}{+}{2}{}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{1}\right){}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{2}\right){+}{{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{2}\right)}^{{2}}}$ (15)
 > $\mathrm{evala}\left(\mathrm{Simplify}\left(\mathrm{p4}\right),\left\{\mathrm{eliminate},\mathrm{expanded}\right\}\right)$
 $\frac{{-}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{1}\right){}{{x}}^{{2}}{+}{{x}}^{{3}}{+}{{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{1}\right)}^{{2}}{-}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{1}\right){}{x}}{{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{1}\right){}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{\mathrm{_Z}}{+}{1}{,}{\mathrm{index}}{=}{2}\right){-}{1}}$ (16)
 > $\mathrm{p5}≔\mathrm{RootOf}\left({\mathrm{_Z}}^{4}-4,\mathrm{index}=3\right)$
 ${\mathrm{p5}}{≔}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{4}}{-}{4}{,}{\mathrm{index}}{=}{3}\right)$ (17)
 > $\mathrm{evala}\left(\mathrm{Simplify}\left(\mathrm{p5}\right),'\mathrm{minpoly}'\right)$
 ${\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{2}{,}{\mathrm{index}}{=}{2}\right)$ (18)
 > $\mathrm{p6}≔\mathrm{mul}\left(\mathrm{RootOf}\left({\mathrm{_Z}}^{4}-4,\mathrm{index}=i\right),i=1..4\right)$
 ${\mathrm{p6}}{≔}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{4}}{-}{4}{,}{\mathrm{index}}{=}{1}\right){}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{4}}{-}{4}{,}{\mathrm{index}}{=}{2}\right){}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{4}}{-}{4}{,}{\mathrm{index}}{=}{3}\right){}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{4}}{-}{4}{,}{\mathrm{index}}{=}{4}\right)$ (19)
 > $\mathrm{evala}\left(\mathrm{Simplify}\left(\mathrm{p6}\right),'\mathrm{minpoly}'\right)$
 ${\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{2}{,}{\mathrm{index}}{=}{1}\right){}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{+}{2}{,}{\mathrm{index}}{=}{1}\right){}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{2}{,}{\mathrm{index}}{=}{2}\right){}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{+}{2}{,}{\mathrm{index}}{=}{2}\right)$ (20)
 > $\mathrm{p7}≔{x}^{3}-{x}^{2}\mathrm{p5}-\mathrm{p5}x+{\mathrm{p5}}^{2}+x-\mathrm{p5}$
 ${\mathrm{p7}}{≔}{-}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{4}}{-}{4}{,}{\mathrm{index}}{=}{3}\right){}{{x}}^{{2}}{+}{{x}}^{{3}}{+}{{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{4}}{-}{4}{,}{\mathrm{index}}{=}{3}\right)}^{{2}}{-}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{4}}{-}{4}{,}{\mathrm{index}}{=}{3}\right){}{x}{-}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{4}}{-}{4}{,}{\mathrm{index}}{=}{3}\right){+}{x}$ (21)
 > $\mathrm{p8}≔\mathrm{RootOf}\left(\mathrm{p7},\mathrm{index}=2\right)$
 ${\mathrm{p8}}{≔}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{-}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{4}}{-}{4}{,}{\mathrm{index}}{=}{3}\right){}{{\mathrm{_Z}}}^{{2}}{+}\left({-}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{4}}{-}{4}{,}{\mathrm{index}}{=}{3}\right){+}{1}\right){}{\mathrm{_Z}}{-}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{4}}{-}{4}{,}{\mathrm{index}}{=}{3}\right){+}{2}{,}{\mathrm{index}}{=}{2}\right)$ (22)
 > $\mathrm{evala}\left(\mathrm{Simplify}\left(\mathrm{p8}\right)\right)$
 ${\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{2}{,}{\mathrm{index}}{=}{2}\right)$ (23)