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],
\[CapitalDelta]*Exp[I*\[Phi]]*
IdentityMatrix[2]}, {\[CapitalDelta]*Exp[(-I)*\[Phi]]*
IdentityMatrix[2],
-(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}) -
e*IdentityMatrix[4]}}];
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:
- Estimate the remaining time to finish the computation.
- See the intermediate result of calculation.
How can I do either of the above one?
Eliminate
is using dated technology. For such a task you'd do better withGroebnerBasis[...,MonomialOrder->EliminationOrder]
. $\endgroup$