# An apparent error with Chebyshev polynomials

I am on 11.0.1.0

SeriesCoefficient[ChebyshevU[n,x],{x,0,m}] returns

Piecewise[{{((-1/2)^m*Sqrt[Pi]*Gamma[3/2+m]*Pochhammer[-n,m]*Pochhammer[2+n,m])
/(m!*Gamma[(1+m-n)/2]*Gamma[(3+m+n)/2]*Pochhammer[3/2,m]), m >= 0}}, 0]


On the other hand,

With[{n=7},Sum[(((-1/2)^m*Sqrt[Pi]*Gamma[3/2+m]*Pochhammer[-n,m]*Pochhammer[2+n,m])
/(m!*Gamma[(1+m-n)/2]*Gamma[(3+m+n)/2]*Pochhammer[3/2,m]))x^m,{m,0,n}]]


gives -x+10 x^3-24 x^5+16 x^7, while ChebyshevU[7,x] is -8 x+80 x^3-192 x^5+128 x^7, and more generally for all n that I tried the correct answer is n+1 times the answer given by the above SeriesCoefficient command.

Why is this n+1 absent??

• Seems to be off in V13.3.1, too. But this works: SeriesCoefficient[ChebyshevU[n, x], {x, 0, m}, Assumptions -> n >= 0 && n \[Element] Integers] Sep 4, 2023 at 19:56
• Generally speaking, wrong results should be reported to WRI, not here. Sep 4, 2023 at 20:01
• @MichaelE2 Thank you! What is WRI? Sep 4, 2023 at 20:13
• Reported (Tech Support CASE: 5072905) Sep 5, 2023 at 6:04
• In Mathematica, select the menu command Help > Give Feedback... and it will take you to the webpage for making a report. Sep 5, 2023 at 12:46

\$Version

(* "13.3.1 for Mac OS X ARM (64-bit) (July 24, 2023)" *)

Clear["Global*"]

coef1[m_] = SeriesCoefficient[ChebyshevU[n, x], {x, 0, m}]


As you concluded, the coefficients are off by a factor of (n+1)

Assuming[-1 < x < 1,
Sum[coef1[m] x^m, {m, 0, Infinity}] ==
ChebyshevU[n, x]/(n + 1) //
FunctionExpand // FullSimplify]

(* True *)


As Michael E2 pointed out, by requiring n to be a nonnegative integer,

coef2[m_] = SeriesCoefficient[ChebyshevU[n, x], {x, 0, m},
Assumptions -> n ∈ NonNegativeIntegers]


For n even

Assuming[{-1 < x < 1, n ∈ NonNegativeIntegers, Mod[n, 2] == 0},
Sum[coef2[m] x^m, {m, 0, n, 2}] ==
ChebyshevU[n, x] //
FunctionExpand // FullSimplify]

(* True *)


For n odd

Assuming[{-1 < x < 1, n ∈ NonNegativeIntegers, Mod[n, 2] == 1},
Sum[coef2[m] x^m, {m, 1, n, 2}] ==
ChebyshevU[n, x] //
FunctionExpand // FullSimplify]

(* True *)
`