solve.polynom {PolynomF}R Documentation

Find roots of polynomial equations

Description

Method functions for the solve generic function to find the roots of a single polynomial equation or the roots of a list of polynomial equations

Usage

## S3 method for class 'polynom':
solve(a, b, ...)
## S3 method for class 'polylist':
solve(a, b, ...)

Arguments

a A polynom or polylist object
b A polynom or scalar numeric object. The polynomial equation(s) to be solved is a - b = 0.
... Not used.

Details

The roots of the equation will in general be complex. In the case of polylist the same equation, a - b = 0, is solved for all polynomials in the list. In this case the result is a list of root vectors.

Value

A vector of roots, or a list of such vectors.

Author(s)

Bill Venables

References

None

Examples

x <- polynom()
H <- polylist(1, x)
for(n in 2:10)
    H[[n+1]] <- x * H[[n]] - (n-1)*H[[n-1]]
solve(H)
solve(deriv(H))


[Package PolynomF version 0.93 Index]