Ask Your Question
2

Symbolic algebra: Sage, Maxima, Ginac, Sympy?

asked 2014-04-14 15:11:10 +0100

Antlab gravatar image

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.

edit retag flag offensive close merge delete

Comments

Geremia gravatar imageGeremia ( 2017-06-08 22:41:39 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
5

answered 2014-04-14 15:53:20 +0100

tmonteil gravatar image

updated 2014-04-14 16:02:52 +0100

Concerning relations between Sage, maxima and ginac, you can have a look to this question.

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)
edit flag offensive delete link more

Comments

Thanks 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.

Antlab gravatar imageAntlab ( 2014-04-14 19:15:29 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-04-14 15:11:10 +0100

Seen: 2,840 times

Last updated: Apr 14 '14