Learn R Programming

resultant (version 1.0.0)

numberOfRealRootsInInterval: Number of real roots in an interval

Description

Number of distinct real roots of a univariate polynomial in a given interval.

Usage

numberOfRealRootsInInterval(qspray, lower, upper, closed = TRUE)

Value

An integer, the number of real roots of the polynomial in the interval.

Arguments

qspray

a univariate qspray polynomial

lower, upper

the bounds of the interval, bigq numbers or objects coercible to bigq numbers, and it is also possible to set lower = -Inf and upper = Inf

closed

Boolean, whether to consider the interval is closed or open

Examples

Run this code
library(resultant)
x <- qlone(1)
P <- 2*x^4 + x^3 - 3*x^2 - x + 1
numberOfRealRootsInInterval(P, 0, 1)

Run the code above in your browser using DataLab