Chebyshev polynomials of the first kind
First Five Chebyshev Polynomials of the First Kind
Find the first five Chebyshev polynomials of the first kind
for the variable
syms x chebyshevT([0, 1, 2, 3, 4], x)
ans = [ 1, x, 2*x^2 - 1, 4*x^3 - 3*x, 8*x^4 - 8*x^2 + 1]
Chebyshev Polynomials for Numeric and Symbolic Arguments
Depending on its arguments,
returns floating-point or exact symbolic results.
Find the value of the fifth-degree Chebyshev polynomial of the first kind at these
points. Because these numbers are not symbolic objects,
chebyshevT returns floating-point results.
chebyshevT(5, [1/6, 1/4, 1/3, 1/2, 2/3, 3/4])
ans = 0.7428 0.9531 0.9918 0.5000 -0.4856 -0.8906
Find the value of the fifth-degree Chebyshev polynomial of the first kind for the
same numbers converted to symbolic objects. For symbolic numbers,
chebyshevT returns exact symbolic results.
chebyshevT(5, sym([1/6, 1/4, 1/3, 1/2, 2/3, 3/4]))
ans = [ 361/486, 61/64, 241/243, 1/2, -118/243, -57/64]
Evaluate Chebyshev Polynomials with Floating-Point Numbers
Floating-point evaluation of Chebyshev polynomials by direct
chebyshevT is numerically stable. However, first
computing the polynomial using a symbolic variable, and then substituting
variable-precision values into this expression can be numerically
Find the value of the 500th-degree Chebyshev polynomial of the first kind at
evaluation is numerically stable.
chebyshevT(500, 1/3) chebyshevT(500, vpa(1/3))
ans = 0.9631 ans = 0.963114126817085233778571286718
Now, find the symbolic polynomial
T500 = chebyshevT(500, x),
x = vpa(1/3) into the result. This approach is
syms x T500 = chebyshevT(500, x); subs(T500, x, vpa(1/3))
ans = -3293905791337500897482813472768.0
Approximate the polynomial coefficients by using
x = sym(1/3) into the result. This approach is
also numerically unstable.
subs(vpa(T500), x, sym(1/3))
ans = 1202292431349342132757038366720.0
Plot Chebyshev Polynomials of the First Kind
Plot the first five Chebyshev polynomials of the first kind.
syms x y fplot(chebyshevT(0:4,x)) axis([-1.5 1.5 -2 2]) grid on ylabel('T_n(x)') legend('T_0(x)','T_1(x)','T_2(x)','T_3(x)','T_4(x)','Location','Best') title('Chebyshev polynomials of the first kind')
n — Degree of polynomial
nonnegative integer | symbolic variable | symbolic expression | symbolic function | vector | matrix
Degree of the polynomial, specified as a nonnegative integer, symbolic variable, expression, or function, or as a vector or matrix of numbers, symbolic numbers, variables, expressions, or functions.
x — Evaluation point
number | symbolic number | symbolic variable | symbolic expression | symbolic function | vector | matrix
Evaluation point, specified as a number, symbolic number, variable, expression, or function, or as a vector or matrix of numbers, symbolic numbers, variables, expressions, or functions.
Chebyshev Polynomials of the First Kind
Chebyshev polynomials of the first kind are defined as Tn(x) = cos(n*arccos(x)).
These polynomials satisfy the recursion formula
Chebyshev polynomials of the first kind are orthogonal on the interval -1 ≤ x ≤ 1 with respect to the weight function .
Chebyshev polynomials of the first kind are special cases of the Jacobi polynomials
and Gegenbauer polynomials
chebyshevTreturns floating-point results for numeric arguments that are not symbolic objects.
chebyshevTacts element-wise on nonscalar inputs.
At least one input argument must be a scalar or both arguments must be vectors or matrices of the same size. If one input argument is a scalar and the other one is a vector or a matrix, then
chebyshevTexpands the scalar into a vector or matrix of the same size as the other argument with all elements equal to that scalar.
 Hochstrasser, U. W. “Orthogonal Polynomials.” Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables. (M. Abramowitz and I. A. Stegun, eds.). New York: Dover, 1972.
 Cohl, Howard S., and Connor MacKenzie. “Generalizations and Specializations of Generating Functions for Jacobi, Gegenbauer, Chebyshev and Legendre Polynomials with Definite Integrals.” Journal of Classical Analysis, no. 1 (2013): 17–33. https://doi.org/10.7153/jca-03-02.
Introduced in R2014b