18.2 Computational Aspects and Programs
221
with z ∈ C and a an arbitrary complex index. Equation (18.11) are the basis of
the direct computation, and Eq. (18.13) of the computation via hypergeometric
functions. Shifted Chebyshev polynomials or functions will be computed by
transforming the arguments x → s(x) accordingly.
The roots of the Chebyshev polynomials can be easily derived from their
trigonometric representation. For example, due to Eq. (18.1a) the roots of the
Chebyshev polynomial of first kind are given by nϑ =
π
2 . Thus we get for
T n (x r ) = 0 for x r = cos(
kπ
2n
) , k = −(2n − 1), −(2n − 3), · · · , −1, (18.14a)
U n (x r ) = 0 for x r = cos(
(n − k + 1)π
n + 1
) , k = 1, 2, · · · , n,
(18.14b)
V n (x r ) = 0 for x r = cos(
(n − k +
1
2 )π
n +
1
2
) , k = 1, 2, · · · , n and
(18.14c)
W n (x r ) = 0 for x r = cos(
(n − k + 1)π
n +
1
2
) , k = 1, 2, · · · , n.
(18.14d)
18.2.2 Programs
The Class chebypoly
The SPECFUNPHYS class chebypoly returns the polynomial coefficients of the
Chebyshev polynomials and shifted Chebyshev polynomials. As a subclass of
polymeth it comes with same methods as polymeth. The syntax is [obj, C]
= chebypoly(n, wcheby). The input argument “n” is the maximum degree
of the polynomials, a positive scalar integer. The optional input argument “wcheby”
with default value “T” is a scalar character and tells chebypoly which Chebyshev
polynomial shall be evaluated. Possible values are
• “T” Chebyshev Polynomial of first kind (default)
• “U” Chebyshev Polynomial of second kind
• “V” Chebyshev Polynomial of third kind
• “W” Chebyshev Polynomial of fourth kind
• “Ts” shifted Chebyshev Polynomial of first kind T*
• “Us” shifted Chebyshev Polynomial of second kind U*
• “Vs” shifted Chebyshev Polynomial of third kind V*
• “Ws” shifted Chebyshev Polynomial of fourth kind W*
221
with z ∈ C and a an arbitrary complex index. Equation (18.11) are the basis of
the direct computation, and Eq. (18.13) of the computation via hypergeometric
functions. Shifted Chebyshev polynomials or functions will be computed by
transforming the arguments x → s(x) accordingly.
The roots of the Chebyshev polynomials can be easily derived from their
trigonometric representation. For example, due to Eq. (18.1a) the roots of the
Chebyshev polynomial of first kind are given by nϑ =
π
2 . Thus we get for
T n (x r ) = 0 for x r = cos(
kπ
2n
) , k = −(2n − 1), −(2n − 3), · · · , −1, (18.14a)
U n (x r ) = 0 for x r = cos(
(n − k + 1)π
n + 1
) , k = 1, 2, · · · , n,
(18.14b)
V n (x r ) = 0 for x r = cos(
(n − k +
1
2 )π
n +
1
2
) , k = 1, 2, · · · , n and
(18.14c)
W n (x r ) = 0 for x r = cos(
(n − k + 1)π
n +
1
2
) , k = 1, 2, · · · , n.
(18.14d)
18.2.2 Programs
The Class chebypoly
The SPECFUNPHYS class chebypoly returns the polynomial coefficients of the
Chebyshev polynomials and shifted Chebyshev polynomials. As a subclass of
polymeth it comes with same methods as polymeth. The syntax is [obj, C]
= chebypoly(n, wcheby). The input argument “n” is the maximum degree
of the polynomials, a positive scalar integer. The optional input argument “wcheby”
with default value “T” is a scalar character and tells chebypoly which Chebyshev
polynomial shall be evaluated. Possible values are
• “T” Chebyshev Polynomial of first kind (default)
• “U” Chebyshev Polynomial of second kind
• “V” Chebyshev Polynomial of third kind
• “W” Chebyshev Polynomial of fourth kind
• “Ts” shifted Chebyshev Polynomial of first kind T*
• “Us” shifted Chebyshev Polynomial of second kind U*
• “Vs” shifted Chebyshev Polynomial of third kind V*
• “Ws” shifted Chebyshev Polynomial of fourth kind W*
