I have a certain multivariate polynomial (in 4 variables) written in terms of monomials, and I would like to change the basis into Chebyshev orthogonal basis. Is there any function to do that?
Asked
Active
Viewed 176 times
0
PolynomialReduce. – Daniel Lichtblau Nov 23 '14 at 22:33f = Sum[RandomInteger[{-5, 5}] x^k, {k, 0, 5}]; b = Table[ChebyshevT[k, x], {k, 0, 5}]; PolynomialReduce[f, b, x]and it's just giving $a_1$ as the original polynomial. Am I doing something dumb? – DumpsterDoofus Nov 24 '14 at 02:37b = Table[y[k] - ChebyshevT[k, x], {k, 0, 5}];. Then see whatPolynomialReduceproduces. – Daniel Lichtblau Nov 24 '14 at 03:525 - 3 x + 3 x^2 + 2 x^3, the output byPolynomialReduceis{{0, 3 - 2 x^2 + x (-3 - 2 y[1]) - 3 y[1] - 2 y[1]^2, 0, 0, 0, 0}, 5 - 3 y[1] + 3 y[1]^2 + 2 y[1]^3}, but I don't see how that gives the correct answer of Chebyshev polynomial coefficients, which is supposed to be{13/2, -(3/2), 3/2, 1/2, 0}. – DumpsterDoofus Nov 24 '14 at 20:33y[1], which isx, which is useless). If I get something worked out I'll post. – Daniel Lichtblau Nov 24 '14 at 21:21Out[211]= -4 - 2 x + 5 x^2 + 2 x^3 - 4 x^4 + 2 x^5
In[213]:= newpoly = Fold[Last[PolynomialReduce[#1, #2, x]] &, poly, Reverse[b]]
Out[213]= 1/8 (-24 + 6 y[1] + 4 y[2] + 9 y[3] - 4 y[4] + y[5])
In[214]:= Expand[newpoly - poly /. y[j_] :> ChebyshevT[j, x]]
Out[214]= 0`
– Daniel Lichtblau Nov 24 '14 at 21:42