Re: Coefficient...
- To: mathgroup at smc.vnet.net
- Subject: [mg79674] Re: Coefficient...
- From: Adriano Pascoletti <adriano.pascoletti at gmail.com>
- Date: Wed, 1 Aug 2007 05:11:50 -0400 (EDT)
- References: <f8n1i0$j87$1@smc.vnet.net>
On Jul 31, 12:05 pm, "Bruno Campanini" <B... at gmail.com> wrote:
> Given fx:=ax^2 + dxy + 2cx + bcxz
> Coefficient[fx,x] gives dy + 2c + bcz but I only need 2c.
>
> Without any If clause, is it possible to get Coefficient not
> to look on terms containing y or z?
>
> Bruno
Probably the most natural solution is to evaluate your result at y=0
and z=0:
In[17]:= Coefficient[fx, x] /. {y -> 0, z -> 0}
Out[17]= 2*c
Adriano Pascoletti