# Quickly Solving a High-Order Root System of Equations of Arbitrary Form

I have the following system of equations that involve some rather complicated exponents:

$$\left\{\frac{\mathit{a} \sigma ^{41/34}}{\mathit{m}^{8/119} \mathcal{M}^{28/17}}=1,\frac{\mathit{b}\mathit{q}\mathit{m}^{2/3} \mathcal{M}^3}{\sqrt{\sigma }}=1,\frac{\mathit{f} \mathit{c} \mathit{m}^{436/357}}{\sigma ^{48/17} \mathcal{M}^{38/51}}=1\right\}$$

I'd like Mathematica to find the positive, real solutions to this equation for $\mathcal{M}$, $\sigma$, and $q$, ($a$, $b$, $c$, $m$, and $f$ remain undefined) and Solve is able to do this, but it literally takes ~30 minutes to solve the expression:

FullSimplify[Abs[Cases[({sigma, M, q} /.
Solve[expression, {sigma, M, q}]), _?(FreeQ[N[#, 16], Complex] &&
FreeQ[N[#, 16], Positive] &)][[1]]],
Assumptions -> Join[assume, # > 0 & /@ coeffs]]


I noticed if I make one simple change to the expression, multiplying the RHS by the denominators, i.e.

$$\left\{\mathit{a} \sigma ^{41/34}=\mathit{m}^{8/119} \mathcal{M}^{28/17},\mathit{b}\mathit{q}\mathit{m}^{2/3} \mathcal{M}^3 = \sqrt{\sigma },\mathit{f} \mathit{c} \mathit{m}^{436/357} = \sigma ^{48/17} \mathcal{M}^{38/51}\right\}$$

...then the expression solves in about 30 seconds. Unfortunately, it is the first form that is spat out by my previous lines of code, and that form is not the same for each evaluation.

I'm wondering why the first solve is so much more expensive than the second, and if there are strategies I can use when simplifying expressions to guarantee that Solve won't choke on them.

• For starters, when you divide you need to check for all possible zeroes ... – Dr. belisarius Jan 21 '16 at 16:32
• see if Denominator[ ] helps you out ... – Dr. belisarius Jan 21 '16 at 16:34
• @Dr.belisarius I didn't have assume definition up in the question, but all quantities are real and greater than zero. – Guillochon Jan 21 '16 at 16:36
• I routinely do exprs=Apply[Subtract,eqns,{1}]; neweqns=Thread[Numerator[Together[exprs]]==0]; – Daniel Lichtblau Jan 21 '16 at 16:46
• @DanielLichtblau That works great! I guess the main overhead here is the "checking for zeroes" part. – Guillochon Jan 21 '16 at 17:03