ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 05 Jun 2016 17:20:09 +0200get range of values for inequalitieshttps://ask.sagemath.org/question/33653/get-range-of-values-for-inequalities/If I have a bunch of inequalities like $ x>y, y>z, z \\neq 5,x<z+y $
how do I get a range of values of each variable for which all these inequalities are satisfied? Thanks.
Edit: I found that this can be achieved with mathematica as mentioned in the below link:
mathematica.stackexchange.com/questions/38507/solve-the-system-of-equalities-and-inequalities
But, I want an open source solution. Is it possible with sage at all?Fri, 03 Jun 2016 08:02:02 +0200https://ask.sagemath.org/question/33653/get-range-of-values-for-inequalities/Comment by tmonteil for <p>If I have a bunch of inequalities like $ x>y, y>z, z \neq 5,x<z+y $<="" p="">
</p><p>how do I get a range of values of each variable for which all these inequalities are satisfied? Thanks.</p>
<p>Edit: I found that this can be achieved with mathematica as mentioned in the below link:</p>
<p>mathematica.stackexchange.com/questions/38507/solve-the-system-of-equalities-and-inequalities</p>
<p>But, I want an open source solution. Is it possible with sage at all?</p>
https://ask.sagemath.org/question/33653/get-range-of-values-for-inequalities/?comment=33669#post-id-33669Could you precise what kind of result do you expect ?Sat, 04 Jun 2016 13:31:41 +0200https://ask.sagemath.org/question/33653/get-range-of-values-for-inequalities/?comment=33669#post-id-33669Answer by tmonteil for <p>If I have a bunch of inequalities like $ x>y, y>z, z \neq 5,x<z+y $<="" p="">
</p><p>how do I get a range of values of each variable for which all these inequalities are satisfied? Thanks.</p>
<p>Edit: I found that this can be achieved with mathematica as mentioned in the below link:</p>
<p>mathematica.stackexchange.com/questions/38507/solve-the-system-of-equalities-and-inequalities</p>
<p>But, I want an open source solution. Is it possible with sage at all?</p>
https://ask.sagemath.org/question/33653/get-range-of-values-for-inequalities/?answer=33663#post-id-33663You can try with `solve` or `solve_ineq`, see http://doc.sagemath.org/html/en/reference/calculus/sage/symbolic/relation.html
Another possibility would be to use qepcad, see http://doc.sagemath.org/html/en/reference/interfaces/sage/interfaces/qepcad.html
Tell us if it works as expected, so that we can report the bug in case of problem (which happens sometimes in such situations).
Fri, 03 Jun 2016 20:17:19 +0200https://ask.sagemath.org/question/33653/get-range-of-values-for-inequalities/?answer=33663#post-id-33663Comment by abs_kumar for <p>You can try with <code>solve</code> or <code>solve_ineq</code>, see <a href="http://doc.sagemath.org/html/en/reference/calculus/sage/symbolic/relation.html">http://doc.sagemath.org/html/en/refer...</a></p>
<p>Another possibility would be to use qepcad, see <a href="http://doc.sagemath.org/html/en/reference/interfaces/sage/interfaces/qepcad.html">http://doc.sagemath.org/html/en/refer...</a></p>
<p>Tell us if it works as expected, so that we can report the bug in case of problem (which happens sometimes in such situations).</p>
https://ask.sagemath.org/question/33653/get-range-of-values-for-inequalities/?comment=33666#post-id-33666Simply using solve or solve_ineq is not solving the problem. For example, look at the piece of code mentioned in the sage docs:
**sage: solve_ineq([x-y<0,x+y-3<0]) # random
[[x < y, y < -x + 3, x < (3/2)]]**
I get some other inequalities as output!
As for qepcad package, I too read that it might offer a solution to my problem and try to go through the docs. I couldn't really wrap my head around what's written there and I have very less time to do this :(
This is just a one time requirement for me. I don't really have to deal with sage or any other mathematics software again. Heck, I read about sage, mathematica etc for the first time yesterday. As for my mathematics prowess, I haven't really worked on this since my college :)
It would be really helpful if one could solve atleast oneSat, 04 Jun 2016 06:23:03 +0200https://ask.sagemath.org/question/33653/get-range-of-values-for-inequalities/?comment=33666#post-id-33666Comment by tmonteil for <p>You can try with <code>solve</code> or <code>solve_ineq</code>, see <a href="http://doc.sagemath.org/html/en/reference/calculus/sage/symbolic/relation.html">http://doc.sagemath.org/html/en/refer...</a></p>
<p>Another possibility would be to use qepcad, see <a href="http://doc.sagemath.org/html/en/reference/interfaces/sage/interfaces/qepcad.html">http://doc.sagemath.org/html/en/refer...</a></p>
<p>Tell us if it works as expected, so that we can report the bug in case of problem (which happens sometimes in such situations).</p>
https://ask.sagemath.org/question/33653/get-range-of-values-for-inequalities/?comment=33670#post-id-33670Could you precise what kind of result do you expect ?Sat, 04 Jun 2016 13:31:54 +0200https://ask.sagemath.org/question/33653/get-range-of-values-for-inequalities/?comment=33670#post-id-33670Comment by abs_kumar for <p>You can try with <code>solve</code> or <code>solve_ineq</code>, see <a href="http://doc.sagemath.org/html/en/reference/calculus/sage/symbolic/relation.html">http://doc.sagemath.org/html/en/refer...</a></p>
<p>Another possibility would be to use qepcad, see <a href="http://doc.sagemath.org/html/en/reference/interfaces/sage/interfaces/qepcad.html">http://doc.sagemath.org/html/en/refer...</a></p>
<p>Tell us if it works as expected, so that we can report the bug in case of problem (which happens sometimes in such situations).</p>
https://ask.sagemath.org/question/33653/get-range-of-values-for-inequalities/?comment=33677#post-id-33677For the following set of inequalities,
a == b + c && a >= 12 && b <= 10 && c <= 10 && b >= 1 && c >= 1
I expect the solution to be,
12 <= a <= 20 && 2 <= b <= 10 && 2 <= c <= 10
I would want range of values of the variables involved as the outputSun, 05 Jun 2016 17:20:09 +0200https://ask.sagemath.org/question/33653/get-range-of-values-for-inequalities/?comment=33677#post-id-33677