# Documentation

### This is machine translation

Translated by
Mouse over text to see original. Click the button below to return to the English verison of the page.

## Integrate and Differentiate Polynomials

This example shows how to use the polyint and polyder functions to analytically integrate or differentiate any polynomial represented by a vector of coefficients.

Use polyder to obtain the derivative of the polynomial . The resulting polynomial is .

p = [1 0 -2 -5]; q = polyder(p) 
q = 3 0 -2 

Similarly, use polyint to integrate the polynomial . The resulting polynomial is .

p = [4 -3 0 1]; q = polyint(p) 
q = 1 -1 0 1 0 

polyder also computes the derivative of the product or quotient of two polynomials. For example, create two vectors to represent the polynomials and .

a = [1 3 5]; b = [2 4 6]; 

Calculate the derivative by calling polyder with a single output argument.

c = polyder(a,b) 
c = 8 30 56 38 

Calculate the derivative by calling polyder with two output arguments. The resulting polynomial is

 
[q,d] = polyder(a,b) 
q = -2 -8 -2 d = 4 16 40 48 36