 roots - Maple Programming Help

roots

exact roots of a polynomial with respect to one variable

 Calling Sequence roots(a, x, K)

Parameters

 a - polynomial (either univariate or in x) K - (optional) algebraic number field extension x - (optional) polynomial variable

Description

 • The roots function computes the exact roots of a polynomial over the rationals or an algebraic number field. The roots are returned as a list of pairs of the form $[[\mathrm{r1},\mathrm{m1}],...,[\mathrm{rn},\mathrm{mn}]]$ where $\mathrm{ri}$ is a root of the polynomial a with multiplicity $\mathrm{mi}$, that is, ${\left(x-\mathrm{ri}\right)}^{\mathrm{mi}}$ divides a.
 • The call roots(a) returns roots over the field implied by the coefficients present.  For example, if all the coefficients are rational, then the rational roots are computed.  If a has no roots in the implied coefficient field, then an empty list is returned.  This assumes that a is a univariate polynomials.
 • The call roots(a, K) computes the roots of a over the algebraic number field defined by K. Here K must be a single RootOf, or a list or set of RootOfs, or a single radical, or a list or set of radicals.  For example, if I is given as the second argument, then roots looks for the roots of a over the complex rationals.
 • The calls roots(a, x) and roots(a, x, K) are equivalent to the above if a is univariate in x. Otherwise, it treats the other indeterminates in a as parameters, and finds all roots as above and ignoring symbolic roots.

Examples

 > $\mathrm{roots}\left(2{x}^{3}+11{x}^{2}+12x-9\right)$
 $\left[\left[{-3}{,}{2}\right]{,}\left[\frac{{1}}{{2}}{,}{1}\right]\right]$ (1)
 > $\mathrm{roots}\left({x}^{4}-4\right)$
 $\left[\right]$ (2)
 > $\mathrm{roots}\left({x}^{4}-4,x\right)$
 $\left[\right]$ (3)
 > $\mathrm{roots}\left({x}^{3}+\left(-6-b-a\right){x}^{2}+\left(6a+5+5b+ab\right)x-5a-5ab,x\right)$
 $\left[\left[{5}{,}{1}\right]\right]$ (4)
 > $\mathrm{roots}\left({x}^{4}-4,\mathrm{sqrt}\left(2\right)\right)$
 $\left[\left[\sqrt{{2}}{,}{1}\right]{,}\left[{-}\sqrt{{2}}{,}{1}\right]\right]$ (5)
 > $\mathrm{roots}\left({x}^{4}-4,\left\{I,\mathrm{sqrt}\left(2\right)\right\}\right)$
 $\left[\left[{-I}{}\sqrt{{2}}{,}{1}\right]{,}\left[{I}{}\sqrt{{2}}{,}{1}\right]{,}\left[\sqrt{{2}}{,}{1}\right]{,}\left[{-}\sqrt{{2}}{,}{1}\right]\right]$ (6)
 > $\mathrm{alias}\left(\mathrm{\alpha }=\mathrm{RootOf}\left({x}^{2}-2\right)\right):$
 > $\mathrm{alias}\left(\mathrm{\beta }=\mathrm{RootOf}\left({x}^{2}+2\right)\right):$
 > $\mathrm{roots}\left(\left({x}^{4}-4\right)\left(x-a\right),x,\mathrm{\alpha }\right)$
 $\left[\left[{-}{\mathrm{\alpha }}{,}{1}\right]{,}\left[{\mathrm{\alpha }}{,}{1}\right]\right]$ (7)
 > $\mathrm{roots}\left({x}^{4}-4,\left\{\mathrm{\alpha },\mathrm{\beta }\right\}\right)$
 $\left[\left[{-}{\mathrm{\beta }}{,}{1}\right]{,}\left[{-}{\mathrm{\alpha }}{,}{1}\right]{,}\left[{\mathrm{\beta }}{,}{1}\right]{,}\left[{\mathrm{\alpha }}{,}{1}\right]\right]$ (8)