Roots - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

# Online Help

###### All Products    Maple    MapleSim

Roots

roots of a polynomial mod n

 Calling Sequence Roots(a) Roots(a, K)

Parameters

 a - univariate polynomial K - RootOf

Description

 • The Roots function is a placeholder for representing the roots of the univariate polynomial a. The roots are returned as a list of pairs of the form $[[{r}_{1},{m}_{1}],...,[{r}_{n},{m}_{n}]]$ where ${r}_{k}$ is a root and ${m}_{k}$ its multiplicity, that is, ${\left(x-{r}_{k}\right)}^{{m}_{k}}$ divides a.
 • The call Roots(a) mod n computes the roots of the polynomial a modulo n.
 • The call Roots(a,K) mod p computes the roots over the finite field defined by K an algebraic extension of the integers mod p where K is a RootOf.
 • The call modp1(Roots(a), p) computes the roots of the polynomial a in the $\mathrm{modp1}$ representation modulo the prime integer p.

Examples

 > $\mathrm{Roots}\left({x}^{3}-x\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}6$
 $\left[\left[{0}{,}{1}\right]{,}\left[{1}{,}{1}\right]{,}\left[{2}{,}{1}\right]{,}\left[{3}{,}{1}\right]{,}\left[{4}{,}{1}\right]{,}\left[{5}{,}{1}\right]\right]$ (1)
 > $\mathrm{Roots}\left({x}^{3}-1\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}2$
 $\left[\left[{1}{,}{1}\right]\right]$ (2)
 > $\mathrm{alias}\left(\mathrm{\alpha }=\mathrm{RootOf}\left({x}^{2}+x+1\right)\right):$
 > $\mathrm{Roots}\left({x}^{3}-1,\mathrm{\alpha }\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}2$
 $\left[\left[{1}{,}{1}\right]{,}\left[{\mathrm{\alpha }}{+}{1}{,}{1}\right]{,}\left[{\mathrm{\alpha }}{,}{1}\right]\right]$ (3)

 See Also