Maxima Function
listofvars (expr)
Returns a list of the variables in expr.
listconstvars if true causes listofvars to include %e, %pi,
%i, and any variables declared constant in the list it returns if they
appear in expr. The default is to omit these.
(%i1) listofvars (f (x[1]+y) / g^(2+a)); (%o1) [g, a, x , y] 1