Live data from Hacker News

A computer algebra system written in Python

github.com

11–20 of 32 posts

Re: A computer algebra system written in Python

#11
post #5

How is it different from Sage[1]? (Quickstart here http://www.sagemath.org/tour-quickstart.html , and really awesome cloud version (that requires an account, but is very worth it here: https://cloud.sagemath.com/ ) [1]: http://www.sagemath.org/

I would say the main difference is scope: SymPy is aiming for traditional CAS territory: algebra with elementary functions, calculus, ODEs, elementary number theory, plotting. Sage aims to include tools for computations in all parts of mathematics, including all of the above but also more advanced things like group theory, representation theory, homological algebra, commutative algebra, homology of simplicial complexes, graph theory, Galois theory, algebraic number theory, etc.

Re: A computer algebra system written in Python

#14
post #3

Sympy is AWESOME! In particular, http://live.sympy.org is a great way to learn and teach math... I often send links to my students with an entire sequence of steps to find the solution. Can you factor x^2-5x+6 ? (find numbers a,b such that (x-a)(x-b)=x^2-5x+6) http://live.sympy.org/?evaluate=solve(%20x**2-5*x%2B6%2C%20x... (it's like an entire iPython notebook in a URL) On the topic of sympy, I'm working on this shor…

SymPy Gamma is also very interesting. Yes, it's no real competitor to WolframAlpha, but it still has quite a few useful features.

http://www.sympygamma.com/input/?i=integrate+log%28x^2%29

For instance, as you can see in the link above, it can provide steps for derivatives and integrals. WA has the same feature, but you need to subscribe to actually use it without limits.

Re: A computer algebra system written in Python

#16
post #13

How does it compare to Maxima? http://maxima.sourceforge.net/

GNU Calc (M-x calc in Emacs) is also a fairly capable CAS, and I love its RPN interface.

Thanks for that! I didn't know it had some algebra integrated. However, it wouldn't simplify (x+1)/(-x-1) (it does simplify -x/x though).

Re: A computer algebra system written in Python

#18
post #2

If you use sympy, I would strongly recommend using ipython qtconsole: http://ipython.org/ipython-doc/2/interactive/qtconsole.html One of the big advantages is that you can print your expressions using LaTeX: http://docs.sympy.org/dev/tutorial/printing.html

Why not the ipython notebook, in that case?

I went through this same thought process about two years ago.

IPython's notebook allows you to easily publish results. They include all you want and need: latex, imshow and nice code with many languages. But it's not good for generating results.

Perhaps the area it lacks most in is querying variables. In QtConsole, you just type `plot(x)` and see a plot with no side effects. In the notebook on the other hand, you have to type `plot(x)` into a new cell unless you want to rerun your code again and you have to delete that cell later (otherwise you have an unreadable notebook). Plus, the default keybindings (while easy to see) are not intuitive; I don't instinctively know how to jump back a cell.

Re: A computer algebra system written in Python

#19
When looking at Computer Algebra, you can't go past the original example of MacSyma (written in LISP).

You can see an explanation of the MacSyma system in Peter Norvig's (head of Google researcyh) Paradigms of Artificial Intelligence (PAIP).

http://norvig.com/paip/README.html

http://norvig.com/paip/macsyma.lisp

http://norvig.com/paip/macsymar.lisp

http://norvig.com/paip/cmacsyma.lisp

The original development of the MacSyma system influenced Mathematica: http://en.wikipedia.org/wiki/Macsyma

Re: A computer algebra system written in Python

#20
post #3

Sympy is AWESOME! In particular, http://live.sympy.org is a great way to learn and teach math... I often send links to my students with an entire sequence of steps to find the solution. Can you factor x^2-5x+6 ? (find numbers a,b such that (x-a)(x-b)=x^2-5x+6) http://live.sympy.org/?evaluate=solve(%20x**2-5*x%2B6%2C%20x... (it's like an entire iPython notebook in a URL) On the topic of sympy, I'm working on this shor…

I'm a Google Summer of Code mentor for SymPy. There's a number of good additions to it being done this summer. My student is working on systems of ODEs. There's 10 different projects in total, including work on optics, 3D geometry, and vectors (and hopefully vector calculus).

The optics and the 3D geometry should help a lot with teaching and learning.

Post reply on HN