ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 10 Feb 2018 07:58:03 -0600Solving system of polynomial inequalities in SageMath 8.1http://ask.sagemath.org/question/41056/solving-system-of-polynomial-inequalities-in-sagemath-81/ 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.800000000000000*theta1*x1 + 0.100000000000000*theta2*x2 - 24000,
0.100000000000000*theta2*x2 + 0.0500000000000000*x1 - 2000,
0.100000000000000*x1 + 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/(16*theta1 - 1),
x2 == 80000*(4*theta1 - 3)/(16*theta1*theta2 - theta2),
lamda1 == 54*(3*theta2 - 2)/(16*theta1*theta2 - theta2),
lamda2 == 54*(32*theta1 - 3*theta2)/(16*theta1*theta2 - 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 JasonKSat, 10 Feb 2018 07:58:03 -0600http://ask.sagemath.org/question/41056/Similar command to Mathematica's Reduce[]?http://ask.sagemath.org/question/26600/similar-command-to-mathematicas-reduce/Can one do in Sage things similar to what the Mathematica commands such as Reduce[] does? In particular, using Reduce[] in Mathematica, one can check whether a given real polynomial in several variables is positive on a semi-algebraic set. Can this be done in Sage? Iosif PinelisSun, 19 Apr 2015 14:04:15 -0500http://ask.sagemath.org/question/26600/