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/Reformulation of a semialgebraic set, without quantifiershttp://ask.sagemath.org/question/30287/reformulation-of-a-semialgebraic-set-without-quantifiers/According to wikipedia:
> The [Tarskiâ€“Seidenberg](https://en.wikipedia.org/wiki/Tarski%E2%80%93Seidenberg_theorem) theorem states that a set in (n + 1)-dimensional space defined by polynomial equations and inequalities can be projected down onto n-dimensional space, and the resulting set is still definable in terms of polynomial identities and inequalities.
That's great, and my question is if it can be done in practice, in a particular case. I have read that the original Tarskiâ€“Seidenberg algorithm is of little practical use, but maybe my problem is tractable with another algorithm:
We have a finite set of points in C^2 (z_i,w_i), and I want to project onto the first C coordinate the intersection of the cones {(z,w): |z-z_i|>|w-w_i|}. It would be awesome, for example for plotting the set, if I could actually get the polynomial inequalities that define the projection. Getting only the higher dimensional strata is fine (an open set in C).
Any idea? Thanks in advance.pangTue, 27 Oct 2015 04:26:42 -0500http://ask.sagemath.org/question/30287/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/semialgebraic systems in Sagehttp://ask.sagemath.org/question/10552/semialgebraic-systems-in-sage/I would like to solve systems such as
solve([x^3-y^2 == 0, x<0, x^2+y^2<1], x, y)
I get
[[x < 0, -x^2 - y^2 + 1 > 0, -x^3 + y^2 == 0]]
i.e., the same thing.
W|A, for instance, says that "no solutions exist". Also Maple can easily deal with the system. Is there any package I'm missing? Are these systems manageable with Sage (or an embedded software)?
Thank you.
fbtnFri, 20 Sep 2013 01:06:43 -0500http://ask.sagemath.org/question/10552/