Currently, ev(...,expand) is equivalent to
ev(...,expop:maxposex,expon:maxnegex).
This means that expansion is active throughout the evaluation of ..., which
sometimes gives surprising results:
ex:(x+1)^2*(x-1)^2;
part(ex,1),expand => x^4
equivalent to part(ex,1),expop:maxposex,expon:maxnegex
equivalent in effect to part(expand(ex),1)
cf.
part(ex,1),ratsimp => x^2-2*x+1
equivalent to ratsimp(part(ex,1))
I think it would be more consistent and thus easier to understand if expand
worked like every other command in ev, namely that it called the command
*after* evaluating the expression.
EV would remain weird and confusing in other ways, but at least this would
be simpler....
-s