File: integral.polynomial.Rd

package info (click to toggle)
r-cran-polynom 1.4-1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 212 kB
  • sloc: makefile: 2
file content (34 lines) | stat: -rw-r--r-- 880 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
\name{integral.polynomial}
\alias{integral}
\alias{integral.polynomial}
\title{Integrate a Polynomial}
\description{
  Find the integral of a univariate polynomial.
}
\usage{
\method{integral}{polynomial}(expr, limits = NULL, ...)
}
\arguments{
  \item{expr}{an object of class \code{"polynomial"}.}
  \item{limits}{numeric vector of length 2 giving the integration
    limits.}
  \item{\dots}{further arguments to be passed to or from methods.}
}
\value{
  If \code{limits} is not given, the integral of \code{p} from 0 to
  \sQuote{x}'.  Otherwise, the integral with the given integration
  limits.
}
\seealso{
  \code{\link{deriv.polynomial}}
}
\examples{
p <- poly.calc(1:5)
p
## -120 + 274*x - 225*x^2 + 85*x^3 - 15*x^4 + x^5
deriv(p)
## 274 - 450*x + 255*x^2 - 60*x^3 + 5*x^4
integral(deriv(p)) - 120
## -120 + 274*x - 225*x^2 + 85*x^3 - 15*x^4 + x^5
}
\keyword{symbolmath}