Continued Fraction Polynomial - Maple Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : Mathematics : Number Theory : Continued Fraction Polynomial

NumberTheory

 ContinuedFractionPolynomial
 simple continued fraction expansions for real roots of a rational polynomial

 Calling Sequence ContinuedFractionPolynomial(p, n) ContinuedFractionPolynomial(p) ContinuedFractionPolynomial(p, n, root = rootopt) ContinuedFractionPolynomial(p, root = rootopt)

Parameters

 p - polynomial with rational or real floating point coefficients n - positive integer root = rootopt - (optional) keyword argument where rootopt is a root of p

Description

 • The ContinuedFractionPolynomial(p, n) command computes simple continued fraction expansions for the real roots of p, up to the nth term.
 • For ContinuedFractionPolynomial(p), the simple continued fraction expansions for the real roots of p are calculated up to the $10$th term.
 • If rootopt is not given, then an expansion for each real root is returned. If rootopt is given, then only the expansion for rootopt is returned.

Examples

 > $\mathrm{with}\left(\mathrm{NumberTheory}\right):$
 > $\mathrm{ContinuedFractionPolynomial}\left({x}^{4}-{x}^{3}-4{x}^{2}+4x+1,20\right)$
 $\left[\left[{-2}{,}{22}{,}{1}{,}{7}{,}{2}{,}{1}{,}{1}{,}{2}{,}{1}{,}{2}{,}{1}{,}{17}{,}{4}{,}{4}{,}{1}{,}{1}{,}{4}{,}{2}{,}{18}{,}{1}{,}{10}\right]{,}\left[{-1}{,}{1}{,}{3}{,}{1}{,}{3}{,}{1}{,}{1}{,}{1}{,}{1}{,}{1}{,}{1}{,}{4}{,}{1}{,}{1}{,}{1}{,}{4}{,}{1}{,}{2}{,}{4}{,}{5}{,}{18}\right]{,}\left[{1}{,}{2}{,}{1}{,}{21}{,}{1}{,}{7}{,}{2}{,}{1}{,}{1}{,}{2}{,}{1}{,}{2}{,}{1}{,}{17}{,}{4}{,}{4}{,}{1}{,}{1}{,}{4}{,}{2}{,}{18}\right]{,}\left[{1}{,}{1}{,}{4}{,}{1}{,}{3}{,}{1}{,}{1}{,}{1}{,}{1}{,}{1}{,}{1}{,}{4}{,}{1}{,}{1}{,}{1}{,}{4}{,}{1}{,}{2}{,}{4}{,}{5}{,}{18}\right]\right]$ (1)
 > $\mathrm{ContinuedFractionPolynomial}\left({x}^{2}-2\right)$
 $\left[\left[{-2}{,}{1}{,}{1}{,}{2}{,}{2}{,}{2}{,}{2}{,}{2}{,}{2}{,}{2}{,}{2}\right]{,}\left[{1}{,}{2}{,}{2}{,}{2}{,}{2}{,}{2}{,}{2}{,}{2}{,}{2}{,}{2}{,}{2}\right]\right]$ (2)
 > $\mathrm{ContinuedFractionPolynomial}\left({x}^{2}-2,\mathrm{root}=\mathrm{sqrt}\left(2\right)\right)$
 $\left[{1}{,}{2}{,}{2}{,}{2}{,}{2}{,}{2}{,}{2}{,}{2}{,}{2}{,}{2}{,}{2}\right]$ (3)

Compatibility

 • The NumberTheory[ContinuedFractionPolynomial] command was introduced in Maple 2016.
 • For more information on Maple 2016 changes, see Updates in Maple 2016.

 See Also