polyder

Derivative of a polynomial, or of a product or quotient of polynomials.

Category: Mathematics > Elementary Math

Syntax

k = polyder(p)

Returns the coefficients of the derivative of p.

k = polyder(a, b)

Returns the derivative of the product conv(a, b).

[q, d] = polyder(b, a)

Returns the derivative of the quotient b/a as numerator q and denominator d.

Description

For p = [p1 p2 ... pn] representing p1*x^(n-1) + ... + pn, each coefficient is multiplied by its power and the degree drops by one. The two-input form avoids forming the product first, and the quotient form applies (b'a - b a')/a^2, giving a denominator a^2 (not reduced).

To integrate instead, use polyint.

Input arguments

p, a, b
Coefficient vectors, highest power first.

Output arguments

k
Coefficients of the derivative; a constant polynomial gives 0.
q, d
Numerator and denominator of the derivative of a quotient.

Example

Polynomial, product and quotient

polyder([1 2 3 4])
polyder([1 1], [1 -1])
[q, d] = polyder([1 2], [1 3])
Output
ans = 1×3

     3     4     3
ans = 1×2

     2     0
q = 1
d = 1×3

     1     6     9

See also

polyint polyval conv deconv roots