rational polynomials - Maple Help

convert/ratpoly

convert series to a rational polynomial

 Calling Sequence convert(series, ratpoly, numdeg, dendeg)

Parameters

 series - series; type laurent or a Chebyshev series numdeg - (optional) integer; specify numerator degree dendeg - (optional) integer; specify denominator degree

Description

 • The convert/ratpoly function converts a series to a rational polynomial (rational function). If the first argument is a Taylor or Laurent series then the result is a Pade approximation, and if it is a Chebyshev series then the result is a Chebyshev-Pade approximation.
 • The first argument must be either of type laurent (hence a Laurent series) or else a Chebyshev series (represented as a sum of products in terms of the basis functions $T\left(k,x\right)$ for integers $k$).
 • If the third and fourth arguments appear, they must be integers specifying the desired degrees of numerator and denominator, respectively. (Note:  The actual degrees appearing in the approximant may be less than specified if there exists no approximant of the specified degrees). If the lowest degree $v$ appearing in the series is negative, then the denominator of every rational approximation has degree at least $-v$, and an error is raised if $\mathrm{dendeg}+v<0$. If $v>\mathrm{numdeg}\ge 0$, the return value is $0$.
 • If the third and fourth arguments are not specified, then if $v=0$ the degrees of numerator and denominator are chosen to be $m$ and $n$, respectively, such that $m+n+1=\mathrm{order}\left(\mathrm{series}\right)$ and either $m=n$ or $m=n+1$ (otherwise, if $v>0$, then always $m\ge v$, and if $v<0$, then $n\ge -v$ and $m+n+1+v=\mathrm{order}\left(\mathrm{series}\right)$). The order of a Chebyshev series is defined to be $d+1$ where $d$ is the highest-degree term which appears.
 • For the Pade case, two different algorithms are implemented. For the pure univariate case where the coefficients contain no indeterminates and no floating-point numbers, a fast'' algorithm due to Cabay and Choi is used. Otherwise, an algorithm due to Geddes based on fraction-free symmetric Gaussian elimination is used.
 • For the Chebyshev-Pade case, the method used is based on transforming the Chebyshev series to a power series with the same coefficients, computing a Pade approximation for the power series, and then converting back to the appropriate Chebyshev-Pade approximation.

Examples

 > $s≔\mathrm{series}\left(\mathrm{exp}\left(x\right),x\right)$
 ${s}{≔}{1}{+}{x}{+}\frac{{1}}{{2}}{}{{x}}^{{2}}{+}\frac{{1}}{{6}}{}{{x}}^{{3}}{+}\frac{{1}}{{24}}{}{{x}}^{{4}}{+}\frac{{1}}{{120}}{}{{x}}^{{5}}{+}{O}{}\left({{x}}^{{6}}\right)$ (1)
 > $\mathrm{convert}\left(s,\mathrm{ratpoly}\right)$
 $\frac{{1}{+}\frac{{3}}{{5}}{}{x}{+}\frac{{3}}{{20}}{}{{x}}^{{2}}{+}\frac{{1}}{{60}}{}{{x}}^{{3}}}{{1}{-}\frac{{2}}{{5}}{}{x}{+}\frac{{1}}{{20}}{}{{x}}^{{2}}}$ (2)
 > $\mathrm{convert}\left(s,\mathrm{ratpoly},2,3\right)$
 $\frac{{1}{+}\frac{{2}}{{5}}{}{x}{+}\frac{{1}}{{20}}{}{{x}}^{{2}}}{{1}{-}\frac{{3}}{{5}}{}{x}{+}\frac{{3}}{{20}}{}{{x}}^{{2}}{-}\frac{{1}}{{60}}{}{{x}}^{{3}}}$ (3)
 > $\mathrm{convert}\left(s,\mathrm{ratpoly},3,3\right)$
 > $t≔\mathrm{series}\left(\mathrm{exp}\left(x\right){x}^{4},x,7\right)$
 ${t}{≔}{{x}}^{{4}}{+}{{x}}^{{5}}{+}\frac{{1}}{{2}}{}{{x}}^{{6}}{+}{O}{}\left({{x}}^{{7}}\right)$ (4)
 > $\mathrm{convert}\left(t,\mathrm{ratpoly},3,3\right)$
 ${0}$ (5)
 > $\mathrm{convert}\left(t,\mathrm{ratpoly},4,2\right)$
 $\frac{{{x}}^{{4}}}{{1}{-}{x}{+}\frac{{1}}{{2}}{}{{x}}^{{2}}}$ (6)

Note that the degrees are not balanced in the following case.

 > $\mathrm{convert}\left(t,\mathrm{ratpoly}\right)$
 $\frac{{{x}}^{{4}}}{{1}{-}{x}{+}\frac{{1}}{{2}}{}{{x}}^{{2}}}$ (7)
 > $u≔\mathrm{series}\left(\frac{\mathrm{exp}\left(x\right)}{{x}^{3}},x\right)$
 ${u}{≔}{{x}}^{{-3}}{+}{{x}}^{{-2}}{+}\frac{{1}}{{2}}{}{{x}}^{{-1}}{+}\frac{{1}}{{6}}{+}\frac{{1}}{{24}}{}{x}{+}\frac{{1}}{{120}}{}{{x}}^{{2}}{+}{O}{}\left({{x}}^{{3}}\right)$ (8)
 > $\mathrm{convert}\left(u,\mathrm{ratpoly},2,3\right)$
 $\frac{{1}{+}{x}{+}\frac{{1}}{{2}}{}{{x}}^{{2}}}{{{x}}^{{3}}}$ (9)
 > $\mathrm{convert}\left(u,\mathrm{ratpoly},3,2\right)$
 > $\mathrm{convert}\left(u,\mathrm{ratpoly}\right)$
 $\frac{{1}{+}\frac{{4}}{{5}}{}{x}{+}\frac{{3}}{{10}}{}{{x}}^{{2}}{+}\frac{{1}}{{15}}{}{{x}}^{{3}}{+}\frac{{1}}{{120}}{}{{x}}^{{4}}}{{-}\frac{{1}}{{5}}{}{{x}}^{{4}}{+}{{x}}^{{3}}}$ (10)
 > $\mathrm{Digits}≔5:$
 > $\mathrm{numapprox}\left[\mathrm{chebyshev}\right]\left(\mathrm{cos}\left(x\right),x\right)$
 ${0.76520}{}{T}{}\left({0}{,}{x}\right){-}{0.22981}{}{T}{}\left({2}{,}{x}\right){+}{0.0049533}{}{T}{}\left({4}{,}{x}\right){-}{0.000041877}{}{T}{}\left({6}{,}{x}\right)$ (11)
 > $\mathrm{convert}\left(,\mathrm{ratpoly},2,2\right)$
 $\frac{{0.76025}{}{T}{}\left({0}{,}{x}\right){-}{0.19673}{}{T}{}\left({2}{,}{x}\right)}{{T}{}\left({0}{,}{x}\right){+}{0.043088}{}{T}{}\left({2}{,}{x}\right)}$ (12)

References

 Cabay, S., and Choi, D. K. "Algebraic Computations of Scaled Pade Fractions." SIAM J. Comput. Vol. 15(1), (Feb. 1986): 243-270.
 Geddes, K. O. "Block Structure in the Chebyshev-Pade Table." SIAM J. Numer. Anal. Vol. 18(5), (Oct. 1981): 844-861.
 Geddes, K. O. "Symbolic Computation of Pade Approximants." ACM Trans. Math. Software, Vol. 5(2), (June 1979): 218-233.