MathGroup Archive 1997

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

Search the Archive

Re: Problem with collect


Hans Steffani wrote:

> Take
> 
> blah1 vv ss + blah2 vv ss +
> blah3 vv aa + blah4 vv aa +
> blah5 ss aa + blah6 ss aa
> Collect[%,{ss vv,vv aa,ss aa}]
> 
> this produces
> 
> aa blah5 ss + aa blah6 ss + aa blah3 vv + aa blah4 vv +
>   blah1 ss vv + blah2 ss vv
> 
> although I want
> 
> aa vv(blah3+blah4) + ss vv(blah1+blah2) + ss aa(blah5+blah6)

In version 3.0, FullSimplify does what you want.

  In[1]:= FullSimplify[blah1 vv ss + blah2 vv ss + 
	        blah3 vv aa + blah4 vv aa + blah5 ss aa + blah6 ss aa]

  Out[5]= aa (blah5+blah6) ss+aa (blah3+blah4) vv+(blah1+blah2) ss vv

Cheers,
	Paul 
_________________________________________________________________ 
Paul Abbott
Department of Physics                       Phone: +61-9-380-2734 
The University of Western Australia           Fax: +61-9-380-1014
Nedlands WA  6907                         paul at physics.uwa.edu.au 
AUSTRALIA                           http://www.pd.uwa.edu.au/Paul

          God IS a weakly left-handed dice player
_________________________________________________________________


  • Prev by Date: Re: graphic export in mma 3.0
  • Next by Date: Re: Numerical Left Eigenvectors
  • Previous by thread: Re: Problem with collect
  • Next by thread: Beta Testers Wanted