Maxima – A Computer Algebra System built with Lisp
maxima.sourceforge.net
maxima.sourceforge.net
Fricas links:
https://en.wikipedia.org/wiki/FriCAS https://fricas.github.io https://fricas.github.io/book.pdf
Axiom links:
https://en.wikipedia.org/wiki/Axiom_(computer_algebra_system... https://github.com/daly/axiom
Not that Maxima is all that easy to understand either. The nature of the software makes it complicated, but there is code in there from the 60's, which carries with it some more the classic issues with Lisp code from that era, short symbol names, use of dynamic variables, etc.
A big problem for me getting into Maxima is that the frontends I've found are pretty unstable and the terminal version only does equations as ascii art, which I just cant' stand reading.
What do you mean? wxMaxima has worked fine for me.
I included some example videos in this reply: https://news.ycombinator.com/item?id=24467593
f(x) := a*x^2 + b*x + c
solve( f(x),x );
from sympy import symbols, solve
a, b, c, x = sympy.symbols(('a', 'b', 'c', 'x'))
y = sympy.Eq(a*x**2+b*x+c, 0)
solve(y, x) from sympy.abc import *
from sympy import *
I would put that into a file, and auto-load it at startup so I don't need to run it manually every time - one way of doing that is using iPython profiles.Also put this in your startup file to get more pleasant looking output:
init_printing(use_unicode=True)
Once you've done that, you only need to type: y = a*x**2 + b*x + c
solve(y,x) #!/usr/bin/env python
from sympy.abc import *
from sympy import *
import code
init_printing()
code.interact(local=locals())It's an ugly solution, but when an output expression is complicated enough that I want it nicely rendered, I copy the TeX output to, e.g., https://arachnoid.com/latex/ while removing the \leqno command and replacing \sp commands with carets (^).
Citations or proofs?
You probably want something more concrete, so take a look at this effort to test symbolic integration software using a common testsuite: https://www.12000.org/my_notes/CAS_integration_tests/reports...
Fricas scores quite a bit better than Maxima there, but note that there are big problems with the test, although there is a somewhat active effort to improve its accuracy. It is problematic (but understandable) that the test uses Sage, as the Sage interface to Fricas, at least, is imperfect. I.e., AFAIK some of the integration tests will fail simply because Sage fails to communicate with Fricas successfully.
Main page of the integration tests: https://www.12000.org/my_notes/CAS_integration_tests/index.h...
Fricas (and Axiom) also has a more well thought out type system (with type checking at time of compilation) than other computer mathematics systems, so writing Fricas programs (the language is called Spad, which presumably comes from Scratchpad) is nice. (Fricas can be used both interactively and as a compiled language.)
This mailing list discussion may also be of interest: https://groups.google.com/forum/#!topic/fricas-devel/xVtvZ46...
I have made a few videos showing how it works. It's also available on Flathub, or if you're brave you can build it yourself.
https://peertube.mastodon.host/videos/watch/df751bd5-5a26-44...
https://peertube.mastodon.host/videos/watch/b003360f-97a9-4f...
What is really needed is a multiplatform backend that implements everything completely. Right now the only production grade backend is the CLX one, and even that one requires you to jump though hoops to get complete font rendering.
I built all of this into the flatpak distribution, but few people are willing to go through that just to distribute some software.
https://people.eecs.berkeley.edu/~fateman/papers/mma.review....
plot3d ([cos(x)*(3 + y*cos(x/2)), sin(x)*(3 + y*cos(x/2)), y*sin(x/2)], [x, -%pi, %pi], [y, -1, 1], ['grid, 50, 15]);
/* gradient of the log-likelihood for a time-dependent accelerated failure time model */
assume(t>0)$ H:-log(S(integrate(exp(alpha+beta*x(u)),u,0,t))); diff(delta*diff(H,t)-H,beta);
Axiom/Fricas is a beautiful language which provides a powerful mathematical type system. plot3d ([cos(x)*(3 + y*cos(x/2)), sin(x)*(3 + y*cos(x/2)), y*sin(x/2)], [x, -%pi, %pi], [y, -1, 1], ['grid, 50, 15]);Not sure what difference it makes, but probably some.
Would be happy to answer any questions about it.
I am pleasantly surprised to get a reply from you! I have one question, How often is Sympy used in Sagemath compared to Maxima?
Or rather when I do symbolic math in sagemath, do I ever hit Sympy?
Details are here: https://github.com/turbo/netlisp
However, I am terribly frightened by programs like this, as I suspect they are much smarter than me, so I tend to avoid them.
Your python code will look a lot like calls to maxima, which will happen under the hood.
You can think of it like bash, as a contrived example, most sage programs would be like calling an inline python script to find all files whose size is an even number of bytes, passing the results through pipes, pretty printing them with ls and finally sorting them alphabetically with sort.
Whether you think this is good or bad depends on how familiar you are with the underlying systems. I think that it's great since I can use one program to dispatch whatever I need to the correct state of the art project and get a result that with a bit of massaging can be fed into another project.
The integration between the various packages in sage it exists, but it's a bit clunky.