Sage: Ticket #17412: improve documentation of 'solve()'
https://trac.sagemath.org/ticket/17412
<p>
Even if it is expectable that in some cases solve() may not return all solutions, it should be explicitly pointed out; especially it should be stated that an empty list does not necessarily imply there are no solutions.
</p>
<p>
See also the discussion at <a class="ext-link" href="https://groups.google.com/d/msg/sage-support/cg7QYw_1ncg/VKdH3CX4qYsJ"><span class="icon"></span>https://groups.google.com/d/msg/sage-support/cg7QYw_1ncg/VKdH3CX4qYsJ</a>
</p>
<p>
Example from that thread:
</p>
<pre class="wiki">solve(5^( x -1) == (1/25)^(2*x), x)
# []
solve(5^( x -1) == (1/25)^(2*x), x,to_poly_solve=True)
#[x == (2*I*pi*z41 + log(5))/log(3125)]
</pre>en-usSagehttps://trac.sagemath.org/chrome/site/logo_sagemath_trac.png
https://trac.sagemath.org/ticket/17412
Trac 1.1.6jakobkroekerFri, 28 Nov 2014 10:24:42 GMTchangetime, time changed; branch set
https://trac.sagemath.org/ticket/17412#comment:1
https://trac.sagemath.org/ticket/17412#comment:1
<ul>
<li><strong>changetime</strong>
changed from <em>11/28/14 09:59:03</em> to <em>11/28/14 09:59:03</em>
</li>
<li><strong>branch</strong>
set to <em>u/jakobkroeker/ticket/17412</em>
</li>
<li><strong>time</strong>
changed from <em>11/28/14 09:59:03</em> to <em>11/28/14 09:59:03</em>
</li>
</ul>
TicketjakobkroekerFri, 28 Nov 2014 10:36:06 GMTstatus changed; commit set
https://trac.sagemath.org/ticket/17412#comment:2
https://trac.sagemath.org/ticket/17412#comment:2
<ul>
<li><strong>status</strong>
changed from <em>new</em> to <em>needs_info</em>
</li>
<li><strong>commit</strong>
set to <em>2d7574794ae840b48a0f8841a8978157066982db</em>
</li>
</ul>
<p>
What is about
</p>
<pre class="wiki"> solve_mod()
solve_ineq_univar()
solve_ineq_fourier()
solve_ineq()
</pre><p>
may they also fail in some cases to return all solutions?
Which other routines need an explicit statement, that an empty result does not imply
that there are no solutions?
</p>
<hr />
<p>
New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="http://git.sagemath.org/sage.git/commit/?id=2d7574794ae840b48a0f8841a8978157066982db"><span class="icon"></span>2d75747</a></td><td><code>explicitly state that solve may not obtain all existing solutions and that an empty result does not imply there are no solutions</code>
</td></tr></table>
TickettmonteilFri, 28 Nov 2014 16:27:08 GMT
https://trac.sagemath.org/ticket/17412#comment:3
https://trac.sagemath.org/ticket/17412#comment:3
<p>
I think you should also give an explicit example in the doc. However, the one you provide does not work for me (on 6.5.beta0):
</p>
<pre class="wiki">sage: solve(5^( x -1) == (1/25)^(2*x), x)
...
NotImplementedError: non-integral exponents not supported
</pre>
TicketrwsFri, 28 Nov 2014 17:35:21 GMT
https://trac.sagemath.org/ticket/17412#comment:4
https://trac.sagemath.org/ticket/17412#comment:4
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/17412#comment:3" title="Comment 3">tmonteil</a>:
</p>
<blockquote class="citation">
<p>
I think you should also give an explicit example in the doc. However, the one you provide does not work for me (on 6.5.beta0):
</p>
<pre class="wiki">sage: solve(5^( x -1) == (1/25)^(2*x), x)
...
NotImplementedError: non-integral exponents not supported
</pre></blockquote>
<p>
Returns empty list on 6.5beta1. Is <code>x</code> already initialized?
</p>
TickettmonteilSat, 29 Nov 2014 00:21:39 GMT
https://trac.sagemath.org/ticket/17412#comment:5
https://trac.sagemath.org/ticket/17412#comment:5
<p>
Uh my bad, i was using the wrong sage console where i used polynomials before. Sorry for the noise.
</p>
<p>
That said, adding an example showing explicitly the problem (e.g. that particular example, since it works) could be good to make things explicit. The existing example are somehow too optimistic, and we should point what does not work as well.
</p>
Ticket