chebdeg - Maple Help

numapprox

 chebdeg
 degree of a polynomial in Chebyshev form

 Calling Sequence chebdeg(p)

Parameters

 p - expression assumed to be a Chebyshev series

Description

 • Given a polynomial p expressed as a Chebyshev series, determine the degree of the polynomial (i.e. the largest k such that $T\left(k,x\right)$ appears as a basis polynomial).
 • All Chebyshev basis polynomials $T\left(k,x\right)$ which appear must have the same second argument x (which can be any expression).
 • The input polynomial must be in expanded form (i.e. a sum of products). Normally, each term in the sum contains one and only one $T\left(k,x\right)$ factor except that if there are terms in the sum containing no $T\left(k,x\right)$ factor then each such term t is interpreted to represent $tT\left(0,x\right)$ (i.e. it is assumed to be a term of degree 0).
 • The command with(numapprox,chebdeg) 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{chebdeg}\left(c\right)$
 ${5}$ (2)
 > $d≔a+\mathrm{cj}T\left(j,x\right)+\mathrm{ck}T\left(k,x\right)$
 ${d}{≔}{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({j}{,}{x}\right){+}{\mathrm{ck}}{}{T}{}\left({k}{,}{x}\right)$ (3)
 > $\mathrm{chebdeg}\left(d\right)$
 ${\mathrm{max}}{}\left({5}{,}{j}{,}{k}\right)$ (4)
 > $\mathrm{assume}\left(5
 > $e≔1.2y+\mathrm{cj}T\left(j,x\right)+a+\mathrm{ck}T\left(k,x\right)$
 ${e}{≔}{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)$ (5)
 > $\mathrm{chebdeg}\left(e\right)$
 ${\mathrm{j~}}$ (6)