Bug in CoefficientList?
- To: mathgroup at smc.vnet.net
- Subject: [mg2511] Bug in CoefficientList?
- From: sherod at boussinesq.Colorado.EDU (Scott Herod)
- Date: Wed, 15 Nov 1995 02:01:00 -0500
- Organization: University of Colorado at Boulder
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