Polynomial Multiplication Calculator
The polynomial multiplication calculator takes two univariate polynomials, each represented as a set of coefficients, and multiplies them together to generate the resulting polynomial.
The user enters the coefficients for each polynomial separated by space, where a coefficient can be any number type (integer, real, or complex). If a polynomial term is empty, the coefficient for that term should be zero.
The calculator first checks the degree of each polynomial, which is determined by the highest power of the variable in the polynomial. It then multiplies the coefficients of each term in one polynomial by each term in the other polynomial and combines the like terms, simplifying the resulting polynomial as much as possible.
Polynomial multiplication formula:
(a_{r}x^{r} + ... + a_{0})(b_{s}x^{s} + ... + b_{0})=p_{r+s}x^{r+s} + ... + p_{0},
where p_{k}=a_{0}b_{k} + a_{1}b_{k1} + ... + a_{k1}b_{1} + a_{k}b_{0}
Note: a_{i} = 0 when i>r and b_{j} = 0 when j>s ^{1}

Donald E. Knuth The art of computer programming. Third edition. Vol. 2. Seminumerical Algorithms ↩
Comments