I have a three-element list which contains inverses of a function u, like so:

CEs = {(u^(-1))[0.448165 u[10]+0.551835 u[30]],(u^(-1))[0.296264 u[10]+0.703736 u[30]],30}

I would now like to obtain the ranking of the elements of this list under the assumption that u is strictly increasing but struggle even to understand the output of


, which gives

{2, 3, 1}

without Mathematica knowing anything about u. Could someone explain to me how this ranking comes about and how I might be able to teach Mathematica that u is strictly increasing and to order elements under this assumption? In the current case the ordering should be

{1, 2, 3}
  • $\begingroup$ That explains the ordering Mathematica returns. Anyway I can teach it to sort assuming that u is strictly increasing? $\endgroup$
    – RoyalTS
    Jul 30, 2013 at 10:50

1 Answer 1


If $ u $ is strictly increasing, then so is $ u^{-1}. $ You don't really care about their values so a representative of strictly increasing functions will preserve the ordering. $ y=x $ is such a function so I am replacing your u, u^(-1) with Identity and the ordering is the desired:

CEs = {(u^(-1))[0.448165 u[10] + 0.551835 u[30]], (u^(-1))[
   0.296264 u[10] + 0.703736 u[30]], 30};
CEs /. Thread[{u, u^(-1)} -> Identity] // Ordering

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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