factor/simplification problem



>
> Using the divsimp function I just sent,
>

Actually, this slightly enhanced divsimp:

divsimp(ex,div):=
  if atom(ex) then ex
  elseif part(ex,0)="+"
  then block([quorem: divide(ex,div)],
                factorsum(quorem[1])*factorsum(div)
                   + factorsum(quorem[2]))
  else map(lambda([q],divsimp(q,div)),ex)$