ChangeBasis - Maple Help

OrthogonalSeries

 ChangeBasis
 change the expansion basis of a series

 Calling Sequence ChangeBasis(p, P1,.., Pk) ChangeBasis(S, P1,.., Pk)

Parameters

 p - polynomial expression S - orthogonal series P1, .., Pk - classical orthogonal polynomials

Description

 • The ChangeBasis(p, P1, .., Pk) calling sequence creates a series expanded in terms of the polynomials P1, .., Pk that is equal to the polynomial p. The polynomials P1, .., Pk must have distinct indices and variables, and be in the OrthogonalSeries database.
 • The ChangeBasis(S, P1, .., Pk) calling sequence replaces each polynomial in S by the polynomial Pi that depends on the same variable if it exists. If multiple polynomials Pi, .., Pj share the same variable, the last one is used.
 • If the series S is infinite, the change of polynomial is not necessarily possible for every Pi. For infinite series, the ChangeBasis routine attempts an iterated derivative representation transform to perform the change of polynomials. If the process fails for some Pi, it is ignored and a warning message is printed.

Examples

 > $\mathrm{with}\left(\mathrm{OrthogonalSeries}\right):$
 > $S≔\mathrm{ChangeBasis}\left(1+2x+3{x}^{3},\mathrm{GegenbauerC}\left(n,1,x\right)\right)$
 ${S}{≔}{\mathrm{GegenbauerC}}{}\left({0}{,}{1}{,}{x}\right){+}\frac{{7}{}{\mathrm{GegenbauerC}}{}\left({1}{,}{1}{,}{x}\right)}{{4}}{+}\frac{{3}{}{\mathrm{GegenbauerC}}{}\left({3}{,}{1}{,}{x}\right)}{{8}}$ (1)
 > $\mathrm{ChangeBasis}\left(S,\mathrm{LaguerreL}\left(n,\frac{2}{3},x\right)\right)$
 $\frac{{479}{}{\mathrm{LaguerreL}}{}\left({0}{,}\frac{{2}}{{3}}{,}{x}\right)}{{9}}{-}{90}{}{\mathrm{LaguerreL}}{}\left({1}{,}\frac{{2}}{{3}}{,}{x}\right){+}{66}{}{\mathrm{LaguerreL}}{}\left({2}{,}\frac{{2}}{{3}}{,}{x}\right){-}{18}{}{\mathrm{LaguerreL}}{}\left({3}{,}\frac{{2}}{{3}}{,}{x}\right)$ (2)
 > $\mathrm{S1}≔\mathrm{ChangeBasis}\left({y}^{2}+{x}^{2}-1,\mathrm{ChebyshevU}\left(m,y\right),\mathrm{LaguerreL}\left(n,1,x\right)\right)$
 ${\mathrm{S1}}{≔}\frac{{21}{}{\mathrm{ChebyshevU}}{}\left({0}{,}{y}\right){}{\mathrm{LaguerreL}}{}\left({0}{,}{1}{,}{x}\right)}{{4}}{-}{6}{}{\mathrm{ChebyshevU}}{}\left({0}{,}{y}\right){}{\mathrm{LaguerreL}}{}\left({1}{,}{1}{,}{x}\right){+}{2}{}{\mathrm{ChebyshevU}}{}\left({0}{,}{y}\right){}{\mathrm{LaguerreL}}{}\left({2}{,}{1}{,}{x}\right){+}\frac{{\mathrm{ChebyshevU}}{}\left({2}{,}{y}\right){}{\mathrm{LaguerreL}}{}\left({0}{,}{1}{,}{x}\right)}{{4}}$ (3)
 > $\mathrm{ChangeBasis}\left(\mathrm{S1},\mathrm{ChebyshevU}\left(n,x\right),\mathrm{LaguerreL}\left(m,1,y\right)\right)$
 $\frac{{21}{}{\mathrm{LaguerreL}}{}\left({0}{,}{1}{,}{y}\right){}{\mathrm{ChebyshevU}}{}\left({0}{,}{x}\right)}{{4}}{+}\frac{{\mathrm{LaguerreL}}{}\left({0}{,}{1}{,}{y}\right){}{\mathrm{ChebyshevU}}{}\left({2}{,}{x}\right)}{{4}}{-}{6}{}{\mathrm{LaguerreL}}{}\left({1}{,}{1}{,}{y}\right){}{\mathrm{ChebyshevU}}{}\left({0}{,}{x}\right){+}{2}{}{\mathrm{LaguerreL}}{}\left({2}{,}{1}{,}{y}\right){}{\mathrm{ChebyshevU}}{}\left({0}{,}{x}\right)$ (4)
 > $\mathrm{ChangeBasis}\left(\mathrm{S1},\mathrm{Kravchouk}\left(n,\frac{2}{7},N,x\right),\mathrm{LaguerreL}\left(m,1,y\right)\right)$
 $\left({5}{+}\frac{{4}}{{49}}{}{{N}}^{{2}}{+}\frac{{10}}{{49}}{}{N}\right){}{\mathrm{LaguerreL}}{}\left({0}{,}{1}{,}{y}\right){}{\mathrm{Kravchouk}}{}\left({0}{,}\frac{{2}}{{7}}{,}{N}{,}{x}\right){+}\left(\frac{{4}{}{N}}{{7}}{+}\frac{{3}}{{7}}\right){}{\mathrm{LaguerreL}}{}\left({0}{,}{1}{,}{y}\right){}{\mathrm{Kravchouk}}{}\left({1}{,}\frac{{2}}{{7}}{,}{N}{,}{x}\right){+}{2}{}{\mathrm{LaguerreL}}{}\left({0}{,}{1}{,}{y}\right){}{\mathrm{Kravchouk}}{}\left({2}{,}\frac{{2}}{{7}}{,}{N}{,}{x}\right){-}{6}{}{\mathrm{LaguerreL}}{}\left({1}{,}{1}{,}{y}\right){}{\mathrm{Kravchouk}}{}\left({0}{,}\frac{{2}}{{7}}{,}{N}{,}{x}\right){+}{2}{}{\mathrm{LaguerreL}}{}\left({2}{,}{1}{,}{y}\right){}{\mathrm{Kravchouk}}{}\left({0}{,}\frac{{2}}{{7}}{,}{N}{,}{x}\right)$ (5)
 > $\mathrm{ChangeBasis}\left(\left(\mathrm{sum}\left({x}^{k},k=0..5\right)\right)\left(\mathrm{sum}\left({y}^{k},k=0..5\right)\right),\mathrm{ChebyshevT}\left(n,x\right),\mathrm{ChebyshevT}\left(m,y\right)\right)$
 $\frac{{\mathrm{ChebyshevT}}{}\left({4}{,}{x}\right){}{\mathrm{ChebyshevT}}{}\left({2}{,}{y}\right)}{{8}}{+}\frac{{9}{}{\mathrm{ChebyshevT}}{}\left({4}{,}{x}\right){}{\mathrm{ChebyshevT}}{}\left({3}{,}{y}\right)}{{128}}{+}\frac{{\mathrm{ChebyshevT}}{}\left({4}{,}{x}\right){}{\mathrm{ChebyshevT}}{}\left({4}{,}{y}\right)}{{64}}{+}\frac{{\mathrm{ChebyshevT}}{}\left({4}{,}{x}\right){}{\mathrm{ChebyshevT}}{}\left({5}{,}{y}\right)}{{128}}{+}\frac{{15}{}{\mathrm{ChebyshevT}}{}\left({5}{,}{x}\right){}{\mathrm{ChebyshevT}}{}\left({0}{,}{y}\right)}{{128}}{+}\frac{{19}{}{\mathrm{ChebyshevT}}{}\left({5}{,}{x}\right){}{\mathrm{ChebyshevT}}{}\left({1}{,}{y}\right)}{{128}}{+}\frac{{\mathrm{ChebyshevT}}{}\left({5}{,}{x}\right){}{\mathrm{ChebyshevT}}{}\left({2}{,}{y}\right)}{{16}}{+}\frac{{9}{}{\mathrm{ChebyshevT}}{}\left({5}{,}{x}\right){}{\mathrm{ChebyshevT}}{}\left({3}{,}{y}\right)}{{256}}{+}\frac{{\mathrm{ChebyshevT}}{}\left({5}{,}{x}\right){}{\mathrm{ChebyshevT}}{}\left({4}{,}{y}\right)}{{128}}{+}\frac{{\mathrm{ChebyshevT}}{}\left({5}{,}{x}\right){}{\mathrm{ChebyshevT}}{}\left({5}{,}{y}\right)}{{256}}{+}\frac{{225}{}{\mathrm{ChebyshevT}}{}\left({0}{,}{x}\right){}{\mathrm{ChebyshevT}}{}\left({0}{,}{y}\right)}{{64}}{+}\frac{{285}{}{\mathrm{ChebyshevT}}{}\left({0}{,}{x}\right){}{\mathrm{ChebyshevT}}{}\left({1}{,}{y}\right)}{{64}}{+}\frac{{15}{}{\mathrm{ChebyshevT}}{}\left({0}{,}{x}\right){}{\mathrm{ChebyshevT}}{}\left({2}{,}{y}\right)}{{8}}{+}\frac{{135}{}{\mathrm{ChebyshevT}}{}\left({0}{,}{x}\right){}{\mathrm{ChebyshevT}}{}\left({3}{,}{y}\right)}{{128}}{+}\frac{{15}{}{\mathrm{ChebyshevT}}{}\left({0}{,}{x}\right){}{\mathrm{ChebyshevT}}{}\left({4}{,}{y}\right)}{{64}}{+}\frac{{15}{}{\mathrm{ChebyshevT}}{}\left({0}{,}{x}\right){}{\mathrm{ChebyshevT}}{}\left({5}{,}{y}\right)}{{128}}{+}\frac{{285}{}{\mathrm{ChebyshevT}}{}\left({1}{,}{x}\right){}{\mathrm{ChebyshevT}}{}\left({0}{,}{y}\right)}{{64}}{+}\frac{{361}{}{\mathrm{ChebyshevT}}{}\left({1}{,}{x}\right){}{\mathrm{ChebyshevT}}{}\left({1}{,}{y}\right)}{{64}}{+}\frac{{19}{}{\mathrm{ChebyshevT}}{}\left({1}{,}{x}\right){}{\mathrm{ChebyshevT}}{}\left({2}{,}{y}\right)}{{8}}{+}\frac{{171}{}{\mathrm{ChebyshevT}}{}\left({1}{,}{x}\right){}{\mathrm{ChebyshevT}}{}\left({3}{,}{y}\right)}{{128}}{+}\frac{{19}{}{\mathrm{ChebyshevT}}{}\left({1}{,}{x}\right){}{\mathrm{ChebyshevT}}{}\left({4}{,}{y}\right)}{{64}}{+}\frac{{19}{}{\mathrm{ChebyshevT}}{}\left({1}{,}{x}\right){}{\mathrm{ChebyshevT}}{}\left({5}{,}{y}\right)}{{128}}{+}\frac{{15}{}{\mathrm{ChebyshevT}}{}\left({2}{,}{x}\right){}{\mathrm{ChebyshevT}}{}\left({0}{,}{y}\right)}{{8}}{+}\frac{{19}{}{\mathrm{ChebyshevT}}{}\left({2}{,}{x}\right){}{\mathrm{ChebyshevT}}{}\left({1}{,}{y}\right)}{{8}}{+}{\mathrm{ChebyshevT}}{}\left({2}{,}{x}\right){}{\mathrm{ChebyshevT}}{}\left({2}{,}{y}\right){+}\frac{{9}{}{\mathrm{ChebyshevT}}{}\left({2}{,}{x}\right){}{\mathrm{ChebyshevT}}{}\left({3}{,}{y}\right)}{{16}}{+}\frac{{\mathrm{ChebyshevT}}{}\left({2}{,}{x}\right){}{\mathrm{ChebyshevT}}{}\left({4}{,}{y}\right)}{{8}}{+}\frac{{\mathrm{ChebyshevT}}{}\left({2}{,}{x}\right){}{\mathrm{ChebyshevT}}{}\left({5}{,}{y}\right)}{{16}}{+}\frac{{135}{}{\mathrm{ChebyshevT}}{}\left({3}{,}{x}\right){}{\mathrm{ChebyshevT}}{}\left({0}{,}{y}\right)}{{128}}{+}\frac{{171}{}{\mathrm{ChebyshevT}}{}\left({3}{,}{x}\right){}{\mathrm{ChebyshevT}}{}\left({1}{,}{y}\right)}{{128}}{+}\frac{{9}{}{\mathrm{ChebyshevT}}{}\left({3}{,}{x}\right){}{\mathrm{ChebyshevT}}{}\left({2}{,}{y}\right)}{{16}}{+}\frac{{81}{}{\mathrm{ChebyshevT}}{}\left({3}{,}{x}\right){}{\mathrm{ChebyshevT}}{}\left({3}{,}{y}\right)}{{256}}{+}\frac{{9}{}{\mathrm{ChebyshevT}}{}\left({3}{,}{x}\right){}{\mathrm{ChebyshevT}}{}\left({4}{,}{y}\right)}{{128}}{+}\frac{{9}{}{\mathrm{ChebyshevT}}{}\left({3}{,}{x}\right){}{\mathrm{ChebyshevT}}{}\left({5}{,}{y}\right)}{{256}}{+}\frac{{15}{}{\mathrm{ChebyshevT}}{}\left({4}{,}{x}\right){}{\mathrm{ChebyshevT}}{}\left({0}{,}{y}\right)}{{64}}{+}\frac{{19}{}{\mathrm{ChebyshevT}}{}\left({4}{,}{x}\right){}{\mathrm{ChebyshevT}}{}\left({1}{,}{y}\right)}{{64}}$ (6)
 > $\mathrm{S2}≔\mathrm{Create}\left(u\left(n\right),\mathrm{LaguerreL}\left(n,a,x\right)\right)$
 ${\mathrm{S2}}{≔}{\sum }_{{n}{=}{0}}^{{\mathrm{\infty }}}{}{u}{}\left({n}\right){}{\mathrm{LaguerreL}}{}\left({n}{,}{a}{,}{x}\right)$ (7)
 > $\mathrm{ChangeBasis}\left(\mathrm{S2},\mathrm{ChebyshevT}\left(n,x\right)\right)$
 ${"Warning : impossible change of basis for this infinite series"}$
 ${\sum }_{{n}{=}{0}}^{{\mathrm{\infty }}}{}{u}{}\left({n}\right){}{\mathrm{LaguerreL}}{}\left({n}{,}{a}{,}{x}\right)$ (8)
 > $\mathrm{ChangeBasis}\left(\mathrm{S2},\mathrm{LaguerreL}\left(n,a+1,x\right)\right)$
 ${\sum }_{{n}{=}{0}}^{{\mathrm{\infty }}}{}\left({u}{}\left({n}\right){-}{u}{}\left({n}{+}{1}\right)\right){}{\mathrm{LaguerreL}}{}\left({n}{,}{a}{+}{1}{,}{x}\right)$ (9)
 > $\mathrm{S3}≔\mathrm{Create}\left(\left\{\frac{1}{n!},n=3..\mathrm{\infty },\left[2=1\right]\right\},\mathrm{JacobiP}\left(n,2,2,x\right)\right)$
 ${\mathrm{S3}}{≔}{\mathrm{JacobiP}}{}\left({2}{,}{2}{,}{2}{,}{x}\right){+}\left({\sum }_{{n}{=}{3}}^{{\mathrm{\infty }}}{}\frac{{\mathrm{JacobiP}}{}\left({n}{,}{2}{,}{2}{,}{x}\right)}{{n}{!}}\right)$ (10)
 > $\mathrm{C1}≔\mathrm{ChangeBasis}\left(\mathrm{S3},\mathrm{JacobiP}\left(n,2,2+1,x\right)\right)$
 ${\mathrm{C1}}{≔}\frac{{4}{}{\mathrm{JacobiP}}{}\left({1}{,}{2}{,}{3}{,}{x}\right)}{{9}}{+}\frac{{169}{}{\mathrm{JacobiP}}{}\left({2}{,}{2}{,}{3}{,}{x}\right)}{{198}}{+}\left({\sum }_{{n}{=}{3}}^{{\mathrm{\infty }}}{}\frac{\left({2}{}\left({n}{+}{1}\right){!}{}{{n}}^{{2}}{+}{2}{}{n}{!}{}{{n}}^{{2}}{+}{17}{}\left({n}{+}{1}\right){!}{}{n}{+}{11}{}{n}{!}{}{n}{+}{35}{}\left({n}{+}{1}\right){!}{+}{15}{}{n}{!}\right){}{\mathrm{JacobiP}}{}\left({n}{,}{2}{,}{3}{,}{x}\right)}{\left({2}{}{n}{+}{7}\right){}\left({n}{+}{1}\right){!}{}\left({2}{}{n}{+}{5}\right){}{n}{!}}\right)$ (11)
 > $\mathrm{SimplifyCoefficients}\left(\mathrm{C1},\mathrm{simplify}\right)$
 $\frac{{4}{}{\mathrm{JacobiP}}{}\left({1}{,}{2}{,}{3}{,}{x}\right)}{{9}}{+}\frac{{169}{}{\mathrm{JacobiP}}{}\left({2}{,}{2}{,}{3}{,}{x}\right)}{{198}}{+}\left({\sum }_{{n}{=}{3}}^{{\mathrm{\infty }}}{}\frac{\left({2}{}{{n}}^{{3}}{+}{21}{}{{n}}^{{2}}{+}{63}{}{n}{+}{50}\right){}{\mathrm{JacobiP}}{}\left({n}{,}{2}{,}{3}{,}{x}\right)}{\left({4}{}{{n}}^{{2}}{+}{24}{}{n}{+}{35}\right){}\left({n}{+}{1}\right){!}}\right)$ (12)
 > $\mathrm{C2}≔\mathrm{ChangeBasis}\left(\mathrm{S3},\mathrm{GegenbauerC}\left(n,2+\frac{1}{2},x\right)\right)$
 ${\mathrm{C2}}{≔}\frac{{2}{}{\mathrm{GegenbauerC}}{}\left({2}{,}\frac{{5}}{{2}}{,}{x}\right)}{{5}}{+}\left({\sum }_{{n}{=}{3}}^{{\mathrm{\infty }}}{}\frac{{12}{}{\mathrm{GegenbauerC}}{}\left({n}{,}\frac{{5}}{{2}}{,}{x}\right)}{{n}{!}{}{{2}}^{{n}}{}{{2}}^{{-}{n}}{}\left({3}{+}{n}\right){}\left({4}{+}{n}\right)}\right)$ (13)
 > $\mathrm{SimplifyCoefficients}\left(\mathrm{C2},\mathrm{simplify}\right)$
 $\frac{{2}{}{\mathrm{GegenbauerC}}{}\left({2}{,}\frac{{5}}{{2}}{,}{x}\right)}{{5}}{+}\left({\sum }_{{n}{=}{3}}^{{\mathrm{\infty }}}{}\frac{{12}{}{\mathrm{GegenbauerC}}{}\left({n}{,}\frac{{5}}{{2}}{,}{x}\right)}{{n}{!}{}\left({3}{+}{n}\right){}\left({4}{+}{n}\right)}\right)$ (14)
 > $\mathrm{S5}≔\mathrm{Create}\left(u\left(n,m\right),\mathrm{JacobiP}\left(n,1,1,x\right),\mathrm{LaguerreL}\left(m,2,y\right)\right)$
 ${\mathrm{S5}}{≔}{\sum }_{{m}{=}{0}}^{{\mathrm{\infty }}}{}\left({\sum }_{{n}{=}{0}}^{{\mathrm{\infty }}}{}{u}{}\left({n}{,}{m}\right){}{\mathrm{JacobiP}}{}\left({n}{,}{1}{,}{1}{,}{x}\right)\right){}{\mathrm{LaguerreL}}{}\left({m}{,}{2}{,}{y}\right)$ (15)
 > $\mathrm{C3}≔\mathrm{ChangeBasis}\left(\mathrm{S5},\mathrm{LaguerreL}\left(n,2+1,y\right),\mathrm{JacobiP}\left(m,2,1,x\right)\right)$
 ${\mathrm{C3}}{≔}{\sum }_{{m}{=}{0}}^{{\mathrm{\infty }}}{}\left({\sum }_{{n}{=}{0}}^{{\mathrm{\infty }}}{}\frac{\left({2}{}{u}{}\left({n}{+}{1}{,}{m}{+}{1}\right){}{{n}}^{{2}}{-}{2}{}{u}{}\left({n}{,}{m}{+}{1}\right){}{{n}}^{{2}}{-}{2}{}{u}{}\left({n}{+}{1}{,}{m}\right){}{{n}}^{{2}}{+}{2}{}{u}{}\left({n}{,}{m}\right){}{{n}}^{{2}}{+}{7}{}{u}{}\left({n}{+}{1}{,}{m}{+}{1}\right){}{n}{-}{11}{}{u}{}\left({n}{,}{m}{+}{1}\right){}{n}{-}{7}{}{u}{}\left({n}{+}{1}{,}{m}\right){}{n}{+}{11}{}{u}{}\left({n}{,}{m}\right){}{n}{+}{6}{}{u}{}\left({n}{+}{1}{,}{m}{+}{1}\right){-}{15}{}{u}{}\left({n}{,}{m}{+}{1}\right){-}{6}{}{u}{}\left({n}{+}{1}{,}{m}\right){+}{15}{}{u}{}\left({n}{,}{m}\right)\right){}{\mathrm{JacobiP}}{}\left({n}{,}{2}{,}{1}{,}{x}\right)}{\left({2}{}{n}{+}{5}\right){}\left({2}{}{n}{+}{3}\right)}\right){}{\mathrm{LaguerreL}}{}\left({m}{,}{3}{,}{y}\right)$ (16)
 > $\mathrm{SimplifyCoefficients}\left(\mathrm{C3},\mathrm{collect},u\right)$
 ${\sum }_{{m}{=}{0}}^{{\mathrm{\infty }}}{}\left({\sum }_{{n}{=}{0}}^{{\mathrm{\infty }}}{}\left(\frac{\left({2}{}{{n}}^{{2}}{+}{11}{}{n}{+}{15}\right){}{u}{}\left({n}{,}{m}\right)}{\left({2}{}{n}{+}{5}\right){}\left({2}{}{n}{+}{3}\right)}{+}\frac{\left({-}{2}{}{{n}}^{{2}}{-}{11}{}{n}{-}{15}\right){}{u}{}\left({n}{,}{m}{+}{1}\right)}{\left({2}{}{n}{+}{5}\right){}\left({2}{}{n}{+}{3}\right)}{+}\frac{\left({-}{2}{}{{n}}^{{2}}{-}{7}{}{n}{-}{6}\right){}{u}{}\left({n}{+}{1}{,}{m}\right)}{\left({2}{}{n}{+}{5}\right){}\left({2}{}{n}{+}{3}\right)}{+}\frac{\left({2}{}{{n}}^{{2}}{+}{7}{}{n}{+}{6}\right){}{u}{}\left({n}{+}{1}{,}{m}{+}{1}\right)}{\left({2}{}{n}{+}{5}\right){}\left({2}{}{n}{+}{3}\right)}\right){}{\mathrm{JacobiP}}{}\left({n}{,}{2}{,}{1}{,}{x}\right)\right){}{\mathrm{LaguerreL}}{}\left({m}{,}{3}{,}{y}\right)$ (17)