 Is Cyclotomic Polynomial - Maple Help

Home : Support : Online Help : Mathematics : Number Theory : Queries : Is Cyclotomic Polynomial

NumberTheory

 IsCyclotomicPolynomial
 test whether a polynomial is cyclotomic Calling Sequence IsCyclotomicPolynomial(p, x) IsCyclotomicPolynomial(p, x, output_opt) Parameters

 p - univariate polynomial in x x - name output_opt - (optional) an equation of the form output = result, output = order, output = [result, order], or output = [order, result]; the default is output = result Description

 • The IsCyclotomicPolynomial function determines whether p is a cyclotomic polynomial, and, optionally, the order of p if p is cyclotomic.
 • The IsCyclotomicPolynomial(p, x) calling sequence returns true if p(x) is a cyclotomic polynomial, and false otherwise.
 • Use output_opt to specify whether to return the result, the order, or both:
 – output = result: Returns true if p is cyclotomic and false otherwise. This is the default behavior for IsCyclotomicPolynomial.
 – output = order: Returns the order of p as a cyclotomic polynomial if p is cyclotomic. Returns FAIL otherwise.
 – output = [result, order] (or output = [order, result]): Returns an expression sequence with result and then order (or with order and then result).
 • If p is the nth cyclotomic polynomial, then p is said to be the order of n. Examples

 > $\mathrm{with}\left(\mathrm{NumberTheory}\right):$
 > $\mathrm{CyclotomicPolynomial}\left(2,x\right)$
 ${x}{+}{1}$ (1)

By default

 > $\mathrm{IsCyclotomicPolynomial}\left(x+1,x\right)$
 ${\mathrm{true}}$ (2)
 > $\mathrm{IsCyclotomicPolynomial}\left(x+2,x\right)$
 ${\mathrm{false}}$ (3)
 > $\mathrm{IsCyclotomicPolynomial}\left(x-\frac{1}{2},x,\mathrm{output}=\mathrm{order}\right)$
 ${\mathrm{FAIL}}$ (4)
 > $\mathrm{IsCyclotomicPolynomial}\left(\mathrm{CyclotomicPolynomial}\left(33,x\right),x,\mathrm{output}=\left[\mathrm{result},\mathrm{order}\right]\right)$
 ${\mathrm{true}}{,}{33}$ (5)
 > $p≔\mathrm{CyclotomicPolynomial}\left(7,x\right)$
 ${p}{≔}{{x}}^{{6}}{+}{{x}}^{{5}}{+}{{x}}^{{4}}{+}{{x}}^{{3}}{+}{{x}}^{{2}}{+}{x}{+}{1}$ (6)
 > $\mathrm{zeroes}≔\left[\mathrm{solve}\left(p=0,x\right)\right]:$
 > $q≔\mathrm{mul}\left(x-\mathrm{zeroes}\left[i\right],i=1..6\right)$
 ${q}{≔}\left({x}{-}{\mathrm{cos}}{}\left(\frac{{2}{}{\mathrm{\pi }}}{{7}}\right){-}{I}{}{\mathrm{sin}}{}\left(\frac{{2}{}{\mathrm{\pi }}}{{7}}\right)\right){}\left({x}{+}{\mathrm{cos}}{}\left(\frac{{3}{}{\mathrm{\pi }}}{{7}}\right){-}{I}{}{\mathrm{sin}}{}\left(\frac{{3}{}{\mathrm{\pi }}}{{7}}\right)\right){}\left({x}{+}{\mathrm{cos}}{}\left(\frac{{\mathrm{\pi }}}{{7}}\right){-}{I}{}{\mathrm{sin}}{}\left(\frac{{\mathrm{\pi }}}{{7}}\right)\right){}\left({x}{+}{\mathrm{cos}}{}\left(\frac{{\mathrm{\pi }}}{{7}}\right){+}{I}{}{\mathrm{sin}}{}\left(\frac{{\mathrm{\pi }}}{{7}}\right)\right){}\left({x}{+}{\mathrm{cos}}{}\left(\frac{{3}{}{\mathrm{\pi }}}{{7}}\right){+}{I}{}{\mathrm{sin}}{}\left(\frac{{3}{}{\mathrm{\pi }}}{{7}}\right)\right){}\left({x}{-}{\mathrm{cos}}{}\left(\frac{{2}{}{\mathrm{\pi }}}{{7}}\right){+}{I}{}{\mathrm{sin}}{}\left(\frac{{2}{}{\mathrm{\pi }}}{{7}}\right)\right)$ (7)
 > $\mathrm{IsCyclotomicPolynomial}\left(q,x\right)$
 ${\mathrm{true}}$ (8) Compatibility

 • The NumberTheory[IsCyclotomicPolynomial] command was introduced in Maple 2016.