R: Integral and differential calculus on polynomials or lists of...

integral {PolynomF} | R Documentation

## Integral and differential calculus on polynomials or lists of polynomials.

### Description

Performs calculus operations on polynomial objects: differentiation and indefinite or definite integration.

### Usage

    ## S3 method for class 'polynom'
    integral(expr, limits = NULL, ...)
    ## S3 method for class 'polylist'
    integral(expr, ...)
    ## S3 method for class 'polynom'
    deriv(expr, ...)
    ## S3 method for class 'polylist'
    deriv(expr, ...)

### Arguments

`expr` | A `polynom` or `polylist` object.
`limits` | Either `NULL`, implying an indefinite integral, or a numeric (or complex) vector of length two, implying a definite integral between two fixed real of complex limits.
`...` | Not used, except in the case of `integral.polylist` where it may pass on common `limits` of integration to all integrals in the list.

### Details

`integral` is a local generic function. The generic function `deriv` is already defined in the `stats` package.

### Value

A `polynom` or numeric object giving the result of the calculus operation, or list of such results. If the result is `polynom` the list is a `polylist`.

### References

None

### Examples

    p <- poly.from.zeros(-2:5)
    ip <- integral(p)
    ipv <- integral(p, limits = c(-2, 5))

    plot(polylist(p, deriv(p)))

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

    solve(deriv(H))

[Package PolynomF version 1.0-1 Index]