 chebsort - Maple Help

numapprox

 chebsort
 sort the terms in a Chebyshev series 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\left(0,x\right),...$.
 • 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\left(k,x\right)$ basis polynomials are ordered in ascending order with respect to the first argument.
 • If some basis polynomials $T\left(k,x\right)$ 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

 > $\mathrm{with}\left(\mathrm{numapprox}\right):$
 > $\mathrm{Digits}≔3:$
 > $a≔\mathrm{chebyshev}\left(\mathrm{sin}\left(x\right),x\right):$
 > $b≔\mathrm{chebyshev}\left(\mathrm{cos}\left(x\right),x\right):$
 > $c≔a+b$
 ${c}{≔}{0.880}{}{T}{}\left({1}{,}{x}\right){-}{0.0391}{}{T}{}\left({3}{,}{x}\right){+}{0.000500}{}{T}{}\left({5}{,}{x}\right){+}{0.765}{}{T}{}\left({0}{,}{x}\right){-}{0.230}{}{T}{}\left({2}{,}{x}\right){+}{0.00495}{}{T}{}\left({4}{,}{x}\right)$ (1)
 > $\mathrm{chebsort}\left(c\right)$
 ${0.765}{}{T}{}\left({0}{,}{x}\right){+}{0.880}{}{T}{}\left({1}{,}{x}\right){-}{0.230}{}{T}{}\left({2}{,}{x}\right){-}{0.0391}{}{T}{}\left({3}{,}{x}\right){+}{0.00495}{}{T}{}\left({4}{,}{x}\right){+}{0.000500}{}{T}{}\left({5}{,}{x}\right)$ (2)
 > $\mathrm{assume}\left(5
 > $d≔1.2y+\mathrm{cj}T\left(j,x\right)+a+\mathrm{ck}T\left(k,x\right)$
 ${d}{≔}{1.2}{}{y}{+}{\mathrm{cj}}{}{T}{}\left({\mathrm{j~}}{,}{x}\right){+}{0.880}{}{T}{}\left({1}{,}{x}\right){-}{0.0391}{}{T}{}\left({3}{,}{x}\right){+}{0.000500}{}{T}{}\left({5}{,}{x}\right){+}{\mathrm{ck}}{}{T}{}\left({\mathrm{k~}}{,}{x}\right)$ (3)
 > $\mathrm{chebsort}\left(d\right)$
 ${0.880}{}{T}{}\left({1}{,}{x}\right){-}{0.0391}{}{T}{}\left({3}{,}{x}\right){+}{0.000500}{}{T}{}\left({5}{,}{x}\right){+}{\mathrm{cj}}{}{T}{}\left({\mathrm{j~}}{,}{x}\right){+}{\mathrm{ck}}{}{T}{}\left({\mathrm{k~}}{,}{x}\right){+}{1.2}{}{y}$ (4)