The Chebyshev polynomials of the first kind
This functionality does not run in MATLAB.
orthpoly::chebyshev1(n
, x
)
orthpoly::chebyshev1(n,x)
computes the value
of the nth
degree Chebyshev polynomial of the first kind at the point x.
These polynomials have integer coefficients.
Evaluation is fast and numerically stable for real floating point values x from the interval [ 1.0, 1.0]. See Example 2.
orthpoly::chebyshev2
implements
the Chebyshev polynomials of the second kind.
Polynomial expressions are returned if identifiers or indexed identifiers are specified:
orthpoly::chebyshev1(2, x)
orthpoly::chebyshev1(3, x[1])
Using arithmetical expressions as input, the "values" of these polynomials are returned:
orthpoly::chebyshev1(2, 3 + 2*I)
orthpoly::chebyshev1(3, exp(x[1]+2))
"Arithmetical expressions" include numbers:
orthpoly::chebyshev1(2, sqrt(2)), orthpoly::chebyshev1(3, 8 + I), orthpoly::chebyshev1(1000, 0.3)
If the degree of the polynomial is a variable or expression,
then orthpoly::chebyshev1
returns itself symbolically:
orthpoly::chebyshev1(n, x)
If a floatingpoint value is desired, then a direct call such as
orthpoly::chebyshev1(200, 0.3)
is appropriate and yields a correct result. One should not evaluate the symbolic polynomial at a floatingpoint value, because this may be numerically unstable:
T200 := orthpoly::chebyshev1(200, x):
DIGITS := 10: evalp(T200, x = 0.3)
This result is caused by numerical roundoff. Also with increased DIGITS
only
a few leading digits are correct:
DIGITS := 20: evalp(T200, x = 0.3)
delete DIGITS, T200:

A nonnegative integer or an arithmetical expression representing a nonnegative integer: the degree of the polynomial. 

An indeterminate or an arithmetical expression. An indeterminate
is either an identifier (of domain type 
The value of the Chebyshev polynomial at point x
is
returned as an arithmetical expression. If n
is
an arithmetical expression, then orthpoly::chebyshev1
returns
itself symbolically.
The Chebyshev polynomials are given by T(n, x)
= cos(n acos(x)) for
real x ∈ [ 1, 1].
This representation is used by orthpoly::chebyshev1
for
floatingpoint values in this range.
These polynomials satisfy the recursion formula
with T(0, x) = 1 and T(1, x) = x.
They are orthogonal on the interval [ 1, 1] with respect to the weight function .
T(n, x) is a special Jacobi polynomial:
.