Chebyshev polynomials of the second kind
Find the first five Chebyshev polynomials of the second kind
for the variable
syms x chebyshevU([0, 1, 2, 3, 4], x)
ans = [ 1, 2*x, 4*x^2 - 1, 8*x^3 - 4*x, 16*x^4 - 12*x^2 + 1]
Depending on its arguments,
returns floating-point or exact symbolic results.
Find the value of the fifth-degree Chebyshev polynomial of the second kind at
these points. Because these numbers are not symbolic objects,
chebyshevU returns floating-point results.
chebyshevU(5, [1/6, 1/3, 1/2, 2/3, 4/5])
ans = 0.8560 0.9465 0.0000 -1.2675 -1.0982
Find the value of the fifth-degree Chebyshev polynomial of the second kind for the
same numbers converted to symbolic objects. For symbolic numbers,
chebyshevU returns exact symbolic results.
chebyshevU(5, sym([1/6, 1/4, 1/3, 1/2, 2/3, 4/5]))
ans = [ 208/243, 33/32, 230/243, 0, -308/243, -3432/3125]
Floating-point evaluation of Chebyshev polynomials by direct
chebyshevU 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 second kind at
evaluation is numerically stable.
chebyshevU(500, 1/3) chebyshevU(500, vpa(1/3))
ans = 0.8680 ans = 0.86797529488884242798157148968078
Now, find the symbolic polynomial
U500 = chebyshevU(500, x),
x = vpa(1/3) into the result. This approach is
syms x U500 = chebyshevU(500, x); subs(U500, x, vpa(1/3))
ans = 63080680195950160912110845952.0
Approximate the polynomial coefficients by using
x = sym(1/3) into the result. This approach is
also numerically unstable.
subs(vpa(U500), x, sym(1/3))
ans = -1878009301399851172833781612544.0
Plot the first five Chebyshev polynomials of the second kind.
syms x y fplot(chebyshevU(0:4, x)) axis([-1.5 1.5 -2 2]) grid on ylabel('U_n(x)') legend('U_0(x)', 'U_1(x)', 'U_2(x)', 'U_3(x)', 'U_4(x)', 'Location', 'Best') title('Chebyshev polynomials of the second kind')
n— Degree of polynomial
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
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 second kind are defined as follows:
These polynomials satisfy the recursion formula
Chebyshev polynomials of the second kind are orthogonal on the interval -1 ≤ x ≤ 1 with respect to the weight function .
Chebyshev polynomials of the second kind are a special case of the Jacobi polynomials
and Gegenbauer polynomials
chebyshevU returns floating-point results for numeric
arguments that are not symbolic objects.
chebyshevU acts 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
chebyshevU expands 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.