# polyder

Polynomial Differentiation

### q = polyder(p)

• p should be a vector, real or complex, containing the coefficients of the polynomial $$p(x)=p_1x^n+p_2x^{n-1}+\cdots+p_nx +p_{n+1},$$ with p(1) being the highest order term.
• q is contains the coefficients of the derivative $$q(x)=\frac{d}{dx}p(x)=np_1x^{n-1}+(n-1)p_2x^{n-2}+\cdots+p_n.$$

### q = polyder(a,b)

• a and b should be vectors, real or complex, containing the coefficients of the polynomials $a(x)$ and $b(x)$, respectively.
• q is the derivative of the product $a(x)b(x)$, i.e., $$q(x)=\frac{d}{dx}\left[a(x)b(x)\right].$$

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

• q and d represent the polynomials $q(x)$ and $d(x)$, which are, respectively, the numerator and denominator of the derivative $$\frac{q(x)}{d(x)}=\frac{d}{dx}\left[\frac{a(x)}{b(x)}\right].$$

Example 1: Differentiating $x^4+2x^3+3x^2+4x+5$ gives $4x^3+6x^2+6x+4$.

polyder(1:5)

ans =
4.000   6.000   6.000   4.000


Example 2: The following two statments give the same results.

q1=polyder(1:5,1:2)
% Differentiation after polynomial multiplication using conv()
q2=polyder(conv(1:5,1:2))

q1 =
5.000   16.00   21.00   20.00   13.00

q2 =
5.000   16.00   21.00   20.00   13.00