Main Content

polyder

Polynomial differentiation

Description

example

k= polyder(p)returns the derivative of the polynomial represented by the coefficients inp,

k ( x ) = d d x p ( x ) .

example

k= polyder(a,b)returns the derivative of the product of the polynomialsab,

k ( x ) = d d x [ a ( x ) b ( x ) ] .

example

[q,d] = polyder(a,b)returns the derivative of the quotient of the polynomialsab,

q ( x ) d ( x ) = d d x [ a ( x ) b ( x ) ] .

Examples

collapse all

Create a vector to represent the polynomial p ( x ) = 3 x 5 - 2 x 3 + x + 5 .

p = [3 0 -2 0 1 5];

Usepolyderto differentiate the polynomial. The result is q ( x ) = 1 5 x 4 - 6 x 2 + 1 .

q = polyder(p)
q =1×515 0 -6 0 1

Create two vectors to represent the polynomials a ( x ) = x 4 - 2 x 3 + 1 1 b ( x ) = x 2 - 1 0 x + 1 5 .

a = [1 -2 0 0 11]; b = [1 -10 15];

Usepolyderto calculate

q ( x ) = d d x [ a ( x ) b ( x ) ] .

q = polyder(a,b)
q =1×66 -60 140 -90 22 -110

The result is

q ( x ) = 6 x 5 - 6 0 x 4 + 1 4 0 x 3 - 9 0 x 2 + 2 2 x - 1 1 0 .

Create two vectors to represent the polynomials in the quotient,

x 4 - 3 x 2 - 1 x + 4 .

p = [1 0 -3 0 -1]; v = [1 4];

Usepolyderwith two output arguments to calculate

q ( x ) d ( x ) = d d x [ p ( x ) v ( x ) ] .

[q,d] = polyder(p,v)
q =1×53 16 -3 -24 1
d =1×31 8 16

The result is

q ( x ) d ( x ) = 3 x 4 + 1 6 x 3 - 3 x 2 - 2 4 x + 1 x 2 + 8 x + 1 6 .

Input Arguments

collapse all

Polynomial coefficients, specified as a vector. For example, the vector[1 0 1]represents the polynomial x 2 + 1 , and the vector[3.13 -2.21 5.99]represents the polynomial 3.13 x 2 2.21 x + 5.99 .

For more information, seeCreate and Evaluate Polynomials.

Data Types:single|double
Complex Number Support:Yes

Polynomial coefficients, specified as two separate arguments of row vectors.

For more information, seeCreate and Evaluate Polynomials.

Example:polyder([1 0 -1],[10 2])

Data Types:single|double
Complex Number Support:Yes

Output Arguments

collapse all

Differentiated polynomial coefficients, returned as a row vector.

Numerator polynomial, returned as a row vector.

Denominator polynomial, returned as a row vector.

Extended Capabilities

版本历史

Introduced before R2006a