How to help maxima get equation grouped nicely



On 08/20/2011 08:03 AM, dlakelan wrote:
> Suppose I have an equation of the form:
> 
> A*foo + A*bar + A*baz + B*quux
> 
> how can I get maxima to reformat this as:
> 
> A*(foo+bar+baz) + B*quux

I should mention that A and B are not simple single variables but rather
rational expressions of two variables which do not appear in foo, bar,
baz, or quux