[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |

## 27.4 Derivatives and Integrals

Octave comes with functions for computing the derivative and the integral
of a polynomial. The functions `polyderiv`

and `polyint`

both return new polynomials describing the result. As an example we'll
compute the definite integral of *p(x) = x^2 + 1* from 0 to 3.

c = [1, 0, 1]; integral = polyint(c); area = polyval(integral, 3) - polyval(integral, 0) ⇒ 12 |

__Function File:__**polyderiv***(*`c`)__Function File:__[`q`] =**polyderiv***(*`b`,`a`)__Function File:__[`q`,`r`] =**polyderiv***(*`b`,`a`)Return the coefficients of the derivative of the polynomial whose coefficients are given by vector

`c`. If a pair of polynomials is given`b`and`a`, the derivative of the product is returned in`q`, or the quotient numerator in`q`and the quotient denominator in`r`.**See also:**poly, polyinteg, polyreduce, roots, conv, deconv, residue, filter, polygcd, polyval, polyvalm.

__Function File:__**polyder***(*`c`)__Function File:__[`q`] =**polyder***(*`b`,`a`)__Function File:__[`q`,`r`] =**polyder***(*`b`,`a`)See polyderiv.

__Function File:__**polyinteg***(*`c`)Return the coefficients of the integral of the polynomial whose coefficients are represented by the vector

`c`.The constant of integration is set to zero.

**See also:**polyint, poly, polyderiv, polyreduce, roots, conv, deconv, residue, filter, polyval, polyvalm.

__Function File:__**polyint***(*`c`,`k`)Return the coefficients of the integral of the polynomial whose coefficients are represented by the vector

`c`. The variable`k`is the constant of integration, which by default is set to zero.**See also:**poly, polyderiv, polyreduce, roots, conv, deconv, residue, filter, polyval, polyvalm.

[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |