ratsimp and many terms to collect. 3 lines.



Interesting; this provides something for free:

(%i8) change(x^a*x^b*z^r);

(%o8) x^(b+a)*z^r
(%i9) change(a^x*b^x*z^r);

(%o9) (a*b)^x*z^r

BTW isn't this a response to "Simplifying x^a*y^a to (x*y)^a" or am I
missing something?

-- 
Bill Wood