MathGroup Archive 2007

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

Search the Archive

Re: Coefficient...

On Jul 31, 12:05 pm, "Bruno Campanini" <B... at> 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

  • Prev by Date: Re: Dot or Inner ... but not quite
  • Next by Date: Re: Differential eqation: command set up
  • Previous by thread: Re: Coefficient...
  • Next by thread: Re: Coefficient...