nptetrad SciMax Toolbox nterms

SciMax Toolbox >> nroots

nroots

Maxima Function

Calling Sequence

nroots (p, low, high)

Description

Returns the number of real roots of the real univariate polynomial p in the half-open interval (low, high]. The endpoints of the interval may be minf or inf. infinity and plus infinity.

nroots uses the method of Sturm sequences.

(%i1) p: x^10 - 2*x^4 + 1/2$
(%i2) nroots (p, -6, 9.1);
(%o2)                           4
nptetrad SciMax Toolbox nterms