Search code examples
expressionmaximadisplay

Control the ordering of the output expression from factor


Can I control the ordering of the output expressions in maxima's factor() function?

factor(7*x^2-7*x);

returns

7*(x-1)*x

but I would like to get

7*x*(x-1)

Solution

  • There isn't any simple way to get a specific ordering of terms. Maxima has a pretty strong idea about ordering and it isn't easy to change. My advice is to let it go and just get used to it; I don't think it's worth the trouble to try to change it. In fact, in this case, in which you are trying to change the ordering of x and x - 1, I don't think there is a way to do it.