0
$\begingroup$

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?

$\endgroup$
6
  • $\begingroup$ Can be done with PolynomialReduce. $\endgroup$ Commented Nov 23, 2014 at 22:33
  • $\begingroup$ @DanielLichtblau: I'm having trouble, I tried f = 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? $\endgroup$ Commented Nov 24, 2014 at 2:37
  • $\begingroup$ @DumpsterDoofus Try defining each Chebyshev polynomial as a new variable, using b = Table[y[k] - ChebyshevT[k, x], {k, 0, 5}];. Then see what PolynomialReduce produces. $\endgroup$ Commented Nov 24, 2014 at 3:52
  • $\begingroup$ @DanielLichtblau: Hm, still having trouble understanding. With randomly generated polynomial 5 - 3 x + 3 x^2 + 2 x^3, the output by PolynomialReduce is {{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}. $\endgroup$ Commented Nov 24, 2014 at 20:33
  • $\begingroup$ @DumpsterDoofus Ah. Yes, you are getting a "correct" result in terms of the polynomial rewrite, it's just not a useful result (it involves powers of y[1], which is x, which is useless). If I get something worked out I'll post. $\endgroup$ Commented Nov 24, 2014 at 21:21

0

Browse other questions tagged or ask your own question.