Sqrfree - Maple Programming Help

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

Sqrfree

square-free factorization of polynomials over algebraic extensions

 Calling Sequence evala(Sqrfree(P, x), opts)

Parameters

 P - expression involving algebraic numbers or algebraic functions. x - (optional) name, set of names, or list of names. opts - (optional) option name or set of option names. - Options currently supported: independent, expanded.

Description

 • This function computes square-free factorizations of polynomials and rational functions over algebraic function fields or algebraic number fields. The square-free factorization is returned in the form $[u,[[{f}_{1},{ⅇ}_{1}],\mathrm{...},[{f}_{n},{ⅇ}_{n}]]$ such that $P=u{{f}_{1}}^{{ⅇ}_{1}}...{{f}_{n}}^{{ⅇ}_{n}}$ where ${f}_{i}$ is a monic and square-free polynomial in the variables $x$. In other words, Gcd $\left({f}_{i},\frac{\partial }{\partial x}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}_{i}\right)=1$ for all $i$ and $\mathrm{Gcd}\left({f}_{i},{f}_{j}\right)=1$ for all $i\ne j$. The coefficient $u$ is an element of the coefficients field of $P$ and it is free of $x$. The ${f}_{i}$'s are collected with respect to $x$.
 • 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 argument $P$ is considered as a polynomial or a rational function in $x$. Other names are considered as elements of the coefficient field. If the optional argument $x$ is omitted, then all the names in $P$ which do not appear inside a RootOf or a radical are used.
 • The ${e}_{i}$'s are positive integers if $P$ is a polynomial in $x$ and integers if $P$ is a rational function in $x$. By default, the ${e}_{i}$'s may not be distinct since partial factorizations are preserved. If the option expanded is specified, factorizations of polynomials with the same multiplicity are not preserved. In any case, the ${e}_{i}$'s are sorted by nondecreasing value.
 • Algebraic numbers and functions occurring in the results are reduced modulo their minimal polynomial (see Normal).
 • The RootOf and the radicals defining the algebraic numbers must form an independent set of algebraic quantities, otherwise an error is returned. Note that this condition need not be satisfied if the expression contains only algebraic numbers in radical notation (e.g., $\sqrt{2}$, $\sqrt{3}$, $\sqrt{6}$). A basis over Q for the radicals can be computed by Maple in this case.
 • To skip the independence checking, use the option independent.
 • If $a$ or $b$ contains functions, their arguments are normalized recursively and the functions are frozen before the computation proceeds.
 • Since the ordering of objects may vary from a session to another, the leading coefficients may change accordingly.
 • Other objects are frozen and considered as variables.

