chebsort - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


numapprox

  

chebsort

  

sort the terms in a Chebyshev series

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

chebsort(e)

Parameters

e

-

expression assumed to be a Chebyshev series

Description

• 

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.

Examples

> 

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

(1)
> 

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

(2)
> 

assume⁡5<j&comma;j<k

> 

d≔1.2⁢y+cj⁢T⁡j&comma;x+a+ck⁢T⁡k&comma;x

d≔1.2⁢y+cj⁢T⁡j~&comma;x+0.880⁢T⁡1&comma;x−0.0391⁢T⁡3&comma;x+0.000500⁢T⁡5&comma;x+ck⁢T⁡k~&comma;x

(3)
> 

chebsort⁡d

0.880⁢T⁡1&comma;x−0.0391⁢T⁡3&comma;x+0.000500⁢T⁡5&comma;x+cj⁢T⁡j~&comma;x+ck⁢T⁡k~&comma;x+1.2⁢y

(4)

See Also

collect

is

numapprox[chebyshev]

orthopoly[T]

sort