polytools(deprecated)/minpoly - Maple Help

polytools

 minpoly
 find minimum polynomial from an approximate root

 Calling Sequence minpoly(r, n) minpoly(r, n, acc)

Parameters

 r - approximate root n - degree of the polynomial sought acc - desired accuracy of the approximation

Description

 • Important: The polytools package has been deprecated. Use the superseding command PolynomialTools[MinimalPolynomial] instead.
 • The minpoly function uses the lattice algorithm to find a polynomial of degree n (or less) with small integer coefficients which has the given approximation r of an algebraic number as one of its roots.
 • The root r may be real or complex.  It may be input as a floating-point approximation to a root or as an exact algebraic number.  In the latter case, it will first be evaluated in floating-point at Digits precision.
 • If a third argument is specified, then the value $\mathrm{acc}\left|f\left(r\right)\right|$ is given the same weight as the coefficients in determining the polynomial. The default value for acc is 10^(Digits-2).

Examples

Important: The polytools package has been deprecated. Use the superseding command PolynomialTools[MinimalPolynomial] instead.

 > $\mathrm{with}\left(\mathrm{polytools}\right):$
 > $r≔\mathrm{evalf}\left(1+\sqrt{2}\right)$
 ${r}{≔}{2.414213562}$ (1)
 > $\mathrm{minpoly}\left(r,2\right)$
 ${{\mathrm{_X}}}^{{2}}{-}{2}{}{\mathrm{_X}}{-}{1}$ (2)
 > $r≔1+\sqrt{2}$
 ${r}{≔}{1}{+}\sqrt{{2}}$ (3)
 > $\mathrm{minpoly}\left(r,2\right)$
 ${{\mathrm{_X}}}^{{2}}{-}{2}{}{\mathrm{_X}}{-}{1}$ (4)
 > $\mathrm{minpoly}\left(1.234,3\right)$
 ${22}{}{{\mathrm{_X}}}^{{3}}{-}{5}{}{{\mathrm{_X}}}^{{2}}{+}{61}{}{\mathrm{_X}}{-}{109}$ (5)
 > $\mathrm{fsolve}\left(,\mathrm{_X}\right)$
 ${1.234000001}$ (6)
 > $r≔\mathrm{evalf}\left(\sqrt{2}+\sqrt{-3}\right)$
 ${r}{≔}{1.414213562}{+}{1.732050808}{}{I}$ (7)
 > $\mathrm{minpoly}\left(r,4\right)$
 ${{\mathrm{_X}}}^{{4}}{+}{2}{}{{\mathrm{_X}}}^{{2}}{+}{25}$ (8)