MathGroup Archive 2008

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

Search the Archive

Re: How to select terms wanted in a series

  • To: mathgroup at smc.vnet.net
  • Subject: [mg85950] Re: How to select terms wanted in a series
  • From: Bill Rowe <readnewsciv at sbcglobal.net>
  • Date: Thu, 28 Feb 2008 02:55:47 -0500 (EST)

On 2/27/08 at 4:33 AM, GRseminar at gmail.com (Barrow) wrote:

>I have an expression, which is a sum of large number of terms, e.g.

>expression = x + 2x*y - x*y*z + u*x*y + 3u^2

>And I want to select out terms with the factor (x*y). e.g.

>The terms in "expression" that I want are 2x*y, -x*y*z, u*x*y

Try using Coefficient, i.e.

In[5]:= Coefficient[x + 2 x*y - x*y*z + u*x*y + 3 u^2, x y]

Out[5]= u-z+2

or if you want a list

List@@Coefficient[[x + 2 x*y - x*y*z + u*x*y + 3 u^2, x y]
--
To reply via email subtract one hundred and four


  • Prev by Date: Re: How to select terms wanted in a series
  • Next by Date: Series solution for complicated function
  • Previous by thread: Re: How to select terms wanted in a series
  • Next by thread: Re: How to select terms wanted in a series