# How to order a sum in ascending order of the powers? [closed]

Consider the sum

x^1+x^3+x^2+x^4


I want to order this sum in such the I have the powers in ascending order

x^1+x^2+x^3+x^4


And I want the procedure to be completely general, so that i works on any polynomial of any finite order in x. I have tried Expand (I have another series, not the simple example above) and it doesn't order my series the way I want.

## closed as unclear what you're asking by AccidentalFourierTransform, MarcoB, m_goldberg, Henrik Schumacher, LLlAMnYPJul 27 '18 at 15:02

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• don't you get that by default: expr = x^1 + x^3 + x^2 + x^4; expr? – kglr Jul 25 '18 at 15:14

## 1 Answer

One way is to define function

inverseorder[expr_] := HoldForm[expr /. Plus -> CirclePlus // Evaluate] /. CirclePlus -> Plus