Re: problem with Coefficient
- To: mathgroup@smc.vnet.net
- Subject: [mg12228] Re: problem with Coefficient
- From: Bill Bertram <wkb@ansto.gov.au>
- Date: Fri, 1 May 1998 03:09:16 -0400
- Organization: ANSTO
- References: <6hpar9$d3k@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
Looks like a bug to me! Mathematica version 2.2.3 handles this
correctly. However I don't think it is simply a question of prohibited
variable names. For example in version 3.0
Coefficient[x1^2 y2^2, x1^2 y2^2] yields 1, but after changing the y to
an x, it reverts back to 0! Also, both
Coefficient[x2^2 ,x2^2] and Coefficient[x1 x2,x1 x2]
give correctly 1. However if, in the latter you replace x1 by x1^2, you
get 0 again.
All very puzzling!
Cheers,
Bill