MathGroup Archive 1998

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

Search the Archive

Re: Extracting polynomial coefficients?



> Subject: [mg11537]       [mg11464] Extracting polynomial coefficients?

> I have a very long polynomial that's a function of four variables, a, b,
> c, d.  I would like Mathematica to (1) tell me what combinations of a,
> b, c, and d are in my polynomial, and (2) tell me what the coefficients
> are for each of the variable terms.
> 
Maybe the following is of some help:

Let us call your very long polynomial pol. If necessary, write pol as  a
polynomial in a, b, c, d:

pol = Collect[ pol, a^_. b^_. c^_. d^_. ]

To find out which terms appear and with what coefficient, you can use 
Cases:

Cases[ pol, coef_. a^na_. b^nb_.c^nc_. d^nd_. :> {a^na b^nb c^nc  d^nd,
coef} ]

Regards,




Fred Simons
Eindhoven University of Technology



  • Prev by Date: RE: Plotting points in 3D
  • Next by Date: RE: Extracting polynomial coef
  • Prev by thread: Re: Extracting polynomial coefficients?
  • Next by thread: RE: Extracting polynomial coefficients?