Function: chebyshevT (n, x)

Numerically evaluate Chebyshev polynomials of the first kind.

Evaluates the Chebyshev polynomial of the first kind of degree n at the point x, in double precision. Both inputs can be arrays but their sizes must be either the same or scalar.

Example:

chebyshevT (18, 0.9)
  ⇒ ans = -0.2614

Using this function may be preferable to evaluating the Chebyshev polynomial in monomial form because the latter can give poor accuracy due to numerical instability. See the example in see ‘@double/chebyshevU’.

This function may be slow for large numbers of inputs. This is because it is not a native double-precision implementation but rather the numerical evaluation of the Python mpmath function chebyshevt.

See also: @sym/chebychevT, @double/chebyshevU.

Package: symbolic