MathGroup Archive 2005

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

Search the Archive

Re: Interesting failure of Collect

  • To: mathgroup at smc.vnet.net
  • Subject: [mg61343] Re: [mg61307] Interesting failure of Collect
  • From: "David Park" <djmp at earthlink.net>
  • Date: Sun, 16 Oct 2005 00:17:58 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Jerry,

It looks like a bug but it is probably an unintuitive feature from trying to
extend the Collect patterns to include numbers. Pi seems to be permitted but
the 1/4 causes the problem. You may be able to overcome the problem by
omitting numbers and including FactorTerms as the last argument in Collect.

Collect[expr, Sin[p]/Pi, FactorTerms]

((1/a + 1/b)*Sin[p])/(4*Pi)

Collect[expr2, Sin[p]/Pi, FactorTerms]

((1/a - 1/b)*Sin[p])/(4*Pi)

The last argument to Collect is easy to overlook and is often quite useful.

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/




From: Blimbaum, Jerry CIV NSWC PC [mailto:jerry.blimbaum at navy.mil]
To: mathgroup at smc.vnet.net


Given the expr =  Sin[p]/(4 Pi a) + Sin[p]/(4 Pi b)

and then applying the command


Collect[expr, Sin[p]/(4 Pi)] works as it should, however,

expr2 = Sin[p]/(4 Pi a) - Sin[p]/(4 Pi b)

leaves the expression untouched.   (I realize I could use Simplify but
this problem occurred on a much longer expression and this is intended
just to convey the basic idea)....for longer expressions the Collect
process works for all quantities with a + sign but the one with a minus
sign will not be collected.....strikes me as a "bug".....


thanks....jerry blimbaum




  • Prev by Date: formatting table with integers and floats in a column
  • Next by Date: Function, Command, Operator, Object...etc.
  • Previous by thread: Re: Interesting failure of Collect
  • Next by thread: Re: Interesting failure of Collect