Factor part of an expression



One way to do this is to use the format package. You can find 
documentation for it in /share/contrib/format/format.ps.

    (%i7) load(format)$

   (%i8) format(a+b*x+c*x,%poly(x));
   (%o8) (c+b)*x+a

Another way is to use facsum:

   (%i9) facsum(a+b*x+c*x,x);
   (%o9) (c+b)*x+a


--Barton

maxima-bounces at math.utexas.edu wrote on 08/25/2010 03:58:18 PM:


> Is there a simple way to get maxima to simplify
> 
>    a+b*x+c*x
> 
> to
> 
>    a+(b+c)*x
> 
> (In real life, a,b,c, and x may all be more complex expressions.)
> 
> -- 
> Daniel M. Israel                        Mail Stop P365
> Staff Scientist                         Los Alamos National Laboratory
> XCP-4-Methods & Algorithms              Phone: (505)-665-5664
>                                          E-mail: dmi1 at lanl.gov
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima