polynomial

This module includes a Polynomial class for dealing with polynomial arithmetics, and a set of functions for creating and manipulating polynomials.

Polynomial Class

Polynomial
A Polynomial class.

Basics

polyval
Evaluate polynomial at point(s) x.
polyroots
Compute the roots of a polynomial.
polyfromroots
Build a polynomial from its roots.

Fitting

polyfit
Least squares polynomial fit.
polyvander
Vandermonde matrix of given degree.

Calculus

polyder
Differentiate a polynomial.
polyint
Integrate a polynomial.

Algebra

polyadd
Add two polynomials.
polysub
Substract two polynomials.
polymul
Multiply two polynomials.
polydiv
Divide two polynomials.
polymulx
Multiply a polynomial by \(X\).
polypow
Raise a polynomial to a power.

Miscellaneous

polycompanion
Compute the companion matrix of a polynomial.
polytrim
Remove trailing coefficients from a polynomial.