[ top | up ]
Differentiate a Polynomial
Usage
deriv(p)
Arguments
p
|
Object of class polynomial
|
Description
Calculates the derivative of a univariate polynomial with respect to x.
A method function for the deriv generic.
Value
Derivative of the polynomial.
See Also
integral.polynomial, deriv
Examples
pr <- poly.from.zeros(1:5)
pr
## -120 + 274*x - 225*x^2 + 85*x^3 - 15*x^4 + x^5
deriv(pr)
## 274 - 450*x + 255*x^2 - 60*x^3 + 5*x^4