bundles / numpy 2.4.4 / numpy / polyder
_ArrayFunctionDispatcher
numpy:polyder
Signature
def polyder ( p , m = 1 ) Summary
Return the derivative of the specified order of a polynomial.
Extended Summary
Parameters
p: poly1d or sequencePolynomial to differentiate. A sequence is interpreted as polynomial coefficients, see
poly1d.m: int, optionalOrder of differentiation (default: 1)
Returns
der: poly1dA new polynomial representing the derivative.
Examples
The derivative of the polynomial :math:`x^3 + x^2 + x^1 + 1` is:import numpy as np
✓p = np.poly1d([1,1,1,1]) p2 = np.polyder(p) p2✓
p2(2.)
✗(p(2. + 0.001) - p(2.)) / 0.001
✗np.polyder(p, 2) np.polyder(p, 3) np.polyder(p, 4)✓
See also
- poly1d
Class for one-dimensional polynomials.
- polyint
Anti-derivative of a polynomial.
Aliases
-
numpy.polyder