ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 26 Nov 2013 15:57:42 -0600solve() returns 0 != 0http://ask.sagemath.org/question/10764/solve-returns-0-0/Hi,
For the code below
var('x')
eq1 = x == 0
eq2 = x != 0
solve([eq1, eq2], x)
I get the solution
[[x == 0, 0 != 0]]
I was expecting an empty solution because I guess there isn't a solution to my equations.
Is there a way to avoid such "impossible solutions" and get an empty solution instead?
Thanks
Tue, 26 Nov 2013 11:02:08 -0600http://ask.sagemath.org/question/10764/solve-returns-0-0/Answer by ppurka for <p>Hi,</p>
<p>For the code below</p>
<p>var('x')</p>
<p>eq1 = x == 0</p>
<p>eq2 = x != 0</p>
<p>solve([eq1, eq2], x)</p>
<p>I get the solution</p>
<p>[[x == 0, 0 != 0]]</p>
<p>I was expecting an empty solution because I guess there isn't a solution to my equations.</p>
<p>Is there a way to avoid such "impossible solutions" and get an empty solution instead?</p>
<p>Thanks</p>
http://ask.sagemath.org/question/10764/solve-returns-0-0/?answer=15732#post-id-15732There is a workaround in ticket 14229 but it is not wanted in Sage. It is instead desired to put this patch upstream in maxima. If you can translate the patch to a maxima patch, you are more than welcome. :)Tue, 26 Nov 2013 12:12:02 -0600http://ask.sagemath.org/question/10764/solve-returns-0-0/?answer=15732#post-id-15732Comment by Alan Moraes for <p>There is a workaround in ticket 14229 but it is not wanted in Sage. It is instead desired to put this patch upstream in maxima. If you can translate the patch to a maxima patch, you are more than welcome. :)</p>
http://ask.sagemath.org/question/10764/solve-returns-0-0/?comment=16608#post-id-16608Thanks for the reply, ppurka.
This seems to be a good opportunity to learn Lisp :-)
Tue, 26 Nov 2013 15:57:42 -0600http://ask.sagemath.org/question/10764/solve-returns-0-0/?comment=16608#post-id-16608Comment by Alan Moraes for <p>There is a workaround in ticket 14229 but it is not wanted in Sage. It is instead desired to put this patch upstream in maxima. If you can translate the patch to a maxima patch, you are more than welcome. :)</p>
http://ask.sagemath.org/question/10764/solve-returns-0-0/?comment=16607#post-id-16607Thanks for the reply, ppurka.
Tue, 26 Nov 2013 15:57:42 -0600http://ask.sagemath.org/question/10764/solve-returns-0-0/?comment=16607#post-id-16607