MathGroup Archive 2002

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

Search the Archive

Re: How to pick all terms which have are multiplied with a factor, e.g., 2


Would this help?

In[1]:=
expr = 2*a*b^2*c^3 + 13*x*y*a*b + 2/d;

In[2]:=
Cases[expr, 2*_]
Out[2]=
{2*a*b^2*c^3, 2/d}


Tomas Garza
Mexico City
----- Original Message -----
From: "Matthias G. Imhof" <mgi at vt.edu>
To: mathgroup at smc.vnet.net
Subject: [mg35475] [mg35463] How to pick all terms which have are multiplied with a
factor, e.g., 2


> I would like to simplify a large symbolic summation. I know that terms
which
> are multiplied with a common integer factor can ultimately be combined and
> simplified.
>
> As an example: from the sum
>
> 2 a b^2 c^3 + 13 x y a b + 2 d^-1
>
> I would like to pick 2 a b^2 c^3 + 2 d^-1 to combine them; and similarly
for
> other common integer factors. I suspect that patterns would help, but I
did
> not manage to devise a correct one.
>
> Matthias
>
>



  • Prev by Date: mathematicalink for excel xp
  • Next by Date: Re: How to pick all terms which have are multiplied with a factor, e.g., 2
  • Previous by thread: How to pick all terms which have are multiplied with a factor, e.g., 2
  • Next by thread: Re: How to pick all terms which have are multiplied with a factor, e.g., 2