reorder takes two arguments : an expression and a vector
of variable names.
reorder expands the expression according to the order of variables
given as second argument.
Input :
^2+2*x*a+a^2+z^2-x*z,[a,x,z])Output :
^2+2*a*x+x^2-x*z+z^2
Warning :
The variables must be symbolic (if not, purge them before calling
reorder)