Factorizing linear equations



On Dec 3, 2007 4:20 AM, Adi Shavit <adish at eyetech.jp> wrote:
> What if my eq has scalar elements too as in
>
> eq: a*x+b*y+3*x+9*z-4;
>
> Then how do I also extract the free variable, i.e. -4 in your example?

Somehow I knew you were going to ask that....  The simplest way I can
think of is

    block([res: eq], for i in U do res: subst(0,i,res), return(res))

but there's probably a better way....

        -s