Maxima: A computer algebra system written in Common Lisp
maxima.sourceforge.io
maxima.sourceforge.io
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".
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.
Yeah I mainly used it in my real analysis, complex analysis, and differential geometry classes. Also used it a bit in an intro cryptography class to play around with some rings and solve assignment problems.
I'm using Python right now in a neural networks class and I hate it. It's absolutely horrible to debug. You press run and then your neural network starts training and then craps out with divide-by-0 after a long time and no clue as to where the offending code might be.
Any pointers to how one would use it for real analysis?
Thanks.
I think the process is a bit different depending on your OS. On Linux it's often bundled as a package for example on Ubuntu it's called maxima-emacs. I only use pretty vanilla Emacs so I'm not sure how that would interact with Doomemacs. You could try the manual install directions from the page perhaps [0].
[0] https://sites.google.com/site/imaximaimath/tutorial-of-imaxi...
rlwrap maxima. Use your Emacs keybindings from the shell (actually, readline) into it.https://sites.google.com/site/imaximaimath/
> Imaxima provides a graphical user interface front-end for the computer algebra system Maxima in an Emacs buffer. Imaxima processes the output from Maxima with LaTeX to beautifully render the mathematical formula. It inserts the rendered math formula image in the buffer.
https://en.wikipedia.org/wiki/Reduce_(computer_algebra_syste...
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.
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#cont...
[2] https://reduce-algebra.sourceforge.io/reduce38-docs/scope.pd...
[3] https://reduce-algebra.sourceforge.io/manual/manualse136.htm...
However, since I stumbled upon this blog post by Thingwy 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)
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.
Somewhat related: I've read before that the FOSS CAS Axiom has the only kinda complete implementation of the Risch algorithm for integration. Axiom looks harder to use, but maybe it's an option.
(I don't know anything about the topic)
The Sympy implementation handles the purely transcendental case and does best effort on the algebraic extensions. It's a lot more ergonomic than fricas/axiom though.
;;; Loading #P"/usr/lib/ecl-21.2.1/sb-bsd-sockets.fas"
;;; Loading #P"/usr/lib/ecl-21.2.1/sockets.fas"
Maxima 5.46.0 https://maxima.sourceforge.io
using Lisp ECL 21.2.1
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) declare(a,real);
(%o1) done
(%i2) declare(b,real);
(%o2) done
(%i3) assume(a>b,b>0);
(%o3) [a > b, b > 0]
(%i4) limit(log(b-a+%i*eta),eta,0,plus);
(%o4) log(a - b) + %i %pi
(%i5) limit(log(b-a+%i*eta),eta,0,minus);
(%o5) log(a - b) - %i %piDoes 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.
Regarding the interface being ugly it kinda also depends on which graphical frontend gnuplot is using, there are multiple. I like the Qt one.
https://community.linuxmint.com/img/screenshots/maxima-emacs...
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.
I understand.
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.
can't believe somebody wrote this in C/C++!
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.
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.
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/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/#subsu...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 )You may also be interested in SymEngine: https://github.com/symengine/symengine
https://www.12000.org/my_notes/CAS_integration_tests/reports...
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.
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.