maxima is more than 500 times slower than maple



My guess is that you are doing a vastly different computation, perhaps 
repeating unnecessary simplifications,
in your Maxima specifications.  Nevertheless, the Maple computation 
would ordinarily be somewhat faster.

I'm not sure what you wish to accomplish by expand()  or ratsimp.

For example, expand((a+b+c+d)^30)  takes 0.83 seconds but 
rat((a+b+c+d)^30)  takes 0.05 seconds.

I think that Valery Pipin's response excludes the (commented out) 
long-running command at the end.

A way to do substitutions fast may be to define functions and then bind 
parameters.

eg.

  form(x,y,z):=  .....

then


form(a,b,c) + form (c,a,b) + ....

RJF