2
$\begingroup$

Is it possible to write the shifted Chebyshev polynomials (the first kind) in Mathematica? The formula is:

$$P_n(x)=\sum_{k=0}^{\left\lfloor\tfrac{n}{2}\right\rfloor}(-1)^k 2^{n-2k-1}\frac{n}{n-k}\binom{n-k}{k}(2x-1)^{n-2k}$$

The output should be in a vector {..., ..., ..., ... etc.} Thanks!!

$\endgroup$
2
  • $\begingroup$ By "vector", do you mean a vector of the first few polynomials? $\endgroup$ Commented Apr 1, 2019 at 8:36
  • $\begingroup$ yes please depend on n $\endgroup$
    – user62716
    Commented Apr 1, 2019 at 8:38

1 Answer 1

6
$\begingroup$
With[{m = 100}, 
    ChebyshevT[Range[m], 2 x - 1] == 
    Table[Sum[(-1)^k 2^(n - 2 k - 1) Binomial[n - k, k] (2 x - 1)^(n - 2 k) n/(n - k),
              {k, 0, Quotient[n, 2]}], {n, m}] // Expand]
   True

Comparing your formula with formula 22.3.6 in Abramowitz and Stegun, we find that all you need to do is

ChebyshevT[Range[0, m - 1], 2 x - 1]

if you need an entire pile of these shifted polynomials.

$\endgroup$
3
  • $\begingroup$ Many thanks, put the output just word true not terms? I need few terms in vector depend on n, what about [n/2] is it greatest integer number? $\endgroup$
    – user62716
    Commented Apr 1, 2019 at 9:00
  • $\begingroup$ The first snippet just shows that the simple expression is the same as your explicit sum. The second snippet is what you want for evaluation. Assign some positive integer to m and evaluate ChebyshevT[Range[0, m - 1], 2 x - 1] (e.g. ChebyshevT[Range[0, 100 - 1], 2 x - 1] to get a hundred of them). $\endgroup$ Commented Apr 1, 2019 at 9:01
  • $\begingroup$ Dear, 1) You mean I have to use ChebyshevT[Range[0, m - 1], 2 x - 1].?2) the first code With[{m = 100}, ChebyshevT[Range[m], 2 x - 1] == Table[Sum[(-1)^k 2^(n - 2 k - 1) Binomial[n - k, k] (2 x - 1)^(n - 2 k) n/(n - k), {k, 0, Quotient[n, 2]}], {n, m}] // Expand] for what then?3) [n/2] is it greatest integer number? $\endgroup$
    – user62716
    Commented Apr 1, 2019 at 9:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.