Solving system of polynomial inequalities in SageMath 8.1
Hi everyone!
I am currently trying to use SageMath for the solution of a system of polynomial inequalities. In the first place based on the documentation and because solutions were returned I used the "solve" command and the "solve_ineq" command. However, when I tried to verify the answers with the one computed by Mathematica I realised the solutions were not the same. Is this a bug in the current version?
Also, I am trying to do it the normal way by computing the CAD using QEPCAD but when I tried to replicate the example on the website I get the following error:
RuntimeError: unable to start QEPCAD
I am using SageMath 8.1 in Windows 7 64bit and jupyter notebook for interface that I call using the SageMath shell, if that is of any help.
The system I am referring to is the following:
sys=[0.800000000000000theta1x1 + 0.100000000000000theta2x2 - 24000, 0.100000000000000theta2x2 + 0.0500000000000000x1 - 2000, 0.100000000000000x1 + 0.360000000000000*x2 - 6000, -x1, -x2, -theta1 - 5, theta1 - 5, -theta2 - 5, theta2 - 5, -lamda1, -lamda2, -lamda3, -lamda4, -lamda5]
and using the following substitution:
sol=[x1 == 440000/(16theta1 - 1), x2 == 80000(4theta1 - 3)/(16theta1theta2 - theta2), lamda1 == 54(3theta2 - 2)/(16theta1theta2 - theta2), lamda2 == 54(32theta1 - 3theta2)/(16theta1theta2 - theta2), lamda3 == 0, lamda4 == 0, lamda5 == 0]
The output of
solve([sys[i].subs(sol)<=0 for i in range(0,len(sys))], theta1, theta2)
is
[]
Sorry for the long post but I would really appreciate and help with regards on how to solve such as system of inequalities and whether solve command has a bug?
Best, Jason
To display inline code, like
f
, use backticks.To display blocks of code or error messages, separate them by a blank line from the rest of the text, and do one of the following (all give the same result):
For instance, typing
produces:
Please edit your question to do that.