8 ms·
Maxima: A computer algebra system written in Common Lisp
- donkeybeer 4y agoPlus points: Does not suffer from the time limits of free wolfram and the nlp parsing issues in general with wolfram Negative points: Somewhat more limited repertoire, and things sometimes need to be rephrased or rearranged to trick an answer out of it.
- pfortuny 4y agoSurprisingly, the command to plot solutions of odes is much better and more interactive than Mathematica’s despite the interface being “uglier”.
- donkeybeer 4y agoIt uses gnuplot I think as its frontend. Gnuplot is quite powerful if you understand it and can trick it correctly. Regarding the interface being ugly it kinda also depends on which graphical frontend gnuplot is using, there are multiple. I like the Qt one.
- srott2 4y agonothing beats emacs & maxima-mode https://community.linuxmint.com/img/screenshots/maxima-emacs.png https://community.linuxmint.com/img/screenshots/maxima-emacs...
- luispauloml 4y agoExcept when it doesn't work. I tried using it a few months ago on both Windows and WSL, but I had to give up and resort to run a Maxima kernel on EIN.¹ I was going to try again before commenting, but I broke my WSL setup last week and didn't have time to fix it yet, but I sure will try it again next month. ¹ http://millejoh.github.io/emacs-ipython-notebook/ http://millejoh.github.io/emacs-ipython-notebook/
- bmitc 4y agoInteresting. I just downloaded Maxima on Android and also WolframAlpha. Three latter is light years ahead.
- japanman425 4y agoWell there’s a surprise
- phkahler 4y agoDoes it even run locally?
- medo-bear 4y agowith a bit of elbow greece you can also integrate it with your common lisp application. and i mean this entirely, not just in an api sense
- Qem 4y agoHow does it compare to SymPy?
- heisig 4y agoMaxima is a surprisingly good alternative to SymPy. We had to learn that the hard way at my job. Both systems offer similar functionality, but it turns out Maxima is typically 50-200x as fast as SymPy for many tasks (I guess because it was written at a time when computers were slow and expensive). For our application, switching from SymPy to Maxima shortened the time-to-solution from hours to minutes. Also, it shows that Maxima has been in use for a very long time, and maintained by very bright people. I have yet to encounter a bug in Maxima. And I have already encountered plenty of bugs and inconsistent behavior in SymPy.
- defrost 4y agoMaxima sees serious 'more free' versions of computational algorithms that migrate out from less free acedemic systems. On the computational real actual algebra side (ie. a bit past computing a quadractic at 'x') a number of things that appear in Magma follow into Maxima (but not all the things, although with time they will come). https://en.wikipedia.org/wiki/Hidden_Field_Equations https://en.wikipedia.org/wiki/Hidden_Field_Equations https://en.wikipedia.org/wiki/Gr%C3%B6bner_basis https://en.wikipedia.org/wiki/Gr%C3%B6bner_basis The first HFE cryptosystem challenge of J. Patarin is solved by Magma in 82.5 seconds, using 1.3GB memory; with 4 threads the time taken is just 29.0 seconds. This involves solving a system of 80 quadratic equations in 80 variables over GF(2) (each input polynomial has about 1600 terms). The challenge was first solved by J.-C. Faugère in 52 hours on an 1GHz Alpha in 2002 using his unpublished F5/2 algorithm. At the time of writing, there is apparently still no publically-available software besides Magma which can solve the challenge. http://magma.maths.usyd.edu.au/magma/overview/2/27/13/#subsubsection_13_1_4 http://magma.maths.usyd.edu.au/magma/overview/2/27/13/#subsu... https://maxima.sourceforge.io/docs/manual/maxima_257.html https://maxima.sourceforge.io/docs/manual/maxima_257.html Notes on the grobner package: The code is a little bit out of date now. Modern implementation use the fast F4 algorithm described in "A new efficient algorithm for computing Gröbner bases (F4)" Jean-Charles Faugère ( *NB a somewhat old example, I'm not keeping up on the comp.algebra lists and I'm assuming here the online manuals are up to date )
- bakhy 4y agoIt's also available as an Android app, MaximaOnAndroid. I love having it on my phone, even though I rarely actually use it :)
- thaumasiotes 4y ago> I love having it on my phone, even though I rarely actually use it I understand.
- college_physics 4y agoAhh, the macsyma days. You could do real tensor calculus with it.
- immmmmm 4y agoCadabra does that extremely well: https://cadabra.science/notebooks/tensor_monomials.html https://cadabra.science/notebooks/tensor_monomials.html did publish an article with a Lagrangian of order 40 in the fields with it. 10k pages of calculations.
- college_physics 4y agoahh, yes indeed, it can do GR tensors too [0] can't believe somebody wrote this in C/C++! [0] https://arxiv.org/abs/1912.08839 https://arxiv.org/abs/1912.08839
- kpeeters 4y agoCadabra author here. The choice for C++ was intentional and is part of the design to separate the maths language (LaTeX), programming language (python) and implementation language (C++). This has advantages (eg. notation looks natural for mathematicians/physicists, programming the system uses a language already familiar to many, and it can still run algorithms at C++ speeds) and disadvantages (eg. some things become much more involved to implement). As always, it depends a lot on what you do with the system whether this is good or bad. Cadabra is not for everyone, but it does some things much nicer (IMHO) than other CAS systems.
- college_physics 4y agoits an intriguing combination of languages and maybe one that would serve well other projects. Combining python and C++ is clearly common, but expressing algorithms / expressions as latex hits another sweet spot. Makes sense to have a performant "backend". My experience with macsyma is, ahem, quite a bit dated, but I still remember it would choke on large calculations and needed careful massaging of intermediate steps.
- tgv 4y agoQuick note to avoid disappointment: maxima itself is a text application. wxMaxima is a graphical front-end with conventional math notation. Output only. You'll frequently encounter text/command-line options, though. E.g., when you pick a command like differentiate from the menu, and you want to apply it to the previous result, you'll have to enter something like %o10 (no need to guess; you'll see the reference in the output). Idk if there's a better GUI.
- curling_grad 4y agoSagemath uses maxima internally, so Jupyter notebook backed by Sagemath kernel might be useful?
- chongli 4y agoWhat is Sagemath then? I have used it many times and I assumed it was a CAS alternative to Maxima. Is it actually just a big library built on top of Maxima? Sort of like how LaTeX is a library on top of TeX?
- soegaard 4y agoSagemath used a collection of libraries. From the front page: > SageMath is a free open-source mathematics software system licensed under the GPL. It builds on top of many existing open-source packages: NumPy, SciPy, matplotlib, Sympy, Maxima, GAP, FLINT, R and many more. Access their combined power through a common, Python-based language or directly via interfaces or wrappers. For once "many more" really means "many more".
- meltyness 4y agoIn this case, Sagemath contains a domain that interfaces heavily with Maxima. By default Symbolic Calculus, which is a pretty common use-case since the space of integral-tables is huge and complicated, makes pretty heavy use of calls to Maxima as a backend, but it can slip over to SymPy, and some others pretty easily. Sagemath is, a little rough to use as a novice-y math guy, really quirky especially since Python isn't as up-front with typing as I would like, and I've run into some lazy-evaluation confusion as well, but if your time is worthless, use-case restricted it can be an alternative to paying out the nose for Mathematica.
- boronine 4y agoMaxima enabled me to make my color space [HSLuv](https://www.hsluv.org/ https://www.hsluv.org/). I encoded CIELUV <-> RGB transformation functions into Maxima, ran `solve` and converted the output back into code. It's great to be able to commit [Maxima code](https://github.com/hsluv/hsluv/tree/master/math https://github.com/hsluv/hsluv/tree/master/math) into your repository and not leave the math as an "exercise to the reader".
- db48x 4y agoThat’s a really nice way to do it. Also, I really like HSVLuv; it’s a really nice idea.
- kbk 4y agoI like maxima and used to use it (through the interface wxmaxima or KDE Cantor) for solving my physics problem. I am no expert in CAS, just use them for simple problem solving. However, since I stumbled upon this blog post by Thingwy https://thingwy.blogspot.com/2015/07/maxima-versus-mathematica-should-i-go.html https://thingwy.blogspot.com/2015/07/maxima-versus-mathemati..., I find myself uneasy when using maxima. I quote Thingwy: “Maxima gets elementary math wrong, it knows very little about integration, it is weak on simplifying expressions, it fails on trivial equations, it is slow, Maxima usage is discouraged by CAS power users. In summary: do not go and waist your time or wreck your nerves using Maxima. JUST DON'T DO IT” Since this was in 2015, I want to know the situation now, and the comments of experts on the issues raised by the blog poste. (Excuse my bad English)
- fiddlerwoaroof 4y agoI’m a bit suspicious of the section saying “Maxima is slow” blaming linked lists. Maxima is built on Common Lisp which definitely has arrays and vectors, so the claims made there seem a bit uninformed. I don’t really know enough math to judge the rest, though.
- deleted 4y ago[deleted]
- gus_massa 4y agoI'm extremely suspicious of that explanation. It would be nice to see a few benchmarks. Anectote time: I used Mathematica many years ago. One surprising thing was that when you update the content of a vector, Mathematica creates a new vector and copies the content of the old vector. If you just copy an algorithm from C to Mathematica, it may be N times slower because it's creating a lot of intermediate vectors. So you must rewrite your code using "fold", or something like that. It was a long time ago, so I'm not sure if they have already added some trick to optimize code from people like me that don't know what they are doing. If Mathematica or Maxima has this trick but the other doesn't, it may cause a huge difference of time between algorithm that look very similar. Anyway, this is totally unrelated to lists.
- 4y ago
- 2b3a51 4y agoReduce is another lisp based computer algebra system from the prehistoric times, now open sourced. https://en.wikipedia.org/wiki/Reduce_(computer_algebra_system) https://en.wikipedia.org/wiki/Reduce_(computer_algebra_syste... https://reduce-algebra.sourceforge.io/ https://reduce-algebra.sourceforge.io/ I paid money for a Reduce release for RISCOS back in the last ice age. I recollect having to register my licence with the Rand Corporation for some reason.
- Olumde 4y agoReduce is awesome! Dozens of specialized packages[1]. My favourite two packages are 1. The Source Code Optimization Package, SCOPE. It will take an expression or group of expression and produce a simpler set of expressions that minimize the use of arithmetic expressions. 2. The coeff2 package[3]. Tell coeff2 what the variables are and it will rewrite your expression as a simpler expression in terms of the variables alone and represent mush the others into constants. I could not do what I do without it these two packages. Beats Maxima IMO. [1] https://reduce-algebra.sourceforge.io/documentation.php#contributed https://reduce-algebra.sourceforge.io/documentation.php#cont... [2] https://reduce-algebra.sourceforge.io/reduce38-docs/scope.pdf https://reduce-algebra.sourceforge.io/reduce38-docs/scope.pd... [3] https://reduce-algebra.sourceforge.io/manual/manualse136.html#x201-49700020.13 https://reduce-algebra.sourceforge.io/manual/manualse136.htm...
- bar94 4y agoHow does Maxima compare to something like Xcas[1]? [1]: https://www-fourier.ujf-grenoble.fr/~parisse/giac.html https://www-fourier.ujf-grenoble.fr/~parisse/giac.html
- bloaf 4y agohttps://www.12000.org/my_notes/CAS_integration_tests/reports/summer_2022/indexchapter1.htm#x2-10001 https://www.12000.org/my_notes/CAS_integration_tests/reports... Giac/Xcas is slightly worse at symbolic integration than Maxima, and both are dramatically worse than Mathematica. FriCAS, an Axiom fork, is the best open source CAS on those benchmarks.
- pdonis 4y agoI use Maxima's GRTensor package for GR computations, such as computing the Einstein tensor of a metric. This only involves differential equations with real-valued functions, so it would not trigger the complex number issues that are described in the article.
- anthk 4y agoIf Maxima doesn't suit you, Yacas has a both a cli and QT interfaces akin to Maxima's design, and both output to Gnuplot.
- thweo4iu2o343 4y agoI wish one could use these libraries inside common lisp as opposed to having some badly designed language on top of it. Sure, technically you can use it (see Maxima), but the weird ways in which it needs to be written is completely off-putting and not in line with (modern and ancient) Common Lisp programming guidelines.
- waldrews 4y agoI'd like to make calls to Maxima with s-expressions and get s-expressions back. Is there a way to embed Maxima, say by having its Common Lisp host running on top of, say, a Clojure environment (really anything JVM or JS or Python or .Net, anything with clean in-process interop)? I know SageMath accomplishes something like this by calling out to Maxima from its Python-based environment...
- chuchana 4y agoCLIM-based client for Maxima: https://github.com/lokedhs/maxima-client https://github.com/lokedhs/maxima-client