convert/ratpoly
convert series to a rational polynomial
Calling Sequence
Parameters
Description
Examples
References
convert(series, ratpoly, numdeg, dendeg)
series
-
series; type laurent or a Chebyshev series
numdeg
(optional) integer; specify numerator degree
dendeg
(optional) integer; specify denominator degree
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⁡k,x 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 dendeg+v<0. If v>numdeg≥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=order⁡series and either m=n or m=n+1 (otherwise, if v>0, then always m≥v, and if v<0, then n≥−v and m+n+1+v=order⁡series). 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.
s≔series⁡exp⁡x,x
s≔1+x+12⁢x2+16⁢x3+124⁢x4+1120⁢x5+O⁡x6
convert⁡s,ratpoly
1+35⁢x+320⁢x2+160⁢x31−25⁢x+120⁢x2
convert⁡s,ratpoly,2,3
1+25⁢x+120⁢x21−35⁢x+320⁢x2−160⁢x3
convert⁡s,ratpoly,3,3
Error, (in `convert/ratpoly`) series order too small for specified degrees
t≔series⁡exp⁡x⁢x4,x,7
t≔x4+x5+12⁢x6+O⁡x7
convert⁡t,ratpoly,3,3
0
convert⁡t,ratpoly,4,2
x41−x+12⁢x2
Note that the degrees are not balanced in the following case.
convert⁡t,ratpoly
u≔series⁡exp⁡xx3,x
u≔x−3+x−2+12⁢x−1+16+124⁢x+1120⁢x2+O⁡x3
convert⁡u,ratpoly,2,3
1+x+12⁢x2x3
convert⁡u,ratpoly,3,2
Error, (in `convert/ratpoly`) no rational approximation with denominator degree <= 2
convert⁡u,ratpoly
1+45⁢x+310⁢x2+115⁢x3+1120⁢x4−15⁢x4+x3
Digits≔5:
numapproxchebyshev⁡cos⁡x,x
0.76520⁢T⁡0,x−0.22981⁢T⁡2,x+0.0049533⁢T⁡4,x−0.000041877⁢T⁡6,x
convert⁡,ratpoly,2,2
0.76025⁢T⁡0,x−0.19673⁢T⁡2,xT⁡0,x+0.043088⁢T⁡2,x
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.
See Also
convert
convert/confrac
numapprox[pade]
type/laurent
Download Help Document