generate polynomial - Maple Help

Home : Support : Online Help : Mathematics : Algebra : Polynomials : generate polynomial

genpoly

generate polynomial from integer n by Z-adic expansion

 Calling Sequence genpoly(n, b, x);

Parameters

 n - integer or polynomial with integer coefficients b - integer x - variable name

Description

 • genpoly computes the unique polynomial $a\left(x\right)$ over $ℤ\left[x\right]$ from the integer n with coefficients less than $\frac{b}{2}$ in magnitude such that  $\mathrm{subs}\left(x=b,a\left(x\right)\right)=n$.
 • This is directly related to b-adic expansion of an integer. If the base-b representation of the integer n is ${c}_{0}+{c}_{1}b+\cdots +{c}_{k}{b}^{k}$ where ${c}_{i}$ are integers modulo b (using symmetric representation) then the polynomial generated is ${c}_{0}+{c}_{1}x+\cdots +{c}_{k}{x}^{k}$.
 • If n is a polynomial with integer coefficients then each integer coefficient is expanded into a polynomial.  This polynomial, n, must be in fully expanded form.

 > $\mathrm{genpoly}\left(11,5,x\right)$
 ${1}{+}{2}{}{x}$ (1)
 > $\mathrm{genpoly}\left(11{y}^{2}-13y+21,5,x\right)$
 $\left({1}{+}{2}{}{x}\right){}{{y}}^{{2}}{+}\left({-}{{x}}^{{2}}{+}{2}{}{x}{+}{2}\right){}{y}{+}{{x}}^{{2}}{-}{x}{+}{1}$ (2)