6 ms·
Maxima (Software)
- medo-bear 5y agoi know common lisp can be called by a maxima program. can maxima be used as a library in common lisp ?
- jhgb 5y agoThat's rather complicated because of its internal architecture. Also because Maxima is skewed towards interactive usage. Some of the routines need to ask you questions about the problem in the middle of the solution (things like "is a zero or non-zero?" and such). Perhaps such questions could be turned into conditions, though.
- medo-bear 5y agoit would be cool if maxima could be used in such a way. similar to how sympy is used in python. i have a feeling it is definitely possible. maybe someone knows if any work on it has been done by some third party
- nbernard 5y agoThere is this project, but it seems inactive and I'm not sure if it is usable or not: https://github.com/bld/embeddable-maxima https://github.com/bld/embeddable-maxima This blog post also shows how to call Maxima from CL: https://niitsuma.hatenadiary.org/entry/20080328/1226706399 https://niitsuma.hatenadiary.org/entry/20080328/1226706399
- medo-bear 5y agocheers thank you
- bruce343434 5y agoI actually use maxima as a faster wolframalpha alternative. It doesn't look as polished but it gets the job done when solving or simplifying most equations.
- deleted 5y ago[deleted]
- pfortuny 5y agoI use this frequently for plotting planar vector fields: it is much better than Mathematica’s StreamPlot (which I am forced to use from time to time). Also another colleague found out the hard way that maxima can happen to solve symbolic/arithmetic linear equations much faster (2 orders of magnitude) than Mathematica. A great tool. A pity it is underestimated.
- thayne 5y agoAs a physics student, I often used maxima for assignments, because while I did have access to Mathematica on lab computers, having a CAS on my laptop was often more convenient. In general, it was able to do what I needed just as well as Mathematica, though with different syntax.
- andi999 5y agoWhich command do you use, and could you link an example?
- bitwize 5y agoIronic, considering that Stephen Wolfram insisted in the 80s that Lisp was 100x slower than C, and so a fast mathematics package could not be written in it.
- p_l 5y agoHe was wrong then and now, but the crucial speedup of Mathematica vs Maxima was difference in modeling of data and how Mathematica could piggy back on fortran libraries for numerical solving, while Maxima focused on symbolic solving. This meant that for many cases where numerical method was beneficial, Mathematica easily won on speed.
- etaioinshrdlu 5y agoIt says that Maxima also has its own programming language (written in Lisp). Any opinions on it good or bad?
- rexpress 5y agoIt's been a few years since I used Maxima, which was at university but without much introduction to the language. The dynamic scoping was a particularly unpleasant surprise, lexical scoping was not available which lead to buggy behaviour. I returned to the warm embrace of Mathematica fairly quickly.
- reikonomusha 5y agoIt’s a rather plain language. Nothing too special about it. Has functions, variables, assignment, loops, and a few other rudiments.
- deleted 5y ago[deleted]
- mkl 5y agoIt's more like Maxima is a programming language. Its syntax is weird, archaic, and clunky, and different from anything else you've ever used for no reason except that it dates back to 1968, before C, before Pascal. Assignment uses ":", blocks of statements use "(" and ")", etc. Aside from the syntax, its features are mostly pretty basic and standard, and apart from mathematics quite limited.
- yjftsjthsd-h 5y agoIn fairness, "predates every other option you might compare it to" really is a good excuse.
- thayne 5y ago> Its syntax is weird, archaic, and clunky, Maybe if you come from a CS background. From a math background, it's syntax is actually more natural than most contemporary programming languages. For example, : is used for assignment, because = has the normal mathematical meaning. Blocks use parentheses because that's how you group stuff in math. Maxima is very much a domain specific language, where the domain is mathematics.
- marcodiego 5y agoThe wx-maxima[1] is a good GUI for maxima. A very nice mature FLOSS symbolic math package. For derivatives, integrals, simplification and many other uses I don't think it is nowhere weaker than proprietary alternatives. [1] https://wxmaxima-developers.github.io/wxmaxima/ https://wxmaxima-developers.github.io/wxmaxima/
- BeFlatXIII 5y agoWxMaxima (+Igor Pro) is what got me through my P Chem and QM courses in college. The joy of teaching yourself linear algebra because they forgot to list it as a course requirement. Luckily all you really need is rref.
- dotancohen 5y ago> Luckily all you really need is rref. Tell us more. Please. I'm going through linear right now.
- marcianx 5y agoTransforming a linear matrix equation to Reduced Row Echelon Form (rref) [1] allows solving it very easily or writing a minimal set of variables in terms of others if you don't have enough independent equations or discovering that the set of equations is contradictory. You naturally arrive at this form if you were to do manual Gaussian Elimination, but linear algebra libraries have additional efficient ways to arrive at this depending on the structure of the matrix. So it's common to just ask the algebra system to get it there and then use the matrix either programmatically or by hand depending on what you're trying to do. [1]: See https://en.wikipedia.org/wiki/Row_echelon_form https://en.wikipedia.org/wiki/Row_echelon_form
- dotancohen 5y agoTerrific, thank you!
- riedel 5y ago
- pfdietz 5y agoAs I recall, the style of Lisp code in Maxima is very old fashioned. We wouldn't write Common Lisp like that today.
- tkuraku 5y agoSagemath provides a python interface to maxima and uses it for some operations behind the scenes.
- williamstein 5y agoThe Python interface with Maxima in Sage is pretty sophisticated in that it uses ECL (Embedded Common Lisp) to provide a high performance C level interface. The conversion code (for special functions, constants, etc.), is also nontrivial. Over the years we have tried to reduce the reliance on Maxima (eg for portability reasons) by instead seeing if we could use SymEngine or sympy or something else, but Maxima is pretty deep, eg it’s symbolic integration is still not easy to beat with sympy…
- Qem 5y agoI'm more familiar with SymPy. How does it compare with Maxima? Does anyone have experience with both?
- mkl 5y agoBeing embedded in a nice modern programming language like Python, SymPy is definitely much easier to use, and I'd recommend that for most people. Maxima probably has some more advanced esoteric features I haven't needed, and may be faster for some things (but so might SymPy). I use Maxima in one situation: making online maths quiz questions in STACK [1], because Maxima is the CAS underlying it. I'd rather it used SymPy! If you need more advanced stuff than SymPy, probably SageMath is the way to go - stay in ~Python, but use it as an interface to other systems (which include Maxima). I used to use Sage before SymPy was around and good. [1] https://www.ed.ac.uk/maths/stack/ https://www.ed.ac.uk/maths/stack/
- jhgb 5y agoCommon Lisp is a nice modern programming language, too. Only SymPy yet has to be ported into it...
- mkl 5y agoMaxima is implemented in Lisp, but is itself a separate language. SymPy is an ordinary Python library.
- jhgb 5y agoYes, and it's a library that could be conceivably ported to Lisp. As Scmutils have shown, "lispy" languages with multimethods/generic functions are really suitable for building symbolic manipulation systems. So chances are that functional port to Lisp could provide a really nice interface to SymPy's functionality.
- pfdietz 5y agoAnd Maxima was created before Common Lisp even existed. Steele first presented Common Lisp at a conference in 1982, and CLTL1 wasn't published until 1984. As I recall, Maxima was first written for Franz Lisp. Older lisps like that used dynamic binding for all variables.
- a0-prw 5y agoThere's a nice extension for MS Word that uses Maxima. WordMat https://github.com/Eduap-com/WordMat https://github.com/Eduap-com/WordMat
- dietrichepp 5y agoI used Maxima for creating statistical models of hardware failure at work a while back. I’d take the statistical models, use Maxima to symbolically find equations for estimators, and then write out the formulas in Python using NumPy / SciPy to solve the equations numerically. Without Maxima, the whole process would have involved more error-prone, tedious work on my part. I like to pitch the model by saying it successfully predicted a data loss event before it happened, predicted where that data loss event would happen (which configuration would lose data), and gave us insight into how the system could be changed to prevent similar data loss events from happening. Maxima was a key tool in making the model.
- iamcreasy 5y agoWow, sounds cool! Could you please share more details. What statistical model, and what estimators had to find? I have some theoretical statistical training, and I am under the assuming you can use MLE or some other estimator to find the parameter of a model.