Examples

 > $\mathrm{alias}\left(\mathrm{\alpha }=\mathrm{RootOf}\left({x}^{3}+x+1\right)\right)$
 ${\mathrm{\alpha }}$ (1)
 > $q≔\left(x-\mathrm{\alpha }\right)\left({x}^{2}-{\mathrm{\alpha }}^{2}\right)\left(x-1\right)$
 ${q}{≔}\left({x}{-}{\mathrm{\alpha }}\right){}\left({-}{{\mathrm{\alpha }}}^{{2}}{+}{{x}}^{{2}}\right){}\left({x}{-}{1}\right)$ (2)
 > $\mathrm{evala}\left(\mathrm{Sqrfree}\left(q\right)\right)$
 $\left[{1}{,}\left[\left[{x}{+}{\mathrm{\alpha }}{,}{1}\right]{,}\left[{x}{-}{1}{,}{1}\right]{,}\left[{x}{-}{\mathrm{\alpha }}{,}{2}\right]\right]\right]$ (3)
 > $\mathrm{evala}\left(\mathrm{Sqrfree}\left(q\right),\mathrm{expanded}\right)$
 $\left[{1}{,}\left[\left[{{x}}^{{2}}{+}\left({\mathrm{\alpha }}{-}{1}\right){}{x}{-}{\mathrm{\alpha }}{,}{1}\right]{,}\left[{x}{-}{\mathrm{\alpha }}{,}{2}\right]\right]\right]$ (4)
 > $p≔\mathrm{expand}\left(\left(x-\mathrm{sqrt}\left(t\right)y\right){\left(\mathrm{sqrt}\left(t\right)x+1\right)}^{2}\right)$
 ${p}{≔}{t}{}{{x}}^{{3}}{+}{2}{}\sqrt{{t}}{}{{x}}^{{2}}{+}{x}{-}{{t}}^{{3}}{{2}}}{}{y}{}{{x}}^{{2}}{-}{2}{}{t}{}{y}{}{x}{-}\sqrt{{t}}{}{y}$ (5)
 > $\mathrm{evala}\left(\mathrm{Sqrfree}\left(p,x\right)\right)$
 $\left[{t}{,}\left[\left[{x}{-}\sqrt{{t}}{}{y}{,}{1}\right]{,}\left[{x}{+}\frac{{1}}{\sqrt{{t}}}{,}{2}\right]\right]\right]$ (6)
 > $\mathrm{evala}\left(\mathrm{Sqrfree}\left(p,y\right)\right)$
 $\left[{-}{{t}}^{{3}}{{2}}}{}{{x}}^{{2}}{-}{2}{}{t}{}{x}{-}\sqrt{{t}}{,}\left[\left[{-}\frac{{x}}{\sqrt{{t}}}{+}{y}{,}{1}\right]\right]\right]$ (7)
 > $\mathrm{evala}\left(\mathrm{Sqrfree}\left(p\right)\right)$
 $\left[{t}{,}\left[\left[{x}{-}\sqrt{{t}}{}{y}{,}{1}\right]{,}\left[{x}{+}\frac{{1}}{\sqrt{{t}}}{,}{2}\right]\right]\right]$ (8)
 > $r≔\frac{{x}^{2}-2{y}^{2}}{{\left(x-\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-2\right)y\right)}^{3}}$
 ${r}{≔}\frac{{{x}}^{{2}}{-}{2}{}{{y}}^{{2}}}{{\left({x}{-}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{2}\right){}{y}\right)}^{{3}}}$ (9)
 > $\mathrm{evala}\left(\mathrm{Sqrfree}\left(r\right)\right)$
 $\left[{1}{,}\left[\left[{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{2}\right){}{y}{+}{x}{,}{1}\right]{,}\left[{x}{-}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{2}\right){}{y}{,}{-2}\right]\right]\right]$ (10)

If a polynomial defining a RootOf is reducible, the RootOf does not generate a well-defined field. In some cases, an error is returned:

 > $\mathrm{evala}\left(\mathrm{Sqrfree}\left({x}^{2}+\mathrm{RootOf}\left({x}^{2}-x\right)\right)\right)$

To pretend that all the defining polynomials are irreducible, use the option 'independent':

 > $\mathrm{evala}\left(\mathrm{Sqrfree}\left({x}^{2}+\mathrm{RootOf}\left({x}^{2}-x\right)\right),'\mathrm{independent}'\right)$
 $\left[{1}{,}\left[\left[{{x}}^{{2}}{+}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{\mathrm{_Z}}\right){,}{1}\right]\right]\right]$ (11)

Alternatively, use indexed RootOfs:

 > $\mathrm{evala}\left(\mathrm{Sqrfree}\left({x}^{2}+\mathrm{RootOf}\left({x}^{2}-x,\mathrm{index}=1\right)\right)\right)$
 $\left[{1}{,}\left[\left[{x}{,}{2}\right]\right]\right]$ (12)
 > $\mathrm{evala}\left(\mathrm{Sqrfree}\left({x}^{2}+\mathrm{RootOf}\left({x}^{2}-x,\mathrm{index}=2\right)\right)\right)$
 $\left[{1}{,}\left[\left[{{x}}^{{2}}{+}{1}{,}{1}\right]\right]\right]$ (13)