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.Thu, 08 Jun 2017 15:41:39 -0500Symbolic algebra: Sage, Maxima, Ginac, Sympy?http://ask.sagemath.org/question/11356/symbolic-algebra-sage-maxima-ginac-sympy/Hi all.
In this period I am working on symbolic matrices, and I am a bit confused about the various possibilities and the mutual relationships.
If I understand correctly, for symbolic computation Sage uses Ginac and Maxima, but I have no a clear idea of the different roles of the two packages in Sage own engine.
Furthermore, I am reading some tutorials about Sympy. I know that Sympy is included in the huge library of Sage packages, but it is not directly used in any way by Sage for symbolic computation?
Could you please clarify a bit these points?
Thanks.Mon, 14 Apr 2014 08:11:10 -0500http://ask.sagemath.org/question/11356/symbolic-algebra-sage-maxima-ginac-sympy/Comment by Geremia for <p>Hi all.
In this period I am working on symbolic matrices, and I am a bit confused about the various possibilities and the mutual relationships.</p>
<p>If I understand correctly, for symbolic computation Sage uses Ginac and Maxima, but I have no a clear idea of the different roles of the two packages in Sage own engine.</p>
<p>Furthermore, I am reading some tutorials about Sympy. I know that Sympy is included in the huge library of Sage packages, but it is not directly used in any way by Sage for symbolic computation?
Could you please clarify a bit these points?</p>
<p>Thanks.</p>
http://ask.sagemath.org/question/11356/symbolic-algebra-sage-maxima-ginac-sympy/?comment=37878#post-id-37878See: [SymPy vs. Sage](https://github.com/sympy/sympy/wiki/SymPy-vs.-Sage) (from the [SymPy GitHub Wiki](https://github.com/sympy/sympy/wiki/)).Thu, 08 Jun 2017 15:41:39 -0500http://ask.sagemath.org/question/11356/symbolic-algebra-sage-maxima-ginac-sympy/?comment=37878#post-id-37878Answer by tmonteil for <p>Hi all.
In this period I am working on symbolic matrices, and I am a bit confused about the various possibilities and the mutual relationships.</p>
<p>If I understand correctly, for symbolic computation Sage uses Ginac and Maxima, but I have no a clear idea of the different roles of the two packages in Sage own engine.</p>
<p>Furthermore, I am reading some tutorials about Sympy. I know that Sympy is included in the huge library of Sage packages, but it is not directly used in any way by Sage for symbolic computation?
Could you please clarify a bit these points?</p>
<p>Thanks.</p>
http://ask.sagemath.org/question/11356/symbolic-algebra-sage-maxima-ginac-sympy/?answer=16114#post-id-16114Concerning relations between Sage, maxima and ginac, you can have a look to [this question](http://ask.sagemath.org/question/627/sage-vs-maxima-for-symbolic-computation).
Concerning `sympy`, some computations can be done by `sympy` but you need to specify it, see for example:
sage: integral?
`sympy` is not imported in Sage by default, i guess the main reason is startup speed. If you want to use `sympy` within Sage, just do:
sage: import sympy
Now, if you have an element of the `Symbolic Ring`, you can transform it into a `sympy` object as follows:
sage: a = cos(x) + pi
sage: b = a._sympy_()
sage: b
cos(x) + pi
You can check:
sage: type(b)
<class 'sympy.core.add.Add'>
You can come back to the symbolic ring as follows:
sage: b._sage_()
pi + cos(x)
Mon, 14 Apr 2014 08:53:20 -0500http://ask.sagemath.org/question/11356/symbolic-algebra-sage-maxima-ginac-sympy/?answer=16114#post-id-16114Comment by Antlab for <p>Concerning relations between Sage, maxima and ginac, you can have a look to <a href="http://ask.sagemath.org/question/627/sage-vs-maxima-for-symbolic-computation">this question</a>.</p>
<p>Concerning <code>sympy</code>, some computations can be done by <code>sympy</code> but you need to specify it, see for example:</p>
<pre><code>sage: integral?
</code></pre>
<p><code>sympy</code> is not imported in Sage by default, i guess the main reason is startup speed. If you want to use <code>sympy</code> within Sage, just do:</p>
<pre><code>sage: import sympy
</code></pre>
<p>Now, if you have an element of the <code>Symbolic Ring</code>, you can transform it into a <code>sympy</code> object as follows:</p>
<pre><code>sage: a = cos(x) + pi
sage: b = a._sympy_()
sage: b
cos(x) + pi
</code></pre>
<p>You can check:</p>
<pre><code>sage: type(b)
<class 'sympy.core.add.Add'>
</code></pre>
<p>You can come back to the symbolic ring as follows:</p>
<pre><code>sage: b._sage_()
pi + cos(x)
</code></pre>
http://ask.sagemath.org/question/11356/symbolic-algebra-sage-maxima-ginac-sympy/?comment=16200#post-id-16200Thanks for the clarifications and the link.
Sometimes is not easy to understand the differences and the mutual dependencies of the various mathematical package related to Sage. For this reason your answer is really helpful, I will continue to experiment with Sage and Sympy.Mon, 14 Apr 2014 12:15:29 -0500http://ask.sagemath.org/question/11356/symbolic-algebra-sage-maxima-ginac-sympy/?comment=16200#post-id-16200