Sage: Ticket #27314: Can't solve symbolic equations containing inexact (e.g. RIF, RBF) numbers
https://trac.sagemath.org/ticket/27314
<p>
There are (undocumented?) symbolic wrappers around <code>RIF</code>, <code>RBF</code> objects, but solving equations with them
</p>
<pre class="wiki">sage: var('x')
sage: solve(x + RIF(0.999,1.001) == 0, x)
</pre><p>
fails because the inexact objects cannot be converted to Maxima objects.
</p>
<p>
This is confusing to new users; see <a class="ext-link" href="https://ask.sagemath.org/question/45473/long-traceback-when-calling-solve/"><span class="icon"></span>Ask SageMath: long traceback when calling solve()</a>.
</p>
<p>
Specifying <code>algorithm='sympy'</code> gives a solution but loses information about precision.
</p>
<p>
The least thing that could be done is for <code>solve(eqn, x)</code> to check <code>eqn.is_exact()</code> and give a warning.
</p>
en-usSagehttps://trac.sagemath.org/chrome/site/logo_sagemath_trac.png
https://trac.sagemath.org/ticket/27314
Trac 1.1.6charpentMon, 18 Feb 2019 14:47:48 GMT
https://trac.sagemath.org/ticket/27314#comment:1
https://trac.sagemath.org/ticket/27314#comment:1
<p>
One notes that numerical root seeking via <code>find_root</code> also fails for both RIF and RBF :
</p>
<pre class="wiki">sage: u=RIF(0.99,1.01);u
1.0?
sage: s=find_root(x+u,-3,3);s
-1.0
sage: type(s)
<type 'float'>
sage: v=RBF(v);v
1.000000000000000
sage: v=v.add_error(0.01);v
[1.0 +/- 0.0101]
sage: s2=find_root(x+v,-3,3);s2
-1.0
sage: type(s2)
<type 'float'>
</pre><p>
Extending <code>find_root</code> to handle RIF and RBF expressions would allow to handle the cases where no explicit form of a root solution is known (e. g. implicit expressions resulting of <code>solve</code>), where <code>find_root</code> allows to compute a numerical approxomation.
</p>
<p>
This would certainly be handy (but is probably a significant project in itself !).
</p>
<p>
It might also be useful to check which of the optimization functions in Sage support such uncertainty handling...
</p>
TicketembrayMon, 25 Mar 2019 10:56:15 GMTmilestone changed
https://trac.sagemath.org/ticket/27314#comment:2
https://trac.sagemath.org/ticket/27314#comment:2
<ul>
<li><strong>milestone</strong>
changed from <em>sage-8.7</em> to <em>sage-8.8</em>
</li>
</ul>
<p>
Ticket retargeted after milestone closed (if you don't believe this ticket is appropriate for the Sage 8.8 release please retarget manually)
</p>
TicketembrayFri, 14 Jun 2019 14:54:19 GMTmilestone deleted
https://trac.sagemath.org/ticket/27314#comment:3
https://trac.sagemath.org/ticket/27314#comment:3
<ul>
<li><strong>milestone</strong>
<em>sage-8.8</em> deleted
</li>
</ul>
<p>
As the Sage-8.8 release milestone is pending, we should delete the sage-8.8 milestone for tickets that are not actively being worked on or that still require significant work to move forward. If you feel that this ticket should be included in the next Sage release at the soonest please set its milestone to the next release milestone (sage-8.9).
</p>
Ticket