The Curtz polynomials
MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.
MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.
orthpoly::curtz(n
, x
)
orthpoly::curtz(n,x)
computes the value of
the nth
degree Curtz polynomial at the point x.
These polynomials have rational coefficients.
Evaluation for real floatingpoint values x is numerically stable. See Example 2.
Polynomial expressions are returned if identifiers or indexed identifiers are specified:
orthpoly::curtz(2, x)
orthpoly::curtz(3, x[1])
Using arithmetical expressions as input, the "values" of these polynomials are returned:
orthpoly::curtz(2, 3+2*I)
orthpoly::curtz(3, exp(x[1] + 2))
"Arithmetical expressions" include numbers:
orthpoly::curtz(2, sqrt(2)), orthpoly::curtz(3, 8 + I), orthpoly::curtz(100, 0.3)
If the degree of the polynomial is a variable or expression,
then orthpoly::curtz
returns itself symbolically:
orthpoly::curtz(n, x)
If a floatingpoint value is desired, then a direct call such as
orthpoly::curtz(50, 1.2)
is appropriate and yields a correct result. One should not evaluate the symbolic polynomial at a floatingpoint value, because this may be numerically unstable:
orthpoly::curtz(50, x): evalp(%, x = 1.2)
Note that only 3 digits are correct due to numerical roundoff.

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 Curtz polynomial at point x
is
returned as an arithmetical expression. If n
is
an arithmetical expression, then orthpoly::curtz
returns
itself symbolically.
The Curtz polynomials are given by the recursion formula
with C(0, x) = 1.