Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: Coefficient...

  • To: mathgroup at
  • Subject: [mg79674] Re: Coefficient...
  • From: Adriano Pascoletti <adriano.pascoletti at>
  • Date: Wed, 1 Aug 2007 05:11:50 -0400 (EDT)
  • References: <f8n1i0$j87$>

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...