Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2002
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

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

  • To: mathgroup at smc.vnet.net
  • Subject: [mg35472] Re: How to pick all terms which have are multiplied with a factor, e.g., 2
  • From: "Allan Hayes" <hay at haystack.demon.co.uk>
  • Date: Sun, 14 Jul 2002 06:19:47 -0400 (EDT)
  • References: <agon2r$8fk$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Matthias:

    2 a b^2 c^3 + 12 x y a b + 6 d^-1 +8 //.
        Module[{r},(n_Integer a_. + p_Integer b_.+rr___ )/;((r =
GCD[n,p])>1):>
            r(n/r a + p/r b)+rr]

        2*(a*b^2*c^3 + 3/d + 2*(2 + 3*a*b*x*y))
--
Allan

---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565


"Matthias G. Imhof" <mgi at vt.edu> wrote in message
news:agon2r$8fk$1 at smc.vnet.net...
> 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: Re: How to pick all terms which have are multiplied with a factor, e.g., 2
  • Next by Date: Re: How to pick all terms which have are multiplied with a factor, e.g., 2
  • Previous by thread: Re: 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