Re: problem with Coefficient
- To: mathgroup@smc.vnet.net
- Subject: [mg12135] Re: [mg12041] problem with Coefficient
- From: Sean Ross <seanross@worldnet.att.net>
- Date: Mon, 27 Apr 1998 01:46:18 -0400
- References: <199804240552.BAA13217@smc.vnet.net.>
vonessen@selway.umt.edu wrote: > > The Mathematica function Coefficient seemingly does not always work as > it should: > > In[1]:=Coefficient[x^2 y^2,x^2 y^2] > Out[1]=1 > In[2]:=Coefficient[x1^2 x2^2,x1^2 x2^2] Out[2]=0 > > The first computation is correct, the second not. I made this > computation on several computers using Mathematica 3.0 under Windows > 95. No help, but some other input to the discussion: returns Coefficient[x^2 y^2,x^2 y^2] 1 Coefficient[x1^2 y1^2,x1^2 y1^2] 1 Coefficient[x1^2 y2^2,x1^2 y2^2] 1 Coefficient[x1^2 x2^2,x1^2 x2^2] 0 Coefficient[(x1)^2 (x2)^2,Evaluate[(x1)^2 (x2)^2]] 0 Coefficient[x2^2 x3^2,x2^2 x3^2] 0 Coefficient[fred2^2 fred3^2,fred2^2 fred3^2] 0 Coefficient[polly2^2 fred3^2,polly2^2 fred3^2] 0 Coefficient[p^2 f^2,p^2 f^2] 1 Coefficient[Evaluate[x1^2 x2^2/.{x1->x,x2->y}], Evaluate[x1^2 x2^2/.{x1->x,x2->y}]] 1 It seems like it cannot correctly handle similar symbols or long symbol names and works best with single letters and no numbers. This is a strange limitation. I wonder if this would pass technical supports definition of a bug? If it is not a bug, but a "feature", I would be very interested to know the explanation.
- References:
- problem with Coefficient
- From: vonessen@selway.umt.edu
- problem with Coefficient