polyint: Anti-derivative of Polynomial

Description Usage Arguments Details Value See Also Examples

View source: R/polynomials.R

Description

Integrate polynomials.

Usage

1
  polyint(p, k)

Arguments

p

polynomial p given as a vector

k

an integration constant

Details

Calculates the integral, i.e. the antiderivative, of a polynomial and adds a constant of integration k if given, else 0.

Value

a vector representing a polynomial

See Also

polyval, polyder

Examples

1
  polyint(c(1, 1, 1, 1, 1), 1)

Example output

[1] 0.2000000 0.2500000 0.3333333 0.5000000 1.0000000 1.0000000

pracma documentation built on Dec. 11, 2021, 9:57 a.m.