8 ms·
Symbolic mathematics on Linux
- joelg 10y agoAlso worth noting is scmutils [0], which is a symbolic computing library for MIT Scheme that Gerry Sussman [1] wrote and uses to teach 6.945 Symbolic Systems and 6.946 Computational Classical Mechanics. The documentation is sparse, but it's incredibly powerful, especially if you're already familiar with Scheme. [0] http://groups.csail.mit.edu/mac/users/gjs/6946/refman.txt http://groups.csail.mit.edu/mac/users/gjs/6946/refman.txt [1] ... And many others including Hal Abelson and Jack Wisdom
- agumonkey 10y agoI thought it was merely a starter kit for SICM not something used elsewhere.
- analognoise 10y agoI wish I had the background to understand SICM. Tried to read it, failed immediately.
- agumonkey 10y agoI hit a brickwall too, even though the idea behind Lagrangian Physics felt so natural to me, I still trying to re-read books about the subject on a regular basis (very often it's all it takes to get started on something).
- thatcherc 10y agoGotta say - the projects in the book made all the difference for me. It's one thing to read their high level, notation-heavy chapters, but I found that working through the exercises really solidified everything in my mind. That said I got pretty lost near the end. I want to go back in a year or so once I have a bit more math background.
- thatcherc 10y agoJack Wisdom actually uses it in his research, which is in solar system dynamics. I think he converts it to C though in order to run it faster.
- agumonkey 10y agoNever occured to me to check him online https://nerdwisdom.com/tag/sicm/ https://nerdwisdom.com/tag/sicm/ Thanks
- divbit 10y agoI don't see Maple mentioned, but that was occasionally useful for algebraic geometry type stuff https://en.wikipedia.org/wiki/Maple_computer_algebra_system https://en.wikipedia.org/wiki/Maple_computer_algebra_system
- lacampbell 10y agoI strongly recommend maxima. Great tool, and a clean language as well. I am shocked so few people have heard of it or use it.
- williamstein 10y ago+1 -- Maxima is used under the hood for many key symbolic functions in Sage, e.g., limits, symbolic integrals, many simplifications, etc. We Sage devs (mainly Nils Bruin) also wrote a very efficient C-level bridge interface between Python and Maxima, which uses ECL (embedded common lisp). We also try to make Maxima easy to use from Sage, e.g., you can type "maxima(sage expression)" to convert an expression to Maxima. Maxima developers regularly post on the Sage mailing list too.
- lacampbell 10y agoI am really glad to see Sage is still going strong. I used it years ago, back when I still had delusions of trying to be a mathematician. Really useful stuff.
- williamstein 10y agoI was just checking recently, and was pleasantly surprised to see that the amount Sage development, has gone up enormously in the last 2 years, especially thanks to Europeans! https://github.com/sagemath/sage/graphs/contributors https://github.com/sagemath/sage/graphs/contributors
- Elv13 10y agoSo true. A few weeks ago my TI v200 battery died and I went looking to "modernize my algebra workflow" (usually limited to multi parameters `solve` or `simplify` operations or matrix math). I never heard of Maxima (and never went looking). It works fine (without even checking the manual). I see where TI stole their syntax from. I will need to read the manual to figure out how to input more complex equation systems into `solve`. I tried a few frontend. I prefer Cantor, but it has some visual bugs I reported to the Gentoo and KDE bug trackers. I might solve them at some point. The default terminal UI is cool, but not very readable and keyboard navigation isn't as fine as other solutions (it and looks fugly, and Lispy languages are unreadable (((()))))
- teddyh 10y agoLots of alternatives in the answers to this Unix & Linux StackExchange question: https://unix.stackexchange.com/questions/20438/open-source-computer-algebra-systems-for-linux/20441 https://unix.stackexchange.com/questions/20438/open-source-c...
- a_e_k 10y agoEmacs' calc can also be surprisingly powerful. Not quite at the level of Maxima, but still perfectly capable of basic symbolic algebra and calculus, arbitrary precision arithmetic, linear algebra, and other good things. I use it quite heavily since it's right there in my editor. It's kind of like a good-enough phone camera that's always close at hand vs. a dedicated camera that's better but takes more effort to have ready.
- pmiller2 10y agoThat's neat. I had no idea calc could do calculus!
- a_e_k 10y agoIt can indeed! Adapting the first example from the article, in Emacs type: M-x quick-calc RET integ(exp(-x^2),x) RET You'll see that it immediately responds back with: erf(x) sqrt(pi) / 2
- agumonkey 10y agoI always facepalm when I do math outside of Emacs. Calc was never really advertised, it's not a toy. Also I've heard it might be scraped from vanilla emacs and made into an extesion, but I may be confused.
- 50CNT 10y agoThe Emacs Wiki does describe it as the "poor man's Mathematica". Org-tables with Calc functions are also quite nice.
- n00b101 10y agoAlso see PARI/GP [1] (specialized CAS for number theory) and GAP [2] (specialized CAS for group theory). These systems are very prominent within their fields. [1] https://en.m.wikipedia.org/wiki/PARI/GP https://en.m.wikipedia.org/wiki/PARI/GP [2] https://en.m.wikipedia.org/wiki/GAP_(computer_algebra_system) https://en.m.wikipedia.org/wiki/GAP_(computer_algebra_system...
- leephillips 10y agoThese both happen to be included as components in Sage, which was why I didn't mention them separately.
- williamstein 10y agoAnd, they are both very tightly integrated with Sage via C library interfaces (between Python and Pari/GAP), which took many years of pain to properly write and debug. I wrote the first versions of these interfaces, and Jereon Demeyer and Nils Bruin massively improved and rewrote them over the years. Much core functionality in Sage fundamentally relies on Pari and GAP in order to work efficiently.
- benley 10y agoAnother cool one is Mathics, which is a Mathematica-like system implemented in Python, using SymPy behind the scenes: https://github.com/mathics/Mathics https://github.com/mathics/Mathics http://www.mathics.org/ http://www.mathics.org/
- partycoder 10y agoThere's a cloud version of Sage called SageMathCloud. Sage is supported in many distributions, and is also available in a docker image for convenience. Note that that's not all. Major commercial math packages like Maple, Mathematica, Mathlab all support Linux as well. Then you have Scilab, Octave, R, and many others... which happen to also be integrated into Sage, that you can use independently or through some GUI.
- robmyzie2 10y agoNo mention of Axiom/Fricas? IMO, they are the most powerful.
- daly 10y agohttp://axiom-developer.org http://axiom-developer.org Axiom was originally developed at IBM Research, was a commercial competitor to Mathematica and Maple, has been open source since 2001.
- BeetleB 10y agoI used Sage many years ago (around 2008/2009). Awesome project. It had the "notebook" for Python before iPython itself had it (now called Jupyter).
- williamstein 10y agoMacsyma had a notebook long ago, which probably inspired Mathematica notebooks. Those inspired an early IPython non-web notebook, developed by some UCSD students in 2006. They demoed it at Sage Days 1 then, and me, Alex Clemesha, and Tom Boothby spent 2006-2007 that building the first version of the Sage notebook. Then a 16 year old kid in the Philippines (Tim Dummol) did a truly massive amount of development on the Sage notebook. Mike Hansen and Robert Bradshaw (lead dev of Cython) also did a lot around then. Then we all kind of got tired of working on the Sage notebook, and I think Tim went off to college, and it started to linger. IPython (now Jupyter) then got going in around 2011, with very strong grant support from the Moore and Sloane foundations, which Fernando Perez (and others) put a huge amount of work into getting. In 2013, I bit the bullet and got back to web development (SaaS is really important to bring open source to the masses), and have been working fulltime (now with a team!) on SageMathCloud since then.
- pmiller2 10y agoI know it's proprietary as hell, but, honestly, you can't beat Mathematica for general symbolic math use. It has an incredible array of libraries available for just about every need, and the language is very pleasant to work with.
- rtpg 10y agoMathematica is super expensive for personal use, unfortunately. Good if you're really into it, but hard as an impulse buy (plus they discriminate based on country and double the price in some places).
- pmiller2 10y agoIt's showing me a price of $310 for the personal edition right now. I think that's worth it if you're going to get a couple hour's usage a month out of it.
- rtpg 10y agoIn Japan it's $600. I wonder if there's any region checking...
- shakna 10y agoGrab a Pi. Might be slow, but if you set it up to just remote shell into it, then you do get access to Mathematica for a fairly small outlie.
- pmiller2 10y agoGreat way to experiment with the language, though, even if it is a bit slow. Can't argue with a $0 price, and the Pi is fun to play with by itself. :)
- UncleSlacky 10y agoYou could just emulate a Pi on an x86 PC and run it that way (though it'll probably be slower than a native Pi), see for example: http://www.linux-mitterteich.de/fileadmin/datafile/papers/2013/qemu_raspiemu_lug_18_sep_2013.pdf http://www.linux-mitterteich.de/fileadmin/datafile/papers/20...
- raphinou 10y agoI discovered this a couple of years ago, but never had the opportunity to use it extensively: http://en.smath.info/ http://en.smath.info/ Anyone having experience with it?
- slowrabbit 10y agoWhy does lwn.net look like its straight out of the 90s? Poor ugly duckling... surely there is a designer out there willing to give you some love.
- Mayzie 10y agoWho cares? It's fine, it does its job, it's clean and it's clear, no garbage.
- geff82 10y agoYou could style it up a bit for sure - on the other hand, that thing loads fast and is readable well. Reading it on a FullHD screen actually shows content instead of "cool" empty space where you have to scroll like a crazy man. There are too many pages in the current mainstream that make the fan of my i7-laptop spin up to the max just look fancy.
- anexprogrammer 10y agoYou mean why does it load instantly, pulling 100K, and not need JS and Disqus for comments? After a makeover it'll want to pull 2M+ for a short piece of text and 5M if there's a few images. Like with HN I prefer speed and simple for a text medium over watching it assemble load on demand JPGs like we're on dialup. :)
- slowrabbit 10y agolol you think pages in the 90s loaded instantly? No, poor design doesn't have to do with loading time. CSS load time is minimal.
- davexunit 10y agoAre you aware of what this site looks like?
- infruset 10y agoThis is probably obvious to most people here, but I just want to mention that such software should not be trusted blindly for mathematical correctness. It is easy in most computer algebra systems to find false results (and trivial if it includes numerical computations). An interesting related thread: http://mathoverflow.net/questions/11517/computer-algebra-errors http://mathoverflow.net/questions/11517/computer-algebra-err...
- mr337 10y agoI never thought of that, just assumed correctness is top priority, but like anything bugs happen.
- torrent-of-ions 10y agoNo mention of Axiom: http://www.axiom-developer.org/ http://www.axiom-developer.org/ As far as I know, it's the only CAS to have a full implementation of the Risch algorithm for symbolic integration, and it's also written in a literate programming style.
- lispm 10y agoand uses a powerful type system...
- jordigh 10y agoI've always wondered about the Risch "algorithm". It's not really an algorithm because at one crucial step it says "determine if this expression is zero" which is essentially an open problem. What is it that Axiom does? Does it find antiderivatives where others fail?
- thechao 10y agoThe Risch "algorithm", in this sense, is an implementation of the Risch decision procedure; in particular, the Risch-Bronstein-Trager algorithm. Axiom's version was written, in large part, by Bronstein, himself. Axiom's implementation is complete in the sense of capturing the entire Risch decision procedure for elementary functions: it either returns the antiderivative or returns a proof that no such antiderivative exists. However, while elementary functions are extremely important, they aren't the whole story for functions; in that sense, Axiom is far weaker than, say, Mathematica.
- achamilt 10y agoKet is a minimalist approach. It's a maths text editor. The basic idea is that algebra is just rapid text editing. Equations are written in mark-down, displayed in conventional notation and edited with Vim commands. https://sourceforge.net/projects/ket/ https://sourceforge.net/projects/ket/
- balnaphone 10y agoMy favorite tools for symbolic math are Maxima as discussed in the article, for interactive exploration, and GiNaC for large-scale computation. http://www.ginac.de/ http://www.ginac.de/ GiNaC is really fantastic for problems where you have symbolic models that are generated from large data sets, especially iterating between solvers and symbolic forms. For example, high-dimensional Cox proportional hazards models have semi-parametric forms that require a mixture of symbolic and numeric computation. In this case, our study run-time was over 3 days, over a few thousand cores. Without compiling the numerics to native code, taking advantage of symbolic simplifications, and calculating Hessians symbolically then evaluating millions of times numerically, the same study would have required years of runtime. In a computer vision application, I used GiNaC::compile_ex for a similar advantage, solving stochastic functional equations, and selecting optimal model parameters, while accounting for noise. In a way, the massive boost in symbolic + numeric speed made this practically interactive, since previous models could be cached in a compiled form, meaning that instead of plodding along, looking at a few stills here and there to see if the algorithms were producing good results, I could use live video feeds and interactively get a sense of whether the noise and stochastic model were functioning as intended. One of the most fun programs I ever wrote is a program that generates symbolic forms for stochastic models, runs them against live camera feeds, which in turn generates optimal copulas and so on, that get reduced to C code, that ultimately produces optimized VHDL. Every step involves iterations of symbolic calculation, numeric calculation, and generating the code that will perform the next step. The code is a mixture of C++ (model computations, camera IO, optimal pipelining for VHDL), Octave (graphical views), R (statistical routines), C (mostly generated code), Perl (code transformations), and VHDL (mostly generated code). The only part that wasn't so fun was actually invoking the windows-based Altera VHDL compiler, which could take an hour or more to do the synthesis. Also, GNU Octave also has a nice package ("symbolic") for using GiNaC interactively. https://octave.sourceforge.io/symbolic/ https://octave.sourceforge.io/symbolic/
- edejong 10y agoI'm always slightly sad to see a reference to TeXmacs [1], while it is not developed anymore. Does anyone know why the project has been abandoned? Always amazed by the beautiful layout of the interface. [1] https://www.ceremade.dauphine.fr/~mgubi/tm-web/documents/tutorials/maxima-tutorial/maxima-tutorial.en.html https://www.ceremade.dauphine.fr/~mgubi/tm-web/documents/tut...
- jordigh 10y agoIt was basically a one-man project by Joris van der Hoeven and nobody has come to pick up the torch from him.
- infinity0 10y agoThe article mentions a PPA for SageMath; in fact we recently (re)packaged SageMath for official Debian, here: https://packages.debian.org/sid/sagemath https://packages.debian.org/sid/sagemath If all goes well it will be in the next Debian stable. Please help test it! It has ~180 build-dependencies, possibly the most of any Debian package.
- ecesena 10y agoBack in the days I used Magma for symbolic algebra/geometry. Not sure about the status of the project today, but it had absolutely unique features to work in extension fields, rings, and build abelian varieties on these.