MathGroup Archive 1995

[Date Index] [Thread Index] [Author Index]

Search the Archive

Bug in CoefficientList?


I want to use CoefficientList to make an array of the coefficients
of a polynomial in several variables.  An example might be the equation

Mathematica 2.2 for Solaris
Copyright 1988-93 Wolfram Research, Inc.
License valid through 28 Nov 1995.
 -- Open Look graphics initialized -- 

In[1]:= eqn = y + y^2*z^2 + x*z^3 + x*y + x*y*z^3 + x*y^2

                     2    2  2      3        3
Out[1]= y + x y + x y  + y  z  + x z  + x y z


In[3]:= PolynomialQ[eqn, {x,y,z}]

Out[3]= True


Now, when I try to make the array of Coefficients,

In[4]:= A = CoefficientList[eqn, {x,y,z}]

Out[4]= {{{}, {1, 0, 0, 0}, {0, 0, 1, 0}}, 
 
>    {{0, 0, 0, 1}, {1, 0, 0, 1}, {1, 0, 0, 0}}}


This is not a tensor.  However,

In[5]:= A = CoefficientList[eqn + 1, {x,y,z}]

Out[5]= {{{1, 0, 0, 0}, {1, 0, 0, 0}, {0, 0, 1, 0}}, 
 
>    {{0, 0, 0, 1}, {1, 0, 0, 1}, {1, 0, 0, 0}}}


seems to work.

Is this a bug in the CoefficientList routine?  I cannot make the error
occur if I use only two variables.

Scott Herod


  • Prev by Date: MacTCP+PPP/ SuperBoomerang conflict?
  • Next by Date: Re: Logic Problems
  • Previous by thread: Re: MacTCP+PPP/ SuperBoomerang conflict?
  • Next by thread: Bug in CoefficientList?