Power Series

This module provides a number of functions useful for dealing with polynomials.

Constants

polydomain

Polynomial default domain.

polyzero

Polynomial coefficients representing zero.

polyone

Polynomial coefficients representing one.

polyx

Polynomial coefficients representing the identity x.

Arithmetic

polyadd(c1, c2)

Add one polynomial to another.

polysub(c1, c2)

Subtract one polynomial from another.

polymulx(c[, mode])

Multiply a polynomial by x.

polymul(c1, c2[, mode])

Multiply one polynomial by another.

polydiv(c1, c2)

Divide one polynomial by another.

polypow(c, pow[, maxpower])

Raise a polynomial to a power.

polyval(x, c[, tensor])

Evaluate a polynomial at points x.

polyval2d(x, y, c)

Evaluate a 2-D polynomial at points (x, y).

polyval3d(x, y, z, c)

Evaluate a 3-D polynomial at points (x, y, z).

polygrid2d(x, y, c)

Evaluate a 2-D polynomial on the Cartesian product of x and y.

polygrid3d(x, y, z, c)

Evaluate a 3-D polynomial on the Cartesian product of x, y and z.

Calculus

polyder(c[, m, scl, axis])

Differentiate a polynomial.

polyint(c[, m, k, lbnd, scl, axis])

Integrate a polynomial.

Misc Functions

polyfromroots(roots)

Generate a monic polynomial with given roots.

polyroots(c)

Compute the roots of a polynomial.

polyvalfromroots(x, r[, tensor])

Evaluate a polynomial specified by its roots at points x.

polyvander(x, deg)

Vandermonde matrix of given degree.

polyvander2d(x, y, deg)

Pseudo-Vandermonde matrix of given degrees.

polyvander3d(x, y, z, deg)

Pseudo-Vandermonde matrix of given degrees.

polycompanion(c)

Return the companion matrix of c.

polyfit(x, y, deg[, rcond, full, w])

Least-squares fit of a polynomial to data.

polytrim(c[, tol])

Remove "small" "trailing" coefficients from a polynomial.

polyline(off, scl)

Returns an array representing a linear polynomial.