The Jacobi polynomials

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.


orthpoly::jacobi(n, a, b, x)


orthpoly::jacobi(n,a,b,x) computes the value of the n-th degree Jacobi polynomial with parameters a and b at the point x.

Evaluation for real floating-point values x from the interval [- 1.0, 1.0] is numerically stable. See Example 2.


Example 1

Polynomials of domain type DOM_POLY are returned, if identifiers or indexed identifiers are specified:

orthpoly::jacobi(2, a, b, x)

orthpoly::jacobi(3, 4, 5, x[1])

However, using arithmetical expressions as input the "values" of these polynomials are returned:

orthpoly::jacobi(2, 4, b, 6*x)

orthpoly::jacobi(2, 0, I, x[1] + 2)

"Arithmetical expressions" include numbers:

orthpoly::jacobi(2, 1/2, -1/2, sqrt(2)),
orthpoly::jacobi(3, 2, 5, 8 + I),
orthpoly::jacobi(1000, 1, 2, 0.3);

If the degree of the polynomial is a variable or expression, then orthpoly::jacobi returns itself symbolically:

orthpoly::jacobi(n, a, b, x)

Example 2

If a floating-point value is desired, then a direct call such as

orthpoly::jacobi(100, 1/2, 3/2, 0.9)

is appropriate and yields a correct result. One should not evaluate the symbolic polynomial at a floating-point value, because this may be numerically unstable:

P100 := orthpoly::jacobi(100, 1/2, 3/2, x):
evalp(P100, x = 0.9)

This result is caused by numerical round-off. Also with increased DIGITS only a few leading digits are correct:

DIGITS := 30: evalp(P100, x = 0.9)

delete P100, DIGITS:



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

a, b

Arithmetical expressions.


An indeterminate or an arithmetical expression. An indeterminate is either an identifier (of domain type DOM_IDENT) or an indexed identifier (of type "_index").

Return Values

If x is an indeterminate, then a polynomial of domain type DOM_POLY is returned. If x is an arithmetical expression, then the value of the Jacobi polynomial at this point is returned as an arithmetical expression. If n is an arithmetical expression, then orthpoly::jacobi returns itself symbolically.


The Jacobi polynomials are given by the recursion formula

with ci = i + a + b and


For fixed real a > - 1, b > - 1 the Jacobi polynomials are orthogonal on the interval [- 1, 1] with respect to the weight function w(x) = (1 - x)a (1 + x)b.

For special values of the parameters a, b the Jacobi polynomials are related to the Legendre polynomials


to the Chebyshev polynomials of the first kind


to the Chebyshev polynomials of the second kind


and to the Gegenbauer polynomials, respectively:


Was this topic helpful?