# How to sort 13 enormous polynomials, each having terms with 5 variables ($1>h_0>h_1>h_2>h_3>h_4$)?

Both algebraically or with software (numerically/computationally, for example) is acceptable. Here is a how one of the polynomials looks like ($L<1$ is a constant).

I have attached a text file with all the 13 polynomials that I need to sort in ascending order - more precisely, I have a target order I need to achieve, so I need to define the ranges of the variables $h_0$ - $h_4$ where that order would be valid. Here is one representative polynomial sample:

$$7 h_0 h_1^2 h_2^2 h_3 L^3 + 29 h_0 h_1^2 h_2^2 h_3 h_4^2 L^4 + 3 h_0 h_2^2 h_4 L^2 + 5 h_0 h_2^2 h_4^3 L^3 + \ldots$$

Each polynomial has approximately 200 terms(!).

• I don't understand completely. Are $h_i$ variables, or are they numbers with the ordering that you present in the title? If they are variables what are the range for each one? And, if that's the case they might be larger in some regions and smaller in others. – nicoguaro Mar 12 '17 at 21:26
• h_i are variables. They are involved in terms that form 13 polynomials. Each of the 13 polynomials represent physical magnitudes that I know how they should be sorted (obtained as experimental evidence), so I need to find variables' regions where that particular polynomial sorting order is valid. One known condition (constraint) for the variables is that 1>h0>h1>h2>h3>h4. – TPank Mar 12 '17 at 22:03
• Is your condition a necessary one but not sufficient one then? – nicoguaro Mar 12 '17 at 22:06
• What you're describing (set given by polynomial inequality constraints) is usually called a semialgebraic set, and it's usually a very difficult problem, in general, when the polynomials are large. Perhaps randomization or cylindrical algebraic decomposition might work? – Kirill Mar 12 '17 at 23:33
• @TPank I would say there isn't enough information in the question to make it easy to help. If Mathematica's CAD works for you, that's great, it's probably more than one can usually hope for with questions of this type. – Kirill Mar 13 '17 at 21:14