I want to use Eliminate commands to 70 coupled multivariable polynomial equations, but the code is too slow. (It does not show result after 30 minutes in my laptop.)

In my code, I want to find a condition on parameters such that the $4\times 4$ matrix $h(px, py)$ and $h(px+ps, pyy)$ has a common eigenvalue and common eigenvector. This condition can be written as a polynomial system. The following code gives background definitions. In particular, cond contains 70 polynomial conditions.

Note:The working mechanism of the code is nicely explained in the following link:


The following is my code:

$Assumptions = {Element[px, Reals], 
   Element[ps, Reals], \[CapitalDelta] > 0, 0 < \[Phi] < 2*Pi, 
       Element[\[Mu], Reals], v > 0, 0 < e < \[CapitalDelta], W > 0}; 
h = ArrayFlatten[{{v*px*PauliMatrix[1] + 
       v*py*PauliMatrix[2] - \[Mu]*IdentityMatrix[2], 
       IdentityMatrix[2]}, {\[CapitalDelta]*Exp[(-I)*\[Phi]]*
             -(v*px*PauliMatrix[1] + 
         v*py*PauliMatrix[2] - \[Mu]*IdentityMatrix[2])}}] /. 
       {v -> 1}; 
totalmat = ArrayFlatten[{{h - e*IdentityMatrix[4]}, 
         {(h /. {\[Phi] -> 0, px -> px + ps, py -> pyy}) - 
matlist = (totalmat[[#1, {1, 2, 3, 4}]] & ) /@ 
   Subsets[Range[8], {4}]; 
cond = (Det[#1] == 0 & ) /@ matlist; 

And then, finally, I want to eliminate px, py, and pyy:

Eliminate[cond, {px, py, pyy}]

This part is very slow! I want either of the following:

  1. Estimate the remaining time to finish the computation.
  2. See the intermediate result of calculation.

How can I do either of the above one?

  • 2
    $\begingroup$ (1) Eliminate is using dated technology. For such a task you'd do better with GroebnerBasis[...,MonomialOrder->EliminationOrder]. $\endgroup$ Mar 27, 2021 at 15:06
  • 2
    $\begingroup$ (2) There is no plausible way to know how "close" a Groebner basis computation might be to completion. So the answer to the question asked is "No". $\endgroup$ Mar 27, 2021 at 15:07
  • 1
    $\begingroup$ (3) Even with the best of under-the-hood code, it seems like the size of this computation will put it out of reach. I wonder if there might be different formulations though. This is sometimes the case when dealing with eigenvalue questions: one formulation might involve quadratics while another becomes a linear algebra problem. $\endgroup$ Mar 27, 2021 at 15:10
  • 1
    $\begingroup$ ...and (4) It is an odd coincidence that you have an eigenvalue problem, given that your parents named you "eigenvalue". (Sorry, couldn't let that one pass...) $\endgroup$ Mar 27, 2021 at 15:11
  • $\begingroup$ Now to look at the underlying problem. As noted in your math.SE post, you can deduce a common eigenvalue condition from a resultant computation involving just two polynomials. This should (a) be tractable and (b) give finitely many values to check. You could then brute-force check each to see if they also share an eigenvector. $\endgroup$ Mar 27, 2021 at 15:19


Your Answer

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

Browse other questions tagged or ask your own question.