1
$\begingroup$

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.

$\endgroup$

closed as unclear what you're asking by AccidentalFourierTransform, MarcoB, m_goldberg, Henrik Schumacher, LLlAMnYP Jul 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.

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

One way is to define function

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.