numapprox
chebsort
sort the terms in a Chebyshev series
Calling Sequence
Parameters
Description
Examples
chebsort(e)
e
-
expression assumed to be a Chebyshev series
The input expression e is assumed to be a polynomial expressed in terms of a Chebyshev basis T⁡0,x,....
First the expression e is collected in 'T'. Then the terms in the collected polynomial expression are sorted in ``Chebyshev order''; i.e. the T⁡k,x basis polynomials are ordered in ascending order with respect to the first argument.
If some basis polynomials T⁡k,x have non-numeric first argument then ordering will be attempted using the ``is'' predicate. If that is not successful then ordering is performed only with respect to numeric first arguments (other terms are left as trailing terms).
Note that chebsort is a destructive operation because it invokes the Maple sort function (see sort); i.e. the input expression is sorted ``in-place''.
The command with(numapprox,chebsort) allows the use of the abbreviated form of this command.
with⁡numapprox:
Digits≔3:
a≔chebyshev⁡sin⁡x,x:
b≔chebyshev⁡cos⁡x,x:
c≔a+b
c≔0.880⁢T⁡1,x−0.0391⁢T⁡3,x+0.000500⁢T⁡5,x+0.765⁢T⁡0,x−0.230⁢T⁡2,x+0.00495⁢T⁡4,x
chebsort⁡c
0.765⁢T⁡0,x+0.880⁢T⁡1,x−0.230⁢T⁡2,x−0.0391⁢T⁡3,x+0.00495⁢T⁡4,x+0.000500⁢T⁡5,x
assume⁡5<j,j<k
d≔1.2⁢y+cj⁢T⁡j,x+a+ck⁢T⁡k,x
d≔1.2⁢y+cj⁢T⁡j~,x+0.880⁢T⁡1,x−0.0391⁢T⁡3,x+0.000500⁢T⁡5,x+ck⁢T⁡k~,x
chebsort⁡d
0.880⁢T⁡1,x−0.0391⁢T⁡3,x+0.000500⁢T⁡5,x+cj⁢T⁡j~,x+ck⁢T⁡k~,x+1.2⁢y
See Also
collect
is
numapprox[chebyshev]
orthopoly[T]
sort
Download Help Document