Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1995
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1995

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

Search the Archive

Bug in CoefficientList?

  • Subject: [mg2511] Bug in CoefficientList?
  • From: sherod at boussinesq.Colorado.EDU (Scott Herod)
  • Date: Wed, 15 Nov 1995 07:01:00 GMT
  • Approved: usenet@wri.com
  • Distribution: local
  • Newsgroups: wri.mathgroup
  • Organization: University of Colorado at Boulder
  • Sender: daemon at wri.com ( )

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?