multiplying polynomials with differing number of variables