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.Tue, 20 Apr 2021 18:27:13 +0200What implementation does sage use for solve?https://ask.sagemath.org/question/56730/what-implementation-does-sage-use-for-solve/What algorithm does sage use when you solve polynomials with the solve() function? Mon, 19 Apr 2021 20:48:21 +0200https://ask.sagemath.org/question/56730/what-implementation-does-sage-use-for-solve/Answer by tmonteil for <p>What algorithm does sage use when you solve polynomials with the solve() function? </p>
https://ask.sagemath.org/question/56730/what-implementation-does-sage-use-for-solve/?answer=56731#post-id-56731Regarding the `solve` function, Sage does not implement it own algorithm, instead it asks `maxima` to do the job by default. You can also pass the `algorithm='sympy'` option to use Sympy instead.
See:
sage: solve?
Mon, 19 Apr 2021 20:53:15 +0200https://ask.sagemath.org/question/56730/what-implementation-does-sage-use-for-solve/?answer=56731#post-id-56731Comment by John Palmieri for <p>Regarding the <code>solve</code> function, Sage does not implement it own algorithm, instead it asks <code>maxima</code> to do the job by default. You can also pass the <code>algorithm='sympy'</code> option to use Sympy instead.</p>
<p>See:</p>
<pre><code>sage: solve?
</code></pre>
https://ask.sagemath.org/question/56730/what-implementation-does-sage-use-for-solve/?comment=56744#post-id-56744And there is a brief description here: https://maxima.sourceforge.io/docs/manual/maxima_102.html#solveTue, 20 Apr 2021 18:27:13 +0200https://ask.sagemath.org/question/56730/what-implementation-does-sage-use-for-solve/?comment=56744#post-id-56744Comment by John Palmieri for <p>Regarding the <code>solve</code> function, Sage does not implement it own algorithm, instead it asks <code>maxima</code> to do the job by default. You can also pass the <code>algorithm='sympy'</code> option to use Sympy instead.</p>
<p>See:</p>
<pre><code>sage: solve?
</code></pre>
https://ask.sagemath.org/question/56730/what-implementation-does-sage-use-for-solve/?comment=56743#post-id-56743You could also ask on the Maxima mailing lists: https://maxima.sourceforge.io/maximalist.htmlTue, 20 Apr 2021 18:25:24 +0200https://ask.sagemath.org/question/56730/what-implementation-does-sage-use-for-solve/?comment=56743#post-id-56743Comment by Emmanuel Charpentier for <p>Regarding the <code>solve</code> function, Sage does not implement it own algorithm, instead it asks <code>maxima</code> to do the job by default. You can also pass the <code>algorithm='sympy'</code> option to use Sympy instead.</p>
<p>See:</p>
<pre><code>sage: solve?
</code></pre>
https://ask.sagemath.org/question/56730/what-implementation-does-sage-use-for-solve/?comment=56742#post-id-56742> So is it safe to say that say that Sage solves polynomials analytically instead of numerically?
Yep, when possible. When not possible (degree >=5, and no "obvious" paths to an explicit solution, Sage can compute root values in QQbar, which can be thought of as objects representing *algorithms*, computable to *arbitrary* precision and are treated as *exact* numbers by "the rest of Sage".
> Do you know how they implement such algorithm?
Tou are welcome to read the source ;-) (translation : I don't know, do not know enough to know where to start...).
> You would think that a computer solves factorization numerically since it can easily calculate a lot of numbers with decent precision.
That's more or less what happens when an explicit solution (first intention goal) does not exist.Tue, 20 Apr 2021 14:33:43 +0200https://ask.sagemath.org/question/56730/what-implementation-does-sage-use-for-solve/?comment=56742#post-id-56742Comment by MathAllOverThePlace for <p>Regarding the <code>solve</code> function, Sage does not implement it own algorithm, instead it asks <code>maxima</code> to do the job by default. You can also pass the <code>algorithm='sympy'</code> option to use Sympy instead.</p>
<p>See:</p>
<pre><code>sage: solve?
</code></pre>
https://ask.sagemath.org/question/56730/what-implementation-does-sage-use-for-solve/?comment=56740#post-id-56740So is it safe to say that say that Sage solves polynomials analytically instead of numerically?
Do you know how they implement such algorithm? You would think that a computer solves factorization nummerically since it can easilly calculate a lot of numbers with decent precision.Tue, 20 Apr 2021 10:36:52 +0200https://ask.sagemath.org/question/56730/what-implementation-does-sage-use-for-solve/?comment=56740#post-id-56740Comment by tmonteil for <p>Regarding the <code>solve</code> function, Sage does not implement it own algorithm, instead it asks <code>maxima</code> to do the job by default. You can also pass the <code>algorithm='sympy'</code> option to use Sympy instead.</p>
<p>See:</p>
<pre><code>sage: solve?
</code></pre>
https://ask.sagemath.org/question/56730/what-implementation-does-sage-use-for-solve/?comment=56737#post-id-56737We have to check. Note however that the Durand-Kerner algorithm is numerical, while the `solve` function will try to give you the solutions as symbolic expressions involving nth roots:
sage: solve(2*x^2-7==0,x)
[x == -1/2*sqrt(7)*sqrt(2), x == 1/2*sqrt(7)*sqrt(2)]Mon, 19 Apr 2021 23:28:30 +0200https://ask.sagemath.org/question/56730/what-implementation-does-sage-use-for-solve/?comment=56737#post-id-56737Comment by MathAllOverThePlace for <p>Regarding the <code>solve</code> function, Sage does not implement it own algorithm, instead it asks <code>maxima</code> to do the job by default. You can also pass the <code>algorithm='sympy'</code> option to use Sympy instead.</p>
<p>See:</p>
<pre><code>sage: solve?
</code></pre>
https://ask.sagemath.org/question/56730/what-implementation-does-sage-use-for-solve/?comment=56733#post-id-56733What algorithm does maxima use then? There are numerious methods to solve polynomials like Durand-Kerner...Mon, 19 Apr 2021 20:57:38 +0200https://ask.sagemath.org/question/56730/what-implementation-does-sage-use-for-solve/?comment=56733#post-id-56